From cefecede817036c7761870a17fb2fe92ad2d1b5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0rfan=20Evrens?= Date: Thu, 25 Jun 2015 23:08:11 +0300 Subject: [PATCH] Tiny improvements. --- lib/PayPal/Api/Address.php | 2 -- lib/PayPal/Api/Agreement.php | 3 +-- lib/PayPal/Api/Authorization.php | 3 +-- lib/PayPal/Api/Capture.php | 3 +-- lib/PayPal/Api/CreditCardHistory.php | 6 ++---- lib/PayPal/Api/FuturePayment.php | 1 - lib/PayPal/Api/InvoiceAddress.php | 2 -- lib/PayPal/Api/OpenIdAddress.php | 11 ++++++++++- lib/PayPal/Api/OpenIdError.php | 6 ++++++ lib/PayPal/Api/OpenIdSession.php | 10 ++++++---- lib/PayPal/Api/OpenIdTokeninfo.php | 10 +++++++++- lib/PayPal/Api/OpenIdUserinfo.php | 24 +++++++++++++++++++++++ lib/PayPal/Api/Order.php | 4 +--- lib/PayPal/Api/Payee.php | 1 - lib/PayPal/Api/Payment.php | 4 +--- lib/PayPal/Api/Plan.php | 3 +-- lib/PayPal/Api/Sale.php | 3 ++- lib/PayPal/Api/ShippingAddress.php | 2 -- lib/PayPal/Api/TransactionBase.php | 3 --- lib/PayPal/Api/Transactions.php | 1 - lib/PayPal/Api/WebProfile.php | 3 +-- lib/PayPal/Api/Webhook.php | 3 +-- lib/PayPal/Api/WebhookEventType.php | 3 +-- lib/PayPal/Auth/OAuthTokenCredential.php | 3 +++ lib/PayPal/Common/PayPalResourceModel.php | 3 +-- lib/PayPal/Core/PayPalHttpConnection.php | 1 + 26 files changed, 73 insertions(+), 45 deletions(-) diff --git a/lib/PayPal/Api/Address.php b/lib/PayPal/Api/Address.php index 175db20..a8f72fd 100644 --- a/lib/PayPal/Api/Address.php +++ b/lib/PayPal/Api/Address.php @@ -2,8 +2,6 @@ namespace PayPal\Api; -use PayPal\Common\PayPalModel; - /** * Class Address * diff --git a/lib/PayPal/Api/Agreement.php b/lib/PayPal/Api/Agreement.php index b0899b8..810dde2 100644 --- a/lib/PayPal/Api/Agreement.php +++ b/lib/PayPal/Api/Agreement.php @@ -4,10 +4,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; use PayPal\Core\PayPalConstants; -use PayPal\Validation\ArgumentValidator; -use PayPal\Api\AgreementTransactions; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; /** * Class Agreement diff --git a/lib/PayPal/Api/Authorization.php b/lib/PayPal/Api/Authorization.php index f424790..68a72fe 100644 --- a/lib/PayPal/Api/Authorization.php +++ b/lib/PayPal/Api/Authorization.php @@ -3,10 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; -use PayPal\Api\Capture; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; /** * Class Authorization diff --git a/lib/PayPal/Api/Capture.php b/lib/PayPal/Api/Capture.php index 288d67f..7a573c1 100644 --- a/lib/PayPal/Api/Capture.php +++ b/lib/PayPal/Api/Capture.php @@ -3,10 +3,9 @@ namespace PayPal\Api; use PayPal\Common\PayPalResourceModel; -use PayPal\Validation\ArgumentValidator; -use PayPal\Api\Refund; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; +use PayPal\Validation\ArgumentValidator; /** * Class Capture diff --git a/lib/PayPal/Api/CreditCardHistory.php b/lib/PayPal/Api/CreditCardHistory.php index 636429c..2c0874e 100644 --- a/lib/PayPal/Api/CreditCardHistory.php +++ b/lib/PayPal/Api/CreditCardHistory.php @@ -3,7 +3,6 @@ namespace PayPal\Api; use PayPal\Common\PayPalModel; -use PayPal\Rest\ApiContext; /** * Class CreditCardHistory @@ -20,10 +19,9 @@ class CreditCardHistory extends PayPalModel { /** * A list of credit card resources - * * - * @param \PayPal\Api\CreditCard $credit-cards - * + * + * @param $credit_cards * @return $this */ public function setCreditCards($credit_cards) diff --git a/lib/PayPal/Api/FuturePayment.php b/lib/PayPal/Api/FuturePayment.php index 2bdc991..7e49a37 100644 --- a/lib/PayPal/Api/FuturePayment.php +++ b/lib/PayPal/Api/FuturePayment.php @@ -2,7 +2,6 @@ namespace PayPal\Api; -use PayPal\Common\PayPalModel; use PayPal\Rest\ApiContext; use PayPal\Transport\PayPalRestCall; diff --git a/lib/PayPal/Api/InvoiceAddress.php b/lib/PayPal/Api/InvoiceAddress.php index b8cd850..7e8786a 100644 --- a/lib/PayPal/Api/InvoiceAddress.php +++ b/lib/PayPal/Api/InvoiceAddress.php @@ -2,8 +2,6 @@ namespace PayPal\Api; -use PayPal\Common\PayPalModel; - /** * Class InvoiceAddress * diff --git a/lib/PayPal/Api/OpenIdAddress.php b/lib/PayPal/Api/OpenIdAddress.php index 4bfe2dd..306abf6 100644 --- a/lib/PayPal/Api/OpenIdAddress.php +++ b/lib/PayPal/Api/OpenIdAddress.php @@ -5,11 +5,20 @@ namespace PayPal\Api; use PayPal\Common\PayPalModel; /** + * Class OpenIdAddress + * * End-User's preferred address. + * + * @package PayPal\Api + * + * @property string street_address + * @property string locality + * @property string region + * @property string postal_code + * @property string country */ class OpenIdAddress extends PayPalModel { - /** * Full street address component, which may include house number, street name. * diff --git a/lib/PayPal/Api/OpenIdError.php b/lib/PayPal/Api/OpenIdError.php index 18b488b..4b9b956 100644 --- a/lib/PayPal/Api/OpenIdError.php +++ b/lib/PayPal/Api/OpenIdError.php @@ -4,7 +4,13 @@ namespace PayPal\Api; use PayPal\Common\PayPalModel; /** + * Class OpenIdError + * * Error resource + * + * @property string error + * @property string error_description + * @property string error_uri */ class OpenIdError extends PayPalModel { diff --git a/lib/PayPal/Api/OpenIdSession.php b/lib/PayPal/Api/OpenIdSession.php index cd6c397..088026d 100644 --- a/lib/PayPal/Api/OpenIdSession.php +++ b/lib/PayPal/Api/OpenIdSession.php @@ -12,13 +12,15 @@ class OpenIdSession * Returns the PayPal URL to which the user must be redirected to * start the authentication / authorization process. * - * @param string $redirectUri Uri on merchant website to where + * @param string $redirectUri Uri on merchant website to where * the user must be redirected to post paypal login - * @param array $scope The access privilges that you are requesting for + * @param array $scope The access privilges that you are requesting for * from the user. Pass empty array for all scopes. - * @param string $clientId client id from developer portal + * @param string $clientId client id from developer portal * See https://developer.paypal.com/webapps/developer/docs/integration/direct/log-in-with-paypal/detailed/#attributes for more - * @param ApiContext $apiContext Optional API Context + * @param null $nonce + * @param null $state + * @param ApiContext $apiContext Optional API Context * @return string Authorization URL */ public static function getAuthorizationUrl($redirectUri, $scope, $clientId, $nonce = null, $state = null, $apiContext = null) diff --git a/lib/PayPal/Api/OpenIdTokeninfo.php b/lib/PayPal/Api/OpenIdTokeninfo.php index 39a660a..7d9cc97 100644 --- a/lib/PayPal/Api/OpenIdTokeninfo.php +++ b/lib/PayPal/Api/OpenIdTokeninfo.php @@ -1,13 +1,21 @@ httpConfig->getMethod()) { case 'POST': curl_setopt($ch, CURLOPT_POST, true); + break; case 'PUT': case 'PATCH': case 'DELETE':