@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * Get the class "basename" of the given object / class. |
15 | 15 | * |
16 | - * @param string|object $class |
|
16 | + * @param string $class |
|
17 | 17 | * @return string |
18 | 18 | */ |
19 | 19 | public static function classBaseName($class): string |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace AcquiroPay\Helpers; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace AcquiroPay\Contracts; |
6 | 6 | |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | |
20 | 20 | public function getProducts(array $parameters = []): Collection; |
21 | 21 | |
22 | - public function getCountry(int $id, array $parameters = []): ?Country; |
|
22 | + public function getCountry(int $id, array $parameters = []): ? Country; |
|
23 | 23 | |
24 | - public function getCurrency(int $id, array $parameters = []): ?Currency; |
|
24 | + public function getCurrency(int $id, array $parameters = []): ? Currency; |
|
25 | 25 | |
26 | - public function getProduct(int $id, array $parameters = []): ?Product; |
|
26 | + public function getProduct(int $id, array $parameters = []): ? Product; |
|
27 | 27 | |
28 | - public function getSite(int $productId, array $parameters = []): ?Site; |
|
28 | + public function getSite(int $productId, array $parameters = []): ? Site; |
|
29 | 29 | |
30 | - public function getMerchant(int $productId, array $parameters = []): ?Merchant; |
|
30 | + public function getMerchant(int $productId, array $parameters = []): ? Merchant; |
|
31 | 31 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace AcquiroPay\Services; |
6 | 6 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @param array $parameters |
72 | 72 | * @return Country|null |
73 | 73 | */ |
74 | - public function getCountry(int $id, array $parameters = []): ?Country |
|
74 | + public function getCountry(int $id, array $parameters = []): ? Country |
|
75 | 75 | { |
76 | 76 | return $this->getEntity(new Country(), $id, $parameters); |
77 | 77 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @param array $parameters |
84 | 84 | * @return Currency|null |
85 | 85 | */ |
86 | - public function getCurrency(int $id, array $parameters = []): ?Currency |
|
86 | + public function getCurrency(int $id, array $parameters = []): ? Currency |
|
87 | 87 | { |
88 | 88 | return $this->getEntity(new Currency(), $id, $parameters); |
89 | 89 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * @param array $parameters |
96 | 96 | * @return Product|null |
97 | 97 | */ |
98 | - public function getProduct(int $id, array $parameters = []): ?Product |
|
98 | + public function getProduct(int $id, array $parameters = []): ? Product |
|
99 | 99 | { |
100 | 100 | return $this->getEntity(new Product(), $id, $parameters); |
101 | 101 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * @param array $parameters |
108 | 108 | * @return Site|null |
109 | 109 | */ |
110 | - public function getSite(int $productId, array $parameters = []): ?Site |
|
110 | + public function getSite(int $productId, array $parameters = []): ? Site |
|
111 | 111 | { |
112 | 112 | $url = $this->resource(Product::class).'/'.$productId.'/site'; |
113 | 113 | $resp = $this->makeGetRequest($url, $parameters); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @param array $parameters |
123 | 123 | * @return Merchant|null |
124 | 124 | */ |
125 | - public function getMerchant(int $productId, array $parameters = []): ?Merchant |
|
125 | + public function getMerchant(int $productId, array $parameters = []): ? Merchant |
|
126 | 126 | { |
127 | 127 | $url = $this->resource(Merchant::class).'/'.$productId.'/merchant'; |
128 | 128 | $resp = $this->makeGetRequest($url, $parameters); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | return collect(); |
177 | 177 | } |
178 | 178 | |
179 | - protected function getEntity(Entity $entity, $id, array $params): ?Entity |
|
179 | + protected function getEntity(Entity $entity, $id, array $params): ? Entity |
|
180 | 180 | { |
181 | 181 | $resp = $this->get(get_class($entity), $id, $params); |
182 | 182 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | return Str::lower($value); |
213 | 213 | } |
214 | 214 | |
215 | - protected function response2Entity($resp, Entity $entity): ?Entity |
|
215 | + protected function response2Entity($resp, Entity $entity): ? Entity |
|
216 | 216 | { |
217 | 217 | if (isset($resp->result)) { |
218 | 218 | $this->mapper->map($resp->result, $entity); |