@@ -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 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @param array $parameters |
| 79 | 79 | * @return Country|null |
| 80 | 80 | */ |
| 81 | - public function getCountry(int $id, array $parameters = []): ?Country |
|
| 81 | + public function getCountry(int $id, array $parameters = []): ? Country |
|
| 82 | 82 | { |
| 83 | 83 | return $this->getEntity(new Country(), $id, $parameters); |
| 84 | 84 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * @param array $parameters |
| 91 | 91 | * @return Currency|null |
| 92 | 92 | */ |
| 93 | - public function getCurrency(int $id, array $parameters = []): ?Currency |
|
| 93 | + public function getCurrency(int $id, array $parameters = []): ? Currency |
|
| 94 | 94 | { |
| 95 | 95 | return $this->getEntity(new Currency(), $id, $parameters); |
| 96 | 96 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @param array $parameters |
| 103 | 103 | * @return Product|null |
| 104 | 104 | */ |
| 105 | - public function getProduct(int $id, array $parameters = []): ?Product |
|
| 105 | + public function getProduct(int $id, array $parameters = []): ? Product |
|
| 106 | 106 | { |
| 107 | 107 | return $this->getEntity(new Product(), $id, $parameters); |
| 108 | 108 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @param array $parameters |
| 115 | 115 | * @return Site|null |
| 116 | 116 | */ |
| 117 | - public function getSite(int $productId, array $parameters = []): ?Site |
|
| 117 | + public function getSite(int $productId, array $parameters = []): ? Site |
|
| 118 | 118 | { |
| 119 | 119 | $url = $this->resources[Product::class].'/'.$productId.'/site'; |
| 120 | 120 | $resp = $this->makeGetRequest($url, $parameters); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * @param array $parameters |
| 130 | 130 | * @return Merchant|null |
| 131 | 131 | */ |
| 132 | - public function getMerchant(int $productId, array $parameters = []): ?Merchant |
|
| 132 | + public function getMerchant(int $productId, array $parameters = []): ? Merchant |
|
| 133 | 133 | { |
| 134 | 134 | $url = $this->resources[Merchant::class].'/'.$productId.'/merchant'; |
| 135 | 135 | $resp = $this->makeGetRequest($url, $parameters); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | return collect(); |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | - protected function getEntity(Entity $entity, $id, array $params): ?Entity |
|
| 186 | + protected function getEntity(Entity $entity, $id, array $params): ? Entity |
|
| 187 | 187 | { |
| 188 | 188 | $resp = $this->get(get_class($entity), $id, $params); |
| 189 | 189 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | return $response ?? new stdClass(); |
| 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); |