@@ -51,9 +51,9 @@ |
||
| 51 | 51 | * sends the generate request to the gateway |
| 52 | 52 | * |
| 53 | 53 | * @ignore |
| 54 | - * @param var $url |
|
| 55 | 54 | * @param array $params |
| 56 | - * @return mixed |
|
| 55 | + * @param string $subPath |
|
| 56 | + * @return string |
|
| 57 | 57 | */ |
| 58 | 58 | public function _doGenerate($subPath, $params) |
| 59 | 59 | { |
@@ -82,6 +82,10 @@ |
||
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | + /** |
|
| 86 | + * @param string $credentialType |
|
| 87 | + * @param string $expectedValuePrefix |
|
| 88 | + */ |
|
| 85 | 89 | private function _parseClientCredential($credentialType, $value, $expectedValuePrefix) |
| 86 | 90 | { |
| 87 | 91 | $explodedCredential = explode('$', $value); |
@@ -22,6 +22,9 @@ discard block |
||
| 22 | 22 | private $_config; |
| 23 | 23 | private $_http; |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param Gateway $gateway |
|
| 27 | + */ |
|
| 25 | 28 | public function __construct($gateway) |
| 26 | 29 | { |
| 27 | 30 | $this->_gateway = $gateway; |
@@ -55,7 +58,6 @@ discard block |
||
| 55 | 58 | * |
| 56 | 59 | * @deprecated since version 2.3.0 |
| 57 | 60 | * @access public |
| 58 | - * @param array $attribs |
|
| 59 | 61 | * @return Result\Successful|Result\Error |
| 60 | 62 | */ |
| 61 | 63 | public function createFromTransparentRedirect($queryString) |
@@ -190,7 +192,6 @@ discard block |
||
| 190 | 192 | * create a credit on the card for the passed transaction |
| 191 | 193 | * |
| 192 | 194 | * @access public |
| 193 | - * @param array $attribs |
|
| 194 | 195 | * @return Result\Successful|Result\Error |
| 195 | 196 | */ |
| 196 | 197 | public function credit($token, $transactionAttribs) |
@@ -210,7 +211,6 @@ discard block |
||
| 210 | 211 | * returns a Transaction object on success |
| 211 | 212 | * |
| 212 | 213 | * @access public |
| 213 | - * @param array $attribs |
|
| 214 | 214 | * @return Transaction |
| 215 | 215 | * @throws Exception\ValidationError |
| 216 | 216 | */ |
@@ -311,7 +311,6 @@ discard block |
||
| 311 | 311 | * |
| 312 | 312 | * @deprecated since version 2.3.0 |
| 313 | 313 | * @access public |
| 314 | - * @param array $attribs |
|
| 315 | 314 | * @return object |
| 316 | 315 | */ |
| 317 | 316 | public function updateFromTransparentRedirect($queryString) |
@@ -340,6 +339,9 @@ discard block |
||
| 340 | 339 | return ['makeDefault', 'verificationMerchantAccountId', 'verifyCard', 'verificationAmount', 'venmoSdkSession']; |
| 341 | 340 | } |
| 342 | 341 | |
| 342 | + /** |
|
| 343 | + * @param string[] $options |
|
| 344 | + */ |
|
| 343 | 345 | private static function baseSignature($options) |
| 344 | 346 | { |
| 345 | 347 | return [ |
@@ -423,7 +425,6 @@ discard block |
||
| 423 | 425 | * verifies that a valid credit card identifier is being used |
| 424 | 426 | * @ignore |
| 425 | 427 | * @param string $identifier |
| 426 | - * @param Optional $string $identifierType type of identifier supplied, default "token" |
|
| 427 | 428 | * @throws InvalidArgumentException |
| 428 | 429 | */ |
| 429 | 430 | private function _validateId($identifier = null, $identifierType = "token") |
@@ -444,8 +445,9 @@ discard block |
||
| 444 | 445 | * sends the update request to the gateway |
| 445 | 446 | * |
| 446 | 447 | * @ignore |
| 447 | - * @param string $url |
|
| 448 | 448 | * @param array $params |
| 449 | + * @param string $httpVerb |
|
| 450 | + * @param string $subPath |
|
| 449 | 451 | * @return mixed |
| 450 | 452 | */ |
| 451 | 453 | private function _doUpdate($httpVerb, $subPath, $params) |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | { |
| 39 | 39 | /** |
| 40 | 40 | * |
| 41 | - * @return Customer[] |
|
| 41 | + * @return ResourceCollection |
|
| 42 | 42 | */ |
| 43 | 43 | public static function all() |
| 44 | 44 | { |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | * @throws Exception\Unexpected |
| 191 | 191 | * @param int $customerId |
| 192 | 192 | * @param array $attributes |
| 193 | - * @return CustomerGateway |
|
| 193 | + * @return Customer |
|
| 194 | 194 | */ |
| 195 | 195 | public static function updateNoValidate($customerId, $attributes) |
| 196 | 196 | { |
@@ -21,6 +21,9 @@ discard block |
||
| 21 | 21 | private $_config; |
| 22 | 22 | private $_http; |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param Gateway $gateway |
|
| 26 | + */ |
|
| 24 | 27 | public function __construct($gateway) |
| 25 | 28 | { |
| 26 | 29 | $this->_gateway = $gateway; |
@@ -42,6 +45,10 @@ discard block |
||
| 42 | 45 | return new ResourceCollection($response, $pager); |
| 43 | 46 | } |
| 44 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $query |
|
| 50 | + * @param integer[] $ids |
|
| 51 | + */ |
|
| 45 | 52 | public function fetch($query, $ids) |
| 46 | 53 | { |
| 47 | 54 | $criteria = []; |
@@ -108,7 +115,7 @@ discard block |
||
| 108 | 115 | * |
| 109 | 116 | * @deprecated since version 2.3.0 |
| 110 | 117 | * @access public |
| 111 | - * @param array $attribs |
|
| 118 | + * @param string $queryString |
|
| 112 | 119 | * @return Customer |
| 113 | 120 | */ |
| 114 | 121 | public function createFromTransparentRedirect($queryString) |
@@ -190,6 +197,7 @@ discard block |
||
| 190 | 197 | * |
| 191 | 198 | * @access public |
| 192 | 199 | * @param string id customer Id |
| 200 | + * @param string $id |
|
| 193 | 201 | * @return Customer|boolean The customer object or false if the request fails. |
| 194 | 202 | * @throws Exception\NotFound |
| 195 | 203 | */ |
@@ -297,7 +305,7 @@ discard block |
||
| 297 | 305 | * If <b>query</b> is a hash, the search will be an advanced search. |
| 298 | 306 | * For more detailed information and examples, see {@link http://www.braintreepayments.com/gateway/customer-api#searching http://www.braintreepaymentsolutions.com/gateway/customer-api} |
| 299 | 307 | * |
| 300 | - * @param mixed $query search query |
|
| 308 | + * @param string $query search query |
|
| 301 | 309 | * @return ResourceCollection |
| 302 | 310 | * @throws InvalidArgumentException |
| 303 | 311 | */ |
@@ -584,6 +592,7 @@ discard block |
||
| 584 | 592 | * @ignore |
| 585 | 593 | * @param string $subPath |
| 586 | 594 | * @param array $params |
| 595 | + * @param string $httpVerb |
|
| 587 | 596 | * @return mixed |
| 588 | 597 | */ |
| 589 | 598 | private function _doUpdate($httpVerb, $subPath, $params) |
@@ -26,6 +26,9 @@ |
||
| 26 | 26 | return hash_hmac('sha256', $string, hash('sha256', $key, true)); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | + /** |
|
| 30 | + * @param string $right |
|
| 31 | + */ |
|
| 29 | 32 | public static function secureCompare($left, $right) |
| 30 | 33 | { |
| 31 | 34 | if (strlen($left) != strlen($right)) { |
@@ -68,6 +68,9 @@ |
||
| 68 | 68 | return $this->forKey("index" . $index); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param string $key |
|
| 73 | + */ |
|
| 71 | 74 | public function forKey($key) |
| 72 | 75 | { |
| 73 | 76 | return isset($this->_nested[$key]) ? $this->_nested[$key] : null; |
@@ -17,6 +17,9 @@ discard block |
||
| 17 | 17 | $this->_config = $config; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | + /** |
|
| 21 | + * @param string $path |
|
| 22 | + */ |
|
| 20 | 23 | public function delete($path) |
| 21 | 24 | { |
| 22 | 25 | $response = $this->_doRequest('DELETE', $path); |
@@ -27,6 +30,9 @@ discard block |
||
| 27 | 30 | } |
| 28 | 31 | } |
| 29 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $path |
|
| 35 | + */ |
|
| 30 | 36 | public function get($path) |
| 31 | 37 | { |
| 32 | 38 | $response = $this->_doRequest('GET', $path); |
@@ -37,6 +43,9 @@ discard block |
||
| 37 | 43 | } |
| 38 | 44 | } |
| 39 | 45 | |
| 46 | + /** |
|
| 47 | + * @param string $path |
|
| 48 | + */ |
|
| 40 | 49 | public function post($path, $params = null) |
| 41 | 50 | { |
| 42 | 51 | $response = $this->_doRequest('POST', $path, $this->_buildXml($params)); |
@@ -48,6 +57,9 @@ discard block |
||
| 48 | 57 | } |
| 49 | 58 | } |
| 50 | 59 | |
| 60 | + /** |
|
| 61 | + * @param string $path |
|
| 62 | + */ |
|
| 51 | 63 | public function put($path, $params = null) |
| 52 | 64 | { |
| 53 | 65 | $response = $this->_doRequest('PUT', $path, $this->_buildXml($params)); |
@@ -96,11 +108,18 @@ discard block |
||
| 96 | 108 | $this->_useClientCredentials = true; |
| 97 | 109 | } |
| 98 | 110 | |
| 111 | + /** |
|
| 112 | + * @param string $httpVerb |
|
| 113 | + * @param string $requestBody |
|
| 114 | + */ |
|
| 99 | 115 | private function _doRequest($httpVerb, $path, $requestBody = null) |
| 100 | 116 | { |
| 101 | 117 | return $this->_doUrlRequest($httpVerb, $this->_config->baseUrl() . $path, $requestBody); |
| 102 | 118 | } |
| 103 | 119 | |
| 120 | + /** |
|
| 121 | + * @param string $url |
|
| 122 | + */ |
|
| 104 | 123 | public function _doUrlRequest($httpVerb, $url, $requestBody = null) |
| 105 | 124 | { |
| 106 | 125 | $curl = curl_init(); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | * initializes instance properties from the keys/values of an array |
| 53 | 53 | * @ignore |
| 54 | 54 | * @access protected |
| 55 | - * @param <type> $aAttribs array of properties to set - single level |
|
| 55 | + * @param <type> $attributes array of properties to set - single level |
|
| 56 | 56 | * @return none |
| 57 | 57 | */ |
| 58 | 58 | private function _initializeFromArray($attributes) |