diff --git a/lib/PayPal/Api/BankAccount.php b/lib/PayPal/Api/BankAccount.php index 99750f1..34c0de0 100644 --- a/lib/PayPal/Api/BankAccount.php +++ b/lib/PayPal/Api/BankAccount.php @@ -3,9 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; /** * Class BankAccount diff --git a/lib/PayPal/Api/Cost.php b/lib/PayPal/Api/Cost.php index b1e11a1..b8fa4ec 100644 --- a/lib/PayPal/Api/Cost.php +++ b/lib/PayPal/Api/Cost.php @@ -3,8 +3,8 @@ namespace PayPal\Api; use PayPal\Common\PayPalModel; -use PayPal\Validation\NumericValidator; use PayPal\Converter\FormatConverter; +use PayPal\Validation\NumericValidator; /** * Class Cost diff --git a/lib/PayPal/Api/CreditCard.php b/lib/PayPal/Api/CreditCard.php index e528272..082d785 100644 --- a/lib/PayPal/Api/CreditCard.php +++ b/lib/PayPal/Api/CreditCard.php @@ -3,9 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; +use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; use PayPal\Validation\ArgumentValidator; -use PayPal\Rest\ApiContext; /** * Class CreditCard diff --git a/lib/PayPal/Api/Invoice.php b/lib/PayPal/Api/Invoice.php index 85da974..df82c6e 100644 --- a/lib/PayPal/Api/Invoice.php +++ b/lib/PayPal/Api/Invoice.php @@ -3,9 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; use PayPal\Validation\UrlValidator; /** diff --git a/lib/PayPal/Api/PaymentInstruction.php b/lib/PayPal/Api/PaymentInstruction.php index 582487e..1222c31 100644 --- a/lib/PayPal/Api/PaymentInstruction.php +++ b/lib/PayPal/Api/PaymentInstruction.php @@ -3,9 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; /** * Class PaymentInstruction diff --git a/lib/PayPal/Api/Payout.php b/lib/PayPal/Api/Payout.php index 44715da..b97b515 100644 --- a/lib/PayPal/Api/Payout.php +++ b/lib/PayPal/Api/Payout.php @@ -3,9 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; +use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; use PayPal\Validation\ArgumentValidator; -use PayPal\Rest\ApiContext; /** * Class Payout diff --git a/lib/PayPal/Api/PayoutItem.php b/lib/PayPal/Api/PayoutItem.php index 96723b8..76f2d23 100644 --- a/lib/PayPal/Api/PayoutItem.php +++ b/lib/PayPal/Api/PayoutItem.php @@ -3,9 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; /** * Class PayoutItem diff --git a/lib/PayPal/Api/Refund.php b/lib/PayPal/Api/Refund.php index 9e62076..ee26a15 100644 --- a/lib/PayPal/Api/Refund.php +++ b/lib/PayPal/Api/Refund.php @@ -3,9 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; /** * Class Refund diff --git a/lib/PayPal/Api/WebhookEvent.php b/lib/PayPal/Api/WebhookEvent.php index 5c786f9..bc9426f 100644 --- a/lib/PayPal/Api/WebhookEvent.php +++ b/lib/PayPal/Api/WebhookEvent.php @@ -4,9 +4,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; use PayPal\Exception\PayPalConnectionException; -use PayPal\Validation\ArgumentValidator; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; use PayPal\Validation\JsonValidator; /** diff --git a/lib/PayPal/Auth/OAuthTokenCredential.php b/lib/PayPal/Auth/OAuthTokenCredential.php index 750ab7d..f1d9e60 100644 --- a/lib/PayPal/Auth/OAuthTokenCredential.php +++ b/lib/PayPal/Auth/OAuthTokenCredential.php @@ -205,7 +205,7 @@ class OAuthTokenCredential extends PayPalResourceModel /** * Updates Access Token based on given input * - * @param $config + * @param array $config * @param string|null $refreshToken * @return string */ diff --git a/lib/PayPal/Transport/PayPalRestCall.php b/lib/PayPal/Transport/PayPalRestCall.php index bf69f39..e80f5ec 100644 --- a/lib/PayPal/Transport/PayPalRestCall.php +++ b/lib/PayPal/Transport/PayPalRestCall.php @@ -1,9 +1,9 @@ '2014-12-06T11:00:00Z', diff --git a/sample/payments/AuthorizationCapture.php b/sample/payments/AuthorizationCapture.php index 606755a..493e4c5 100644 --- a/sample/payments/AuthorizationCapture.php +++ b/sample/payments/AuthorizationCapture.php @@ -8,8 +8,8 @@ /** @var Authorization $authorization */ $authorization = require 'GetAuthorization.php'; use PayPal\Api\Amount; -use PayPal\Api\Capture; use PayPal\Api\Authorization; +use PayPal\Api\Capture; // ### Capture Payment diff --git a/sample/payments/AuthorizePayment.php b/sample/payments/AuthorizePayment.php index 5183624..c32b581 100644 --- a/sample/payments/AuthorizePayment.php +++ b/sample/payments/AuthorizePayment.php @@ -7,12 +7,12 @@ require __DIR__ . '/../bootstrap.php'; use PayPal\Api\Address; +use PayPal\Api\Amount; use PayPal\Api\CreditCard; use PayPal\Api\FundingInstrument; use PayPal\Api\Payer; -use PayPal\Api\Amount; -use PayPal\Api\Transaction; use PayPal\Api\Payment; +use PayPal\Api\Transaction; // The biggest difference between creating a payment, and authorizing a payment is to set the intent of payment // to correct setting. In this case, it would be 'authorize' diff --git a/sample/payments/CreateFuturePayment.php b/sample/payments/CreateFuturePayment.php index 9a6e579..0c1d31c 100644 --- a/sample/payments/CreateFuturePayment.php +++ b/sample/payments/CreateFuturePayment.php @@ -7,10 +7,11 @@ require __DIR__ . '/../bootstrap.php'; use PayPal\Api\Amount; -use PayPal\Api\Payer; use PayPal\Api\FuturePayment; +use PayPal\Api\Payer; use PayPal\Api\RedirectUrls; use PayPal\Api\Transaction; + session_start(); // ### Payer diff --git a/sample/payments/CreatePayment.php b/sample/payments/CreatePayment.php index d983834..c0317c7 100644 --- a/sample/payments/CreatePayment.php +++ b/sample/payments/CreatePayment.php @@ -10,13 +10,13 @@ require __DIR__ . '/../bootstrap.php'; use PayPal\Api\Amount; +use PayPal\Api\CreditCard; use PayPal\Api\Details; +use PayPal\Api\FundingInstrument; use PayPal\Api\Item; use PayPal\Api\ItemList; -use PayPal\Api\CreditCard; use PayPal\Api\Payer; use PayPal\Api\Payment; -use PayPal\Api\FundingInstrument; use PayPal\Api\Transaction; // ### CreditCard diff --git a/sample/payments/CreatePaymentUsingSavedCard.php b/sample/payments/CreatePaymentUsingSavedCard.php index e92d385..96f8512 100644 --- a/sample/payments/CreatePaymentUsingSavedCard.php +++ b/sample/payments/CreatePaymentUsingSavedCard.php @@ -8,15 +8,15 @@ /** @var CreditCard $card */ $card = require __DIR__ . '/../vault/CreateCreditCard.php'; use PayPal\Api\Amount; +use PayPal\Api\CreditCard; +use PayPal\Api\CreditCardToken; use PayPal\Api\Details; +use PayPal\Api\FundingInstrument; use PayPal\Api\Item; use PayPal\Api\ItemList; -use PayPal\Api\CreditCardToken; use PayPal\Api\Payer; use PayPal\Api\Payment; -use PayPal\Api\FundingInstrument; use PayPal\Api\Transaction; -use PayPal\Api\CreditCard; // ### Credit card token // Saved credit card id from a previous call to diff --git a/sample/payments/GetAuthorization.php b/sample/payments/GetAuthorization.php index 426d906..6e423af 100644 --- a/sample/payments/GetAuthorization.php +++ b/sample/payments/GetAuthorization.php @@ -8,7 +8,6 @@ $authorization = require 'AuthorizePayment.php'; $authorizationId = $authorization->getId(); use PayPal\Api\Authorization; -use PayPal\Api\Payment; // ### GetAuthorization // You can retrieve info about an Authorization diff --git a/sample/payments/GetCapture.php b/sample/payments/GetCapture.php index fc64b4b..19cea3a 100644 --- a/sample/payments/GetCapture.php +++ b/sample/payments/GetCapture.php @@ -8,8 +8,6 @@ $request = require 'AuthorizationCapture.php'; use PayPal\Api\Capture; -use PayPal\Api\Amount; -use PayPal\Api\Authorization; // ### Retrieve Capture details // You can look up a capture by invoking the Capture::get method diff --git a/sample/payments/OrderAuthorize.php b/sample/payments/OrderAuthorize.php index 05deb2e..441dfa9 100644 --- a/sample/payments/OrderAuthorize.php +++ b/sample/payments/OrderAuthorize.php @@ -6,7 +6,6 @@ /** @var \PayPal\Api\Payment $payment */ $payment = require __DIR__ . '/ExecutePayment.php'; -use PayPal\Api\Order; use PayPal\Api\Amount; use PayPal\Api\Authorization; diff --git a/sample/payments/OrderCapture.php b/sample/payments/OrderCapture.php index d4a3218..d704081 100644 --- a/sample/payments/OrderCapture.php +++ b/sample/payments/OrderCapture.php @@ -6,8 +6,8 @@ /** @var \PayPal\Api\Payment $payment */ $payment = require __DIR__ . '/ExecutePayment.php'; -use PayPal\Api\Capture; use PayPal\Api\Amount; +use PayPal\Api\Capture; // ### Approval Status // Determine if the user approved the payment or not diff --git a/sample/payments/OrderDoVoid.php b/sample/payments/OrderDoVoid.php index f619418..7c0e287 100644 --- a/sample/payments/OrderDoVoid.php +++ b/sample/payments/OrderDoVoid.php @@ -7,9 +7,6 @@ /** @var \PayPal\Api\Payment $payment */ $payment = require __DIR__ . '/ExecutePayment.php'; -use PayPal\Api\Capture; -use PayPal\Api\Amount; - // ### Approval Status // Determine if the user approved the payment or not if (isset($_GET['success']) && $_GET['success'] == 'true') { diff --git a/sample/payments/Reauthorization.php b/sample/payments/Reauthorization.php index ab7c55c..dbebdfa 100644 --- a/sample/payments/Reauthorization.php +++ b/sample/payments/Reauthorization.php @@ -5,8 +5,8 @@ // API used: v1/payments/authorization/{authorization_id}/reauthorize /** @var Authorization $authorization */ $authorization = require 'AuthorizePayment.php'; -use PayPal\Api\Authorization; use PayPal\Api\Amount; +use PayPal\Api\Authorization; // ### Reauthorization // Reauthorization is available only for PayPal account payments diff --git a/sample/payments/RefundCapture.php b/sample/payments/RefundCapture.php index d368c97..1ebbdaf 100644 --- a/sample/payments/RefundCapture.php +++ b/sample/payments/RefundCapture.php @@ -6,10 +6,8 @@ /** @var Capture $capture */ $capture = require 'AuthorizationCapture.php'; -use PayPal\Api\Authorization; use PayPal\Api\Capture; use PayPal\Api\Refund; -use PayPal\Api\Amount; // ### Refund // Create a refund object indicating diff --git a/sample/sale/GetSale.php b/sample/sale/GetSale.php index 8efb72f..8b91501 100644 --- a/sample/sale/GetSale.php +++ b/sample/sale/GetSale.php @@ -8,8 +8,8 @@ /** @var Payment $payment */ $payment = require __DIR__ . '/../payments/CreatePayment.php'; -use PayPal\Api\Sale; use PayPal\Api\Payment; +use PayPal\Api\Sale; // ### Get Sale From Created Payment // You can retrieve the sale Id from Related Resources for each transactions. diff --git a/tests/PayPal/Test/Api/AddressTest.php b/tests/PayPal/Test/Api/AddressTest.php index 4f675a9..c4ae25d 100644 --- a/tests/PayPal/Test/Api/AddressTest.php +++ b/tests/PayPal/Test/Api/AddressTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\Address; /** diff --git a/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php b/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php index 68508cb..3099606 100644 --- a/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php +++ b/tests/PayPal/Test/Api/AgreementStateDescriptorTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\AgreementStateDescriptor; /** diff --git a/tests/PayPal/Test/Api/AgreementTest.php b/tests/PayPal/Test/Api/AgreementTest.php index 0b5facb..2da2e72 100644 --- a/tests/PayPal/Test/Api/AgreementTest.php +++ b/tests/PayPal/Test/Api/AgreementTest.php @@ -2,11 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; -use PayPal\Api\AgreementTransactions; -use PayPal\Rest\ApiContext; -use PayPal\Transport\PayPalRestCall; use PayPal\Api\Agreement; /** diff --git a/tests/PayPal/Test/Api/AgreementTransactionTest.php b/tests/PayPal/Test/Api/AgreementTransactionTest.php index 64eeba7..47f02ca 100644 --- a/tests/PayPal/Test/Api/AgreementTransactionTest.php +++ b/tests/PayPal/Test/Api/AgreementTransactionTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\AgreementTransaction; /** diff --git a/tests/PayPal/Test/Api/AgreementTransactionsTest.php b/tests/PayPal/Test/Api/AgreementTransactionsTest.php index df96665..5d513d2 100644 --- a/tests/PayPal/Test/Api/AgreementTransactionsTest.php +++ b/tests/PayPal/Test/Api/AgreementTransactionsTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\AgreementTransactions; /** diff --git a/tests/PayPal/Test/Api/AmountTest.php b/tests/PayPal/Test/Api/AmountTest.php index c8015a7..5efd7d5 100644 --- a/tests/PayPal/Test/Api/AmountTest.php +++ b/tests/PayPal/Test/Api/AmountTest.php @@ -2,9 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; -use PayPal\Converter\FormatConverter; -use PayPal\Validation\NumericValidator; use PayPal\Api\Amount; /** diff --git a/tests/PayPal/Test/Api/AuthorizationTest.php b/tests/PayPal/Test/Api/AuthorizationTest.php index cee2e8e..ef95265 100644 --- a/tests/PayPal/Test/Api/AuthorizationTest.php +++ b/tests/PayPal/Test/Api/AuthorizationTest.php @@ -2,12 +2,8 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; -use PayPal\Api\Capture; -use PayPal\Rest\ApiContext; -use PayPal\Transport\PPRestCall; use PayPal\Api\Authorization; +use PayPal\Transport\PPRestCall; /** * Class Authorization diff --git a/tests/PayPal/Test/Api/BankAccountTest.php b/tests/PayPal/Test/Api/BankAccountTest.php index 1607d99..0ca75a1 100644 --- a/tests/PayPal/Test/Api/BankAccountTest.php +++ b/tests/PayPal/Test/Api/BankAccountTest.php @@ -2,10 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; -use PayPal\Rest\ApiContext; -use PayPal\Transport\PayPalRestCall; use PayPal\Api\BankAccount; /** diff --git a/tests/PayPal/Test/Api/BankAccountsListTest.php b/tests/PayPal/Test/Api/BankAccountsListTest.php index 51d80ea..d834f3f 100644 --- a/tests/PayPal/Test/Api/BankAccountsListTest.php +++ b/tests/PayPal/Test/Api/BankAccountsListTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\BankAccountsList; /** diff --git a/tests/PayPal/Test/Api/BankTokenTest.php b/tests/PayPal/Test/Api/BankTokenTest.php index aa3de98..ff1dcb4 100644 --- a/tests/PayPal/Test/Api/BankTokenTest.php +++ b/tests/PayPal/Test/Api/BankTokenTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\BankToken; /** diff --git a/tests/PayPal/Test/Api/BillingInfoTest.php b/tests/PayPal/Test/Api/BillingInfoTest.php index 2d7de85..540b937 100644 --- a/tests/PayPal/Test/Api/BillingInfoTest.php +++ b/tests/PayPal/Test/Api/BillingInfoTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\BillingInfo; /** diff --git a/tests/PayPal/Test/Api/CancelNotificationTest.php b/tests/PayPal/Test/Api/CancelNotificationTest.php index d3c0376..6454cc2 100644 --- a/tests/PayPal/Test/Api/CancelNotificationTest.php +++ b/tests/PayPal/Test/Api/CancelNotificationTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\CancelNotification; /** diff --git a/tests/PayPal/Test/Api/CaptureTest.php b/tests/PayPal/Test/Api/CaptureTest.php index 2b2c74d..97aee4f 100644 --- a/tests/PayPal/Test/Api/CaptureTest.php +++ b/tests/PayPal/Test/Api/CaptureTest.php @@ -2,12 +2,8 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; -use PayPal\Api\Refund; -use PayPal\Rest\ApiContext; -use PayPal\Transport\PPRestCall; use PayPal\Api\Capture; +use PayPal\Transport\PPRestCall; /** * Class Capture diff --git a/tests/PayPal/Test/Api/CarrierAccountTokenTest.php b/tests/PayPal/Test/Api/CarrierAccountTokenTest.php index ec5298b..efc966d 100644 --- a/tests/PayPal/Test/Api/CarrierAccountTokenTest.php +++ b/tests/PayPal/Test/Api/CarrierAccountTokenTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\CarrierAccountToken; /** diff --git a/tests/PayPal/Test/Api/CartBaseTest.php b/tests/PayPal/Test/Api/CartBaseTest.php index 2105ea6..5d8161c 100644 --- a/tests/PayPal/Test/Api/CartBaseTest.php +++ b/tests/PayPal/Test/Api/CartBaseTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\CartBase; /** diff --git a/tests/PayPal/Test/Api/ChargeModelTest.php b/tests/PayPal/Test/Api/ChargeModelTest.php index ed78c22..46f4d2a 100644 --- a/tests/PayPal/Test/Api/ChargeModelTest.php +++ b/tests/PayPal/Test/Api/ChargeModelTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\ChargeModel; /** diff --git a/tests/PayPal/Test/Api/CostTest.php b/tests/PayPal/Test/Api/CostTest.php index 89f38df..61e3861 100644 --- a/tests/PayPal/Test/Api/CostTest.php +++ b/tests/PayPal/Test/Api/CostTest.php @@ -2,9 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; -use PayPal\Converter\FormatConverter; -use PayPal\Validation\NumericValidator; use PayPal\Api\Cost; /** diff --git a/tests/PayPal/Test/Api/CreateProfileResponseTest.php b/tests/PayPal/Test/Api/CreateProfileResponseTest.php index 05f3f5e..ec2da48 100644 --- a/tests/PayPal/Test/Api/CreateProfileResponseTest.php +++ b/tests/PayPal/Test/Api/CreateProfileResponseTest.php @@ -2,7 +2,6 @@ namespace PayPal\Test\Api; -use PayPal\Common\PayPalModel; use PayPal\Api\CreateProfileResponse; /** diff --git a/tests/PayPal/Test/Api/CreditCardHistoryTest.php b/tests/PayPal/Test/Api/CreditCardHistoryTest.php index d6b8409..14dd6a9 100644 --- a/tests/PayPal/Test/Api/CreditCardHistoryTest.php +++ b/tests/PayPal/Test/Api/CreditCardHistoryTest.php @@ -1,11 +1,8 @@