@@ -27,6 +27,9 @@ discard block |
||
| 27 | 27 | private $_config; |
| 28 | 28 | private $_http; |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param Gateway $gateway |
|
| 32 | + */ |
|
| 30 | 33 | public function __construct($gateway) |
| 31 | 34 | { |
| 32 | 35 | $this->_gateway = $gateway; |
@@ -118,6 +121,7 @@ discard block |
||
| 118 | 121 | * @ignore |
| 119 | 122 | * @param string $subPath |
| 120 | 123 | * @param array $params |
| 124 | + * @param string $httpVerb |
|
| 121 | 125 | * @return mixed |
| 122 | 126 | */ |
| 123 | 127 | private function _doUpdate($httpVerb, $subPath, $params) |
@@ -160,7 +164,6 @@ discard block |
||
| 160 | 164 | * verifies that a valid paypal account identifier is being used |
| 161 | 165 | * @ignore |
| 162 | 166 | * @param string $identifier |
| 163 | - * @param Optional $string $identifierType type of identifier supplied, default 'token' |
|
| 164 | 167 | * @throws InvalidArgumentException |
| 165 | 168 | */ |
| 166 | 169 | private function _validateId($identifier = null, $identifierType = 'token') |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | /** |
| 45 | 45 | * @ignore |
| 46 | 46 | * @param array|null $objsToReturn |
| 47 | - * @param array|null $propertyNames |
|
| 47 | + * @param string $propertyNames |
|
| 48 | 48 | */ |
| 49 | 49 | public function __construct($objsToReturn = [], $propertyNames = []) |
| 50 | 50 | { |
@@ -16,9 +16,7 @@ discard block |
||
| 16 | 16 | /** |
| 17 | 17 | * settle a transaction by id in sandbox |
| 18 | 18 | * |
| 19 | - * @param string $id transaction id |
|
| 20 | - * @param Configuration $config gateway config |
|
| 21 | - * @return Transaction |
|
| 19 | + * @return \Braintree\Transaction |
|
| 22 | 20 | */ |
| 23 | 21 | public static function settle($transactionId) |
| 24 | 22 | { |
@@ -28,9 +26,7 @@ discard block |
||
| 28 | 26 | /** |
| 29 | 27 | * settlement confirm a transaction by id in sandbox |
| 30 | 28 | * |
| 31 | - * @param string $id transaction id |
|
| 32 | - * @param Configuration $config gateway config |
|
| 33 | - * @return Transaction |
|
| 29 | + * @return \Braintree\Transaction |
|
| 34 | 30 | */ |
| 35 | 31 | public static function settlementConfirm($transactionId) |
| 36 | 32 | { |
@@ -40,9 +36,7 @@ discard block |
||
| 40 | 36 | /** |
| 41 | 37 | * settlement decline a transaction by id in sandbox |
| 42 | 38 | * |
| 43 | - * @param string $id transaction id |
|
| 44 | - * @param Configuration $config gateway config |
|
| 45 | - * @return Transaction |
|
| 39 | + * @return \Braintree\Transaction |
|
| 46 | 40 | */ |
| 47 | 41 | public static function settlementDecline($transactionId) |
| 48 | 42 | { |
@@ -52,9 +46,7 @@ discard block |
||
| 52 | 46 | /** |
| 53 | 47 | * settlement pending a transaction by id in sandbox |
| 54 | 48 | * |
| 55 | - * @param string $id transaction id |
|
| 56 | - * @param Configuration $config gateway config |
|
| 57 | - * @return Transaction |
|
| 49 | + * @return \Braintree\Transaction |
|
| 58 | 50 | */ |
| 59 | 51 | public static function settlementPending($transactionId) |
| 60 | 52 | { |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | - /** @return void|Braintree\Customer */ |
|
| 436 | + /** @return null|Customer */ |
|
| 437 | 437 | public function vaultCustomer() |
| 438 | 438 | { |
| 439 | 439 | $customerId = $this->customerDetails->id; |
@@ -507,6 +507,9 @@ discard block |
||
| 507 | 507 | return Configuration::gateway()->transaction()->saleNoValidate($attribs); |
| 508 | 508 | } |
| 509 | 509 | |
| 510 | + /** |
|
| 511 | + * @param MultipleValueNode[] $query |
|
| 512 | + */ |
|
| 510 | 513 | public static function search($query) |
| 511 | 514 | { |
| 512 | 515 | return Configuration::gateway()->transaction()->search($query); |
@@ -23,6 +23,9 @@ discard block |
||
| 23 | 23 | private $_config; |
| 24 | 24 | private $_http; |
| 25 | 25 | |
| 26 | + /** |
|
| 27 | + * @param Gateway $gateway |
|
| 28 | + */ |
|
| 26 | 29 | public function __construct($gateway) |
| 27 | 30 | { |
| 28 | 31 | $this->_gateway = $gateway; |
@@ -65,7 +68,6 @@ discard block |
||
| 65 | 68 | * |
| 66 | 69 | * @deprecated since version 2.3.0 |
| 67 | 70 | * @access public |
| 68 | - * @param array $attribs |
|
| 69 | 71 | * @return object |
| 70 | 72 | */ |
| 71 | 73 | public function createFromTransparentRedirect($queryString) |
@@ -304,7 +306,6 @@ discard block |
||
| 304 | 306 | * For more detailed information and examples, see {@link http://www.braintreepayments.com/gateway/transaction-api#searching http://www.braintreepaymentsolutions.com/gateway/transaction-api} |
| 305 | 307 | * |
| 306 | 308 | * @param mixed $query search query |
| 307 | - * @param array $options options such as page number |
|
| 308 | 309 | * @return ResourceCollection |
| 309 | 310 | * @throws InvalidArgumentException |
| 310 | 311 | */ |
@@ -349,7 +350,6 @@ discard block |
||
| 349 | 350 | /** |
| 350 | 351 | * void a transaction by id |
| 351 | 352 | * |
| 352 | - * @param string $id transaction id |
|
| 353 | 353 | * @return Result\Successful|Result\Error |
| 354 | 354 | */ |
| 355 | 355 | public function void($transactionId) |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | * sends the create request to the gateway |
| 458 | 458 | * |
| 459 | 459 | * @ignore |
| 460 | - * @param var $subPath |
|
| 460 | + * @param string $subPath |
|
| 461 | 461 | * @param array $params |
| 462 | 462 | * @return mixed |
| 463 | 463 | */ |
@@ -27,6 +27,9 @@ |
||
| 27 | 27 | private $_config; |
| 28 | 28 | private $_http; |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param Gateway $gateway |
|
| 32 | + */ |
|
| 30 | 33 | public function __construct($gateway) |
| 31 | 34 | { |
| 32 | 35 | $this->_gateway = $gateway; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * removes the header from a classname |
| 103 | 103 | * |
| 104 | 104 | * @param string $name ClassName |
| 105 | - * @return camelCased classname minus header |
|
| 105 | + * @return string classname minus header |
|
| 106 | 106 | */ |
| 107 | 107 | public static function cleanClassName($name) |
| 108 | 108 | { |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | * @param array $array associative array to implode |
| 292 | 292 | * @param string $separator (optional, defaults to =) |
| 293 | 293 | * @param string $glue (optional, defaults to ', ') |
| 294 | - * @return bool |
|
| 294 | + * @return string|false |
|
| 295 | 295 | */ |
| 296 | 296 | public static function implodeAssociativeArray($array, $separator = '=', $glue = ', ') |
| 297 | 297 | { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * |
| 59 | 59 | * @access protected |
| 60 | 60 | * @static |
| 61 | - * @param object $writer XMLWriter object |
|
| 61 | + * @param XMLWriter $writer XMLWriter object |
|
| 62 | 62 | * @param array $aData contains attributes and values |
| 63 | 63 | * @return void |
| 64 | 64 | */ |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | /** |
| 126 | 126 | * converts datetime back to xml schema format |
| 127 | 127 | * @access protected |
| 128 | - * @param object $dateTime |
|
| 128 | + * @param DateTime $dateTime |
|
| 129 | 129 | * @return string XML schema formatted timestamp |
| 130 | 130 | */ |
| 131 | 131 | private static function _dateTimeToXmlTimestamp($dateTime) |
@@ -171,6 +171,9 @@ discard block |
||
| 171 | 171 | return false; |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | + /** |
|
| 175 | + * @param string $info |
|
| 176 | + */ |
|
| 174 | 177 | function getModuleInfo($module, $info) { |
| 175 | 178 | $class = 'OSCOM_Braintree_' . $module; |
| 176 | 179 | |
@@ -357,6 +360,10 @@ discard block |
||
| 357 | 360 | return $result; |
| 358 | 361 | } |
| 359 | 362 | |
| 363 | + /** |
|
| 364 | + * @param string $link |
|
| 365 | + * @param string $type |
|
| 366 | + */ |
|
| 360 | 367 | function drawButton($title = null, $link = null, $type = null, $params = null, $force_css = false) { |
| 361 | 368 | $colours = array('success' => '#1cb841', |
| 362 | 369 | 'error' => '#ca3c3c', |
@@ -413,6 +420,9 @@ discard block |
||
| 413 | 420 | return $button; |
| 414 | 421 | } |
| 415 | 422 | |
| 423 | + /** |
|
| 424 | + * @param integer $length |
|
| 425 | + */ |
|
| 416 | 426 | function createRandomValue($length, $type = 'mixed') { |
| 417 | 427 | if ( ($type != 'mixed') && ($type != 'chars') && ($type != 'digits')) $type = 'mixed'; |
| 418 | 428 | |
@@ -657,6 +667,9 @@ discard block |
||
| 657 | 667 | } |
| 658 | 668 | } |
| 659 | 669 | |
| 670 | + /** |
|
| 671 | + * @param string $filename |
|
| 672 | + */ |
|
| 660 | 673 | public function loadLanguageFile($filename, $lang = null) { |
| 661 | 674 | global $language; |
| 662 | 675 | |
@@ -698,6 +711,9 @@ discard block |
||
| 698 | 711 | } |
| 699 | 712 | } |
| 700 | 713 | |
| 714 | + /** |
|
| 715 | + * @param string $key |
|
| 716 | + */ |
|
| 701 | 717 | function getDef($key, $values = null) { |
| 702 | 718 | $def = isset($this->_definitions[$key]) ? $this->_definitions[$key] : $key; |
| 703 | 719 | |