@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | /** |
419 | 419 | * Unique identifier of the application that will be carried out the request. |
420 | 420 | * |
421 | - * @return mixed |
|
421 | + * @return string |
|
422 | 422 | */ |
423 | 423 | public function getClientId() |
424 | 424 | { |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | /** |
443 | 443 | * Client Redirect URI. |
444 | 444 | * |
445 | - * @return mixed |
|
445 | + * @return string |
|
446 | 446 | */ |
447 | 447 | public function getRedirectUri() |
448 | 448 | { |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | } |
525 | 525 | |
526 | 526 | /** |
527 | - * @return mixed |
|
527 | + * @return string |
|
528 | 528 | */ |
529 | 529 | public function getClientSecret() |
530 | 530 | { |
@@ -562,7 +562,7 @@ |
||
562 | 562 | * |
563 | 563 | * @param Requests_Hooks $hooks Hook system |
564 | 564 | */ |
565 | - public function register(Requests_Hooks &$hooks) |
|
565 | + public function register(Requests_Hooks & $hooks) |
|
566 | 566 | { |
567 | 567 | // TODO: Implement register() method. |
568 | 568 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | /** |
61 | 61 | * Create a new aurhentication with the endpoint. |
62 | 62 | * |
63 | - * @param \Moip\Auth\MoipAuthentication $moipAuthentication |
|
63 | + * @param Authentication $moipAuthentication |
|
64 | 64 | * @param string $endpoint |
65 | 65 | */ |
66 | 66 | public function __construct(Authentication $moipAuthentication, $endpoint = self::ENDPOINT_PRODUCTION) |
@@ -144,7 +144,7 @@ |
||
144 | 144 | /** |
145 | 145 | * Creates a account. |
146 | 146 | * |
147 | - * @return Account |
|
147 | + * @return \stdClass |
|
148 | 148 | */ |
149 | 149 | public function createAccount() |
150 | 150 | { |
@@ -163,10 +163,10 @@ |
||
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
166 | - * Method to read JSON from a file. |
|
167 | - * |
|
168 | - * @param string $filename location of file |
|
169 | - */ |
|
166 | + * Method to read JSON from a file. |
|
167 | + * |
|
168 | + * @param string $filename location of file |
|
169 | + */ |
|
170 | 170 | public function readJsonFile($filename) |
171 | 171 | { |
172 | 172 | return file_get_contents("$filename.json", FILE_USE_INCLUDE_PATH); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * |
38 | 38 | * @param \Requests_Hooks $hooks Hook system |
39 | 39 | */ |
40 | - public function register(Requests_Hooks &$hooks) |
|
40 | + public function register(Requests_Hooks & $hooks) |
|
41 | 41 | { |
42 | 42 | $hooks->register('requests.before_request', [&$this, 'before_request']); |
43 | 43 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * |
38 | 38 | * @param \Requests_Hooks $hooks Hook system |
39 | 39 | */ |
40 | - public function register(Requests_Hooks &$hooks) |
|
40 | + public function register(Requests_Hooks & $hooks) |
|
41 | 41 | { |
42 | 42 | $hooks->register('requests.before_request', [&$this, 'before_request']); |
43 | 43 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $order = $this->createOrder()->create(); |
13 | 13 | $this->mockHttpSession($this->body_billet_pay); |
14 | 14 | $payment = $order->payments() |
15 | - ->setBoleto(new \DateTime('today +1day'),'http://dev.moip.com.br/images/logo-header-moip.png') |
|
15 | + ->setBoleto(new \DateTime('today +1day'), 'http://dev.moip.com.br/images/logo-header-moip.png') |
|
16 | 16 | ->execute(); |
17 | 17 | $this->mockHttpSession(''); |
18 | 18 | $payment->authorize(); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $order = $this->createOrder()->create(); |
29 | 29 | $this->mockHttpSession($this->body_billet_pay); |
30 | 30 | $payment = $order->payments() |
31 | - ->setBoleto(new \DateTime('today +1day'),'http://dev.moip.com.br/images/logo-header-moip.png') |
|
31 | + ->setBoleto(new \DateTime('today +1day'), 'http://dev.moip.com.br/images/logo-header-moip.png') |
|
32 | 32 | ->execute(); |
33 | 33 | $this->mockHttpSession(''); |
34 | 34 | $payment->authorize(); |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * @param $key |
|
94 | - * @param $fmt |
|
93 | + * @param string $key |
|
94 | + * @param string $fmt |
|
95 | 95 | * @param stdClass|null $data |
96 | 96 | * |
97 | - * @return bool|\DateTime|null |
|
97 | + * @return \DateTime|null |
|
98 | 98 | */ |
99 | 99 | protected function getIfSetDateFmt($key, $fmt, stdClass $data = null) |
100 | 100 | { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | /** |
152 | 152 | * Generate URL to request. |
153 | 153 | * |
154 | - * @param $action |
|
154 | + * @param string $action |
|
155 | 155 | * @param $id |
156 | 156 | * |
157 | 157 | * @return string |
@@ -243,9 +243,9 @@ discard block |
||
243 | 243 | /** |
244 | 244 | * Delete a new item in Moip. |
245 | 245 | * |
246 | - * @param $path |
|
246 | + * @param string $path |
|
247 | 247 | * |
248 | - * @return mixed |
|
248 | + * @return stdClass |
|
249 | 249 | */ |
250 | 250 | public function deleteByPath($path) |
251 | 251 | { |
@@ -272,10 +272,10 @@ |
||
272 | 272 | * |
273 | 273 | * @return stdClass |
274 | 274 | */ |
275 | - public function getByPathNoPopulate($path) |
|
276 | - { |
|
277 | - return $this->httpRequest($path, Requests::GET); |
|
278 | - } |
|
275 | + public function getByPathNoPopulate($path) |
|
276 | + { |
|
277 | + return $this->httpRequest($path, Requests::GET); |
|
278 | + } |
|
279 | 279 | |
280 | 280 | /** |
281 | 281 | * Create a new item in Moip. |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | /** |
447 | 447 | * Create a new Orders list instance. |
448 | 448 | * |
449 | - * @return \Moip\Resource\OrdersList |
|
449 | + * @return stdClass |
|
450 | 450 | */ |
451 | 451 | public function getList(Pagination $pagination = null, Filters $filters = null, $qParam = '') |
452 | 452 | { |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | /** |
619 | 619 | * Set installment settings for checkout preferences. |
620 | 620 | * |
621 | - * @param array $quantity |
|
621 | + * @param integer[] $quantity |
|
622 | 622 | * @param int $discountValue |
623 | 623 | * @param int $additionalValue |
624 | 624 | * |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | * |
137 | 137 | * @param string $tax_document |
138 | 138 | * |
139 | - * @return stdClass |
|
139 | + * @return boolean |
|
140 | 140 | */ |
141 | 141 | public function checkAccountExists($tax_document) |
142 | 142 | { |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | /** |
374 | 374 | * Set birth date from account. |
375 | 375 | * |
376 | - * @param \DateTime|string $birthDate Date of birth of the credit card holder. |
|
376 | + * @param string $birthDate Date of birth of the credit card holder. |
|
377 | 377 | * |
378 | 378 | * @return \Moip\Resource\Account |
379 | 379 | */ |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * |
430 | 430 | * @param string $number Número do documento. |
431 | 431 | * @param string $issuer Emissor do documento. |
432 | - * @param $issueDate |
|
432 | + * @param string $issueDate |
|
433 | 433 | * @param string $type Tipo do documento. Valores possíveis: RG. |
434 | 434 | * |
435 | 435 | * @return Account |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | /** |
563 | 563 | * Set company opening date. |
564 | 564 | * |
565 | - * @param \DateTime|string $openingDate . |
|
565 | + * @param string $openingDate . |
|
566 | 566 | * |
567 | 567 | * @return $this |
568 | 568 | */ |
@@ -597,8 +597,9 @@ discard block |
||
597 | 597 | /** |
598 | 598 | * Set company tax document. |
599 | 599 | * |
600 | - * @param string $documentNumber . |
|
601 | 600 | * |
601 | + * @param string $cnae |
|
602 | + * @param string $description |
|
602 | 603 | * @return $this |
603 | 604 | */ |
604 | 605 | public function setCompanyMainActivity($cnae, $description) |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | * |
139 | 139 | * @return stdClass |
140 | 140 | */ |
141 | - public function checkAccountExists($tax_document) |
|
142 | - { |
|
141 | + public function checkAccountExists($tax_document) |
|
142 | + { |
|
143 | 143 | try { |
144 | 144 | $this->getByPathNoPopulate(sprintf('/%s/%s/%s?tax_document=%s', MoipResource::VERSION, self::PATH, 'exists', $tax_document)); |
145 | 145 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | } |
152 | 152 | return false; |
153 | - } |
|
153 | + } |
|
154 | 154 | |
155 | 155 | /** |
156 | 156 | * Get account id. |