@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function __construct(string $message = '', int $code = 0, ?Exception $previous = null) |
| 15 | 15 | { |
| 16 | - $message = 'Invalid response' . ($message === '' ? '' : ': ' . $message); |
|
| 16 | + $message = 'Invalid response'.($message === '' ? '' : ': '.$message); |
|
| 17 | 17 | parent::__construct($message, $code, $previous); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function __construct(string $message = '', int $code = 0, ?Exception $previous = null) |
| 15 | 15 | { |
| 16 | - $message = 'Invalid XML-response' . ($message === '' ? '' : ': ' . $message); |
|
| 16 | + $message = 'Invalid XML-response'.($message === '' ? '' : ': '.$message); |
|
| 17 | 17 | parent::__construct($message, $code, $previous); |
| 18 | 18 | } |
| 19 | 19 | } |
| 20 | 20 | \ No newline at end of file |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null) |
| 15 | 15 | { |
| 16 | - $message = 'Not implemented' . (empty($message) ? '' : ': ' . $message); |
|
| 16 | + $message = 'Not implemented'.(empty($message) ? '' : ': '.$message); |
|
| 17 | 17 | parent::__construct($message, $code, $previous); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function __construct(string $message = '', int $code = 0, ?Exception $previous = null) |
| 15 | 15 | { |
| 16 | - $message = 'Invalid item' . ($message !== '' ? ': ' . $message : ''); |
|
| 16 | + $message = 'Invalid item'.($message !== '' ? ': '.$message : ''); |
|
| 17 | 17 | parent::__construct($message, $code, $previous); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function __construct(string $message = '', int $code = 0, ?Exception $previous = null) |
| 15 | 15 | { |
| 16 | - $message = 'No reference found' . ($message !== '' ? ': ' . $message : ''); |
|
| 16 | + $message = 'No reference found'.($message !== '' ? ': '.$message : ''); |
|
| 17 | 17 | parent::__construct($message, $code, $previous); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | { |
| 14 | 14 | public function __construct(string $message = '', int $code = 0, ?Exception $previous = null) |
| 15 | 15 | { |
| 16 | - $message = 'No UserId found' . ($message !== '' ? ': ' . $message : ''); |
|
| 16 | + $message = 'No UserId found'.($message !== '' ? ': '.$message : ''); |
|
| 17 | 17 | parent::__construct($message, $code, $previous); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | private function buildUrl(string $method, array $parameters = []): string |
| 82 | 82 | { |
| 83 | - return self::API_URL . '?' . $this->buildParameters($method, $parameters); |
|
| 83 | + return self::API_URL.'?'.$this->buildParameters($method, $parameters); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function getUserAgent(): string |
| 175 | 175 | { |
| 176 | - return 'PHP Bpost Geo6/' . self::VERSION . ' ' . $this->userAgent; |
|
| 176 | + return 'PHP Bpost Geo6/'.self::VERSION.' '.$this->userAgent; |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $info = curl_getinfo($curl); // array<string,mixed> |
| 61 | 61 | |
| 62 | 62 | $this->logger->debug('curl response', [ |
| 63 | - 'status' => $errno . ' (' . $error . ')', |
|
| 63 | + 'status' => $errno.' ('.$error.')', |
|
| 64 | 64 | 'headers' => $info, |
| 65 | 65 | 'response' => $result, |
| 66 | 66 | ]); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | // seulement maintenant qu'on sait que ce n’est pas une erreur |
| 73 | 73 | $this->responseBody = is_string($result) ? $result : ''; |
| 74 | 74 | |
| 75 | - $this->responseHttpCode = isset($info['http_code']) ? (int) $info['http_code'] : null; |
|
| 75 | + $this->responseHttpCode = isset($info['http_code']) ? (int) $info['http_code'] : null; |
|
| 76 | 76 | $this->responseContentType = $info['content_type'] ?? null; |
| 77 | 77 | |
| 78 | 78 | return true; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | 'orderWeight', |
| 43 | 43 | ]; |
| 44 | 44 | |
| 45 | - $base = 'accountId=' . $this->bpost->getAccountId() . '&'; |
|
| 45 | + $base = 'accountId='.$this->bpost->getAccountId().'&'; |
|
| 46 | 46 | |
| 47 | 47 | foreach ($keysToHash as $key) { |
| 48 | 48 | if (!array_key_exists($key, $this->parameters)) { |
@@ -52,13 +52,13 @@ discard block |
||
| 52 | 52 | $value = $this->parameters[$key]; |
| 53 | 53 | |
| 54 | 54 | if (!is_array($value)) { |
| 55 | - $base .= $key . '=' . $value . '&'; |
|
| 55 | + $base .= $key.'='.$value.'&'; |
|
| 56 | 56 | continue; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | // Si c’est un tableau, concaténer chaque entrée (tri déjà fait dans setParameter) |
| 60 | 60 | foreach ($value as $entry) { |
| 61 | - $base .= $key . '=' . $entry . '&'; |
|
| 61 | + $base .= $key.'='.$entry.'&'; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | if ($form && isset($return['orderLine']) && is_array($return['orderLine'])) { |
| 81 | 81 | foreach ($return['orderLine'] as $key => $value) { |
| 82 | - $return['orderLine[' . $key . ']'] = $value; |
|
| 82 | + $return['orderLine['.$key.']'] = $value; |
|
| 83 | 83 | } |
| 84 | 84 | unset($return['orderLine']); |
| 85 | 85 | } |