@@ -17,27 +17,27 @@ |
||
| 17 | 17 | protected $AdditionalInformation; |
| 18 | 18 | |
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * @param string $Ref |
|
| 22 | - * |
|
| 23 | - * @return $this |
|
| 24 | - */ |
|
| 25 | - public function setRef(string $Ref) |
|
| 26 | - { |
|
| 27 | - $this->Ref = $Ref; |
|
| 28 | - |
|
| 29 | - return $this; |
|
| 30 | - } |
|
| 31 | - |
|
| 32 | - public function getRef() |
|
| 33 | - { |
|
| 34 | - if (!$this->Ref) { |
|
| 35 | - return $this; |
|
| 36 | - } |
|
| 37 | - $this->methodProperties['Ref'] = $this->Ref; |
|
| 38 | - |
|
| 39 | - return $this; |
|
| 40 | - } |
|
| 20 | + /** |
|
| 21 | + * @param string $Ref |
|
| 22 | + * |
|
| 23 | + * @return $this |
|
| 24 | + */ |
|
| 25 | + public function setRef(string $Ref) |
|
| 26 | + { |
|
| 27 | + $this->Ref = $Ref; |
|
| 28 | + |
|
| 29 | + return $this; |
|
| 30 | + } |
|
| 31 | + |
|
| 32 | + public function getRef() |
|
| 33 | + { |
|
| 34 | + if (!$this->Ref) { |
|
| 35 | + return $this; |
|
| 36 | + } |
|
| 37 | + $this->methodProperties['Ref'] = $this->Ref; |
|
| 38 | + |
|
| 39 | + return $this; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * @param string $PayerType |
@@ -10,23 +10,23 @@ |
||
| 10 | 10 | protected $calledMethod; |
| 11 | 11 | protected $methodProperties = null; |
| 12 | 12 | |
| 13 | - /** |
|
| 14 | - * printDocument method of InternetDocument model. |
|
| 15 | - * |
|
| 16 | - * @param array|string $DocumentRefs Array of Documents IDs |
|
| 17 | - * @param string $type (pdf|html) |
|
| 18 | - * |
|
| 19 | - * @return mixed |
|
| 20 | - */ |
|
| 21 | - public function printDocument($DocumentRefs, $type = 'html') |
|
| 22 | - { |
|
| 23 | - if (is_array($DocumentRefs) === false) { |
|
| 24 | - $DocumentRefs = explode(', ', /** @scrutinizer ignore-type */ $DocumentRefs); |
|
| 25 | - } |
|
| 13 | + /** |
|
| 14 | + * printDocument method of InternetDocument model. |
|
| 15 | + * |
|
| 16 | + * @param array|string $DocumentRefs Array of Documents IDs |
|
| 17 | + * @param string $type (pdf|html) |
|
| 18 | + * |
|
| 19 | + * @return mixed |
|
| 20 | + */ |
|
| 21 | + public function printDocument($DocumentRefs, $type = 'html') |
|
| 22 | + { |
|
| 23 | + if (is_array($DocumentRefs) === false) { |
|
| 24 | + $DocumentRefs = explode(', ', /** @scrutinizer ignore-type */ $DocumentRefs); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - $orders = "orders[]/" . implode("/orders[]/", $DocumentRefs); |
|
| 28 | - $this->calledMethod = 'printDocument/' . $orders . '/type/' . $type . '/apiKey/' . $this->getApi(); |
|
| 27 | + $orders = "orders[]/" . implode("/orders[]/", $DocumentRefs); |
|
| 28 | + $this->calledMethod = 'printDocument/' . $orders . '/type/' . $type . '/apiKey/' . $this->getApi(); |
|
| 29 | 29 | |
| 30 | - return $this->getResponse($this->model, $this->calledMethod, $this->methodProperties); |
|
| 31 | - } |
|
| 30 | + return $this->getResponse($this->model, $this->calledMethod, $this->methodProperties); |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -24,8 +24,8 @@ |
||
| 24 | 24 | $DocumentRefs = explode(', ', /** @scrutinizer ignore-type */ $DocumentRefs); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - $orders = "orders[]/" . implode("/orders[]/", $DocumentRefs); |
|
| 28 | - $this->calledMethod = 'printDocument/' . $orders . '/type/' . $type . '/apiKey/' . $this->getApi(); |
|
| 27 | + $orders = "orders[]/".implode("/orders[]/", $DocumentRefs); |
|
| 28 | + $this->calledMethod = 'printDocument/'.$orders.'/type/'.$type.'/apiKey/'.$this->getApi(); |
|
| 29 | 29 | |
| 30 | 30 | return $this->getResponse($this->model, $this->calledMethod, $this->methodProperties); |
| 31 | 31 | } |
@@ -101,8 +101,8 @@ |
||
| 101 | 101 | $success = false; |
| 102 | 102 | $result = null; |
| 103 | 103 | } elseif ($response) { |
| 104 | - $success = true; |
|
| 105 | - $result = $response; |
|
| 104 | + $success = true; |
|
| 105 | + $result = $response; |
|
| 106 | 106 | } else { |
| 107 | 107 | $success = $answer['success']; |
| 108 | 108 | $result = $answer['data']; |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function getApi() |
| 34 | 34 | { |
| 35 | - if (! $this->api) { |
|
| 35 | + if (!$this->api) { |
|
| 36 | 36 | $this->api = config('novaposhta.api_key'); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - if (! $info && isset($answer['info'])) { |
|
| 127 | + if (!$info && isset($answer['info'])) { |
|
| 128 | 128 | $info = $answer['info']; |
| 129 | 129 | } |
| 130 | 130 | |