@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function __construct($message = "", $code = 0, \Exception $previous = null) |
19 | 19 | { |
20 | - $message = 'No reference found' . (empty($message) ? '' : ': ' . $message); |
|
20 | + $message = 'No reference found'.(empty($message) ? '' : ': '.$message); |
|
21 | 21 | parent::__construct($message, $code, $previous); |
22 | 22 | } |
23 | 23 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function __construct($message = "", $code = 0, \Exception $previous = null) |
19 | 19 | { |
20 | - $message = 'Invalid item' . (empty($message) ? '' : ': ' . $message); |
|
20 | + $message = 'Invalid item'.(empty($message) ? '' : ': '.$message); |
|
21 | 21 | parent::__construct($message, $code, $previous); |
22 | 22 | } |
23 | 23 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function __construct($message = "", $code = 0, \Exception $previous = null) |
19 | 19 | { |
20 | - $message = 'No UserId found' . (empty($message) ? '' : ': ' . $message); |
|
20 | + $message = 'No UserId found'.(empty($message) ? '' : ': '.$message); |
|
21 | 21 | parent::__construct($message, $code, $previous); |
22 | 22 | } |
23 | 23 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function __construct($message = "", $code = 0, \Exception $previous = null) |
19 | 19 | { |
20 | - $message = 'Not implemented' . (empty($message) ? '' : ': ' . $message); |
|
20 | + $message = 'Not implemented'.(empty($message) ? '' : ': '.$message); |
|
21 | 21 | parent::__construct($message, $code, $previous); |
22 | 22 | } |
23 | 23 | } |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | private function doCall($url, $body = null, $method = 'GET') |
81 | 81 | { |
82 | 82 | // build Authorization header |
83 | - $headers[] = 'Authorization: Basic ' . $this->getAuthorizationHeader(); |
|
83 | + $headers[] = 'Authorization: Basic '.$this->getAuthorizationHeader(); |
|
84 | 84 | |
85 | 85 | // set options |
86 | - $options[CURLOPT_URL] = self::API_URL . $url; |
|
86 | + $options[CURLOPT_URL] = self::API_URL.$url; |
|
87 | 87 | $options[CURLOPT_USERAGENT] = $this->getUserAgent(); |
88 | 88 | $options[CURLOPT_RETURNTRANSFER] = true; |
89 | 89 | $options[CURLOPT_TIMEOUT] = (int) $this->getTimeOut(); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | private function getAuthorizationHeader() |
158 | 158 | { |
159 | - return base64_encode($this->accountId . ':' . $this->passPhrase); |
|
159 | + return base64_encode($this->accountId.':'.$this->passPhrase); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | public function getUserAgent() |
191 | 191 | { |
192 | - return (string) 'PHP Bpost Bpack247/' . self::VERSION . ' ' . $this->userAgent; |
|
192 | + return (string) 'PHP Bpost Bpack247/'.self::VERSION.' '.$this->userAgent; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | public function getMember($id) |
262 | 262 | { |
263 | 263 | $xml = $this->doCall( |
264 | - '/customer/' . $id |
|
264 | + '/customer/'.$id |
|
265 | 265 | ); |
266 | 266 | |
267 | 267 | return Customer::createFromXML($xml); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $tagName = 'orderLine'; |
77 | 77 | if ($prefix !== null) { |
78 | - $tagName = $prefix . ':' . $tagName; |
|
78 | + $tagName = $prefix.':'.$tagName; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | $line = $document->createElement($tagName); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if ($this->getText() !== null) { |
84 | 84 | $tagName = 'text'; |
85 | 85 | if ($prefix !== null) { |
86 | - $tagName = $prefix . ':' . $tagName; |
|
86 | + $tagName = $prefix.':'.$tagName; |
|
87 | 87 | } |
88 | 88 | $line->appendChild( |
89 | 89 | $document->createElement( |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | if ($this->getNumberOfItems() !== null) { |
96 | 96 | $tagName = 'nbOfItems'; |
97 | 97 | if ($prefix !== null) { |
98 | - $tagName = $prefix . ':' . $tagName; |
|
98 | + $tagName = $prefix.':'.$tagName; |
|
99 | 99 | } |
100 | 100 | $line->appendChild( |
101 | 101 | $document->createElement( |
@@ -138,7 +138,7 @@ |
||
138 | 138 | { |
139 | 139 | $tagName = static::TAG_NAME; |
140 | 140 | if ($prefix !== null) { |
141 | - $tagName = $prefix . ':' . $tagName; |
|
141 | + $tagName = $prefix.':'.$tagName; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | $customer = $document->createElement($tagName); |
@@ -138,7 +138,7 @@ |
||
138 | 138 | { |
139 | 139 | $tagName = static::TAG_NAME; |
140 | 140 | if ($prefix !== null) { |
141 | - $tagName = $prefix . ':' . $tagName; |
|
141 | + $tagName = $prefix.':'.$tagName; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | $customer = $document->createElement($tagName); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | foreach ($keysToHash as $key) { |
60 | 60 | if (isset($this->parameters[$key])) { |
61 | - if (! is_array($this->parameters[$key])) { |
|
61 | + if (! is_array($this->parameters[$key])) { |
|
62 | 62 | $base .= $key.'='.$this->parameters[$key].'&'; |
63 | 63 | } else { |
64 | 64 | foreach ($this->parameters[$key] as $entry) { |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | 'orderReference', |
55 | 55 | 'orderWeight', |
56 | 56 | ); |
57 | - $base = 'accountId=' . $this->bpost->getAccountId() . '&'; |
|
57 | + $base = 'accountId='.$this->bpost->getAccountId().'&'; |
|
58 | 58 | |
59 | 59 | foreach ($keysToHash as $key) { |
60 | 60 | if (isset($this->parameters[$key])) { |
61 | - if (! is_array($this->parameters[$key])) { |
|
61 | + if (!is_array($this->parameters[$key])) { |
|
62 | 62 | $base .= $key.'='.$this->parameters[$key].'&'; |
63 | 63 | } else { |
64 | 64 | foreach ($this->parameters[$key] as $entry) { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | if ($form && isset($return['orderLine'])) { |
90 | 90 | foreach ($return['orderLine'] as $key => $value) { |
91 | - $return['orderLine[' . $key . ']'] = $value; |
|
91 | + $return['orderLine['.$key.']'] = $value; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | unset($return['orderLine']); |