@@ -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\Contracts; |
| 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\Services; |
| 6 | 6 | |
@@ -58,9 +58,9 @@ discard block |
||
| 58 | 58 | * @param array $parameters |
| 59 | 59 | * @return Country|null |
| 60 | 60 | */ |
| 61 | - public function getCountry(int $id, array $parameters = []): ?Country |
|
| 61 | + public function getCountry(int $id, array $parameters = []): ? Country |
|
| 62 | 62 | { |
| 63 | - $response = $this->makeRequest('GET', 'countries/' . $id, $parameters); |
|
| 63 | + $response = $this->makeRequest('GET', 'countries/'.$id, $parameters); |
|
| 64 | 64 | |
| 65 | 65 | return $this->transform($response->result, Country::class); |
| 66 | 66 | } |
@@ -85,9 +85,9 @@ discard block |
||
| 85 | 85 | * @param array $parameters |
| 86 | 86 | * @return Currency|null |
| 87 | 87 | */ |
| 88 | - public function getCurrency(int $id, array $parameters = []): ?Currency |
|
| 88 | + public function getCurrency(int $id, array $parameters = []): ? Currency |
|
| 89 | 89 | { |
| 90 | - $response = $this->makeRequest('GET', 'currencies/' . $id, $parameters); |
|
| 90 | + $response = $this->makeRequest('GET', 'currencies/'.$id, $parameters); |
|
| 91 | 91 | |
| 92 | 92 | return $this->transform($response->result, Currency::class); |
| 93 | 93 | } |
@@ -112,9 +112,9 @@ discard block |
||
| 112 | 112 | * @param array $parameters |
| 113 | 113 | * @return Merchant|null |
| 114 | 114 | */ |
| 115 | - public function getMerchant(int $id, array $parameters = []): ?Merchant |
|
| 115 | + public function getMerchant(int $id, array $parameters = []): ? Merchant |
|
| 116 | 116 | { |
| 117 | - $response = $this->makeRequest('GET', 'merchants/' . $id, $parameters); |
|
| 117 | + $response = $this->makeRequest('GET', 'merchants/'.$id, $parameters); |
|
| 118 | 118 | |
| 119 | 119 | return $this->transform($response->result, Merchant::class); |
| 120 | 120 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | public function getSites(Merchant $merchant, array $parameters = []): Collection |
| 131 | 131 | { |
| 132 | - $response = $this->makeRequest('GET', 'merchants/' . $merchant->getId() . '/sites', $parameters); |
|
| 132 | + $response = $this->makeRequest('GET', 'merchants/'.$merchant->getId().'/sites', $parameters); |
|
| 133 | 133 | |
| 134 | 134 | return $this->transform($response->result->data, Site::class); |
| 135 | 135 | } |
@@ -143,9 +143,9 @@ discard block |
||
| 143 | 143 | * |
| 144 | 144 | * @return Site|null |
| 145 | 145 | */ |
| 146 | - public function getSite(Merchant $merchant, int $id, array $parameters = []): ?Site |
|
| 146 | + public function getSite(Merchant $merchant, int $id, array $parameters = []): ? Site |
|
| 147 | 147 | { |
| 148 | - $response = $this->makeRequest('GET', 'merchants/' . $merchant->getId() . '/sites/' . $id, $parameters); |
|
| 148 | + $response = $this->makeRequest('GET', 'merchants/'.$merchant->getId().'/sites/'.$id, $parameters); |
|
| 149 | 149 | |
| 150 | 150 | return $this->transform($response->result, Site::class); |
| 151 | 151 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | { |
| 163 | 163 | $response = $this->makeRequest( |
| 164 | 164 | 'GET', |
| 165 | - 'merchants/' . $merchant->getId() . '/sites/' . $site->getId() . '/products', |
|
| 165 | + 'merchants/'.$merchant->getId().'/sites/'.$site->getId().'/products', |
|
| 166 | 166 | $parameters |
| 167 | 167 | ); |
| 168 | 168 | |
@@ -178,11 +178,11 @@ discard block |
||
| 178 | 178 | * @param array $parameters |
| 179 | 179 | * @return Product|null |
| 180 | 180 | */ |
| 181 | - public function getProduct(Merchant $merchant, Site $site, int $id, array $parameters = []): ?Product |
|
| 181 | + public function getProduct(Merchant $merchant, Site $site, int $id, array $parameters = []): ? Product |
|
| 182 | 182 | { |
| 183 | 183 | $response = $this->makeRequest( |
| 184 | 184 | 'GET', |
| 185 | - 'merchants/' . $merchant->getId() . '/sites/' . $site->getId() . '/products/' . $id, |
|
| 185 | + 'merchants/'.$merchant->getId().'/sites/'.$site->getId().'/products/'.$id, |
|
| 186 | 186 | $parameters |
| 187 | 187 | ); |
| 188 | 188 | |
@@ -199,8 +199,8 @@ discard block |
||
| 199 | 199 | */ |
| 200 | 200 | protected function makeRequest(string $method, string $url, array $options) |
| 201 | 201 | { |
| 202 | - $response = $this->client->request($method, 'services/entities/' . $url, $options); |
|
| 203 | - $response = (string)$response->getBody()->getContents(); |
|
| 202 | + $response = $this->client->request($method, 'services/entities/'.$url, $options); |
|
| 203 | + $response = (string) $response->getBody()->getContents(); |
|
| 204 | 204 | $response = json_decode($response); |
| 205 | 205 | |
| 206 | 206 | return $response ?? new stdClass(); |
@@ -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\Models\Entities; |
| 6 | 6 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * @return int|null |
| 21 | 21 | */ |
| 22 | - public function getId(): ?int |
|
| 22 | + public function getId(): ? int |
|
| 23 | 23 | { |
| 24 | 24 | return $this->id; |
| 25 | 25 | } |
@@ -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\Models\Entities; |
| 6 | 6 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * @param int $showLanguage |
| 34 | 34 | */ |
| 35 | - public function setShowLanguage(?int $showLanguage) |
|
| 35 | + public function setShowLanguage(? int $showLanguage) |
|
| 36 | 36 | { |
| 37 | 37 | $this->showLanguage = $showLanguage; |
| 38 | 38 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | /** |
| 49 | 49 | * @param string $siteLanguage |
| 50 | 50 | */ |
| 51 | - public function setSiteLanguage(?string $siteLanguage) |
|
| 51 | + public function setSiteLanguage(? string $siteLanguage) |
|
| 52 | 52 | { |
| 53 | 53 | $this->siteLanguage = $siteLanguage; |
| 54 | 54 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | /** |
| 57 | 57 | * @return int|null |
| 58 | 58 | */ |
| 59 | - public function getMerchantId(): ?int |
|
| 59 | + public function getMerchantId(): ? int |
|
| 60 | 60 | { |
| 61 | 61 | return $this->merchantId; |
| 62 | 62 | } |