@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | { |
21 | 21 | foreach ($options as $option => $value) |
22 | 22 | { |
23 | - $setter = 'set' . ucfirst($option); |
|
23 | + $setter = 'set'.ucfirst($option); |
|
24 | 24 | |
25 | 25 | if (method_exists($this, $setter)) { |
26 | 26 | $this->$setter($value); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | if (!$ignoreMissingOptions) { |
36 | 36 | throw new InvalidArgumentException( |
37 | - "Property `{$option}` not found in class `" . __CLASS__ . "`." |
|
37 | + "Property `{$option}` not found in class `".__CLASS__."`." |
|
38 | 38 | ); |
39 | 39 | } |
40 | 40 | } |
@@ -76,10 +76,10 @@ discard block |
||
76 | 76 | if (preg_match('#http[s]*://#u', $this->serviceUrls[$serviceName])) { |
77 | 77 | return $this->serviceUrls[$serviceName]; |
78 | 78 | } |
79 | - return $this->baseUrl . $this->serviceUrls[$serviceName]; |
|
79 | + return $this->baseUrl.$this->serviceUrls[$serviceName]; |
|
80 | 80 | } |
81 | 81 | |
82 | - return $this->baseUrl . '/json/v5/' . strtolower($serviceName); |
|
82 | + return $this->baseUrl.'/json/v5/'.strtolower($serviceName); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -110,11 +110,11 @@ discard block |
||
110 | 110 | /* |
111 | 111 | * Requesting API with logging |
112 | 112 | */ |
113 | - $log->debug("[request] " . $this->formatBodyLog($httpRequest->__toString())); |
|
113 | + $log->debug("[request] ".$this->formatBodyLog($httpRequest->__toString())); |
|
114 | 114 | |
115 | 115 | $httpResponse = $client->send($httpRequest); |
116 | 116 | |
117 | - $log->debug("[response] " . $this->formatBodyLog($httpResponse->__toString())); |
|
117 | + $log->debug("[response] ".$this->formatBodyLog($httpResponse->__toString())); |
|
118 | 118 | |
119 | 119 | $httpResponseHeaders = $httpResponse->getHeaders(); |
120 | 120 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | private function prepareHeaders(TransportRequest $request) |
176 | 176 | { |
177 | 177 | return array_merge([ |
178 | - 'Authorization' => 'Bearer ' . $request->getCredentials()->getToken(), |
|
178 | + 'Authorization' => 'Bearer '.$request->getCredentials()->getToken(), |
|
179 | 179 | 'Client-Login' => $request->getCredentials()->getLogin(), |
180 | 180 | 'Use-Operator-Units' => $request->getUseOperatorUnits(), |
181 | 181 | 'Accept-Language' => $this->language, |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function log($level, $message, array $context = []) |
21 | 21 | { |
22 | - echo date("Y/m/d H:i:s") . " [{$level}] " . $message . PHP_EOL; |
|
22 | + echo date("Y/m/d H:i:s")." [{$level}] ".$message.PHP_EOL; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -42,9 +42,9 @@ |
||
42 | 42 | */ |
43 | 43 | public function __toString() |
44 | 44 | { |
45 | - $str = 'Exception ' . __CLASS__ . " code {$this->code} with message '{$this->message}' in `{$this->file}`" . PHP_EOL; |
|
46 | - $str .= 'Details: ' . $this->details . PHP_EOL; |
|
47 | - $str .= 'Stack trace:' . PHP_EOL . $this->getTraceAsString(); |
|
45 | + $str = 'Exception '.__CLASS__." code {$this->code} with message '{$this->message}' in `{$this->file}`".PHP_EOL; |
|
46 | + $str .= 'Details: '.$this->details.PHP_EOL; |
|
47 | + $str .= 'Stack trace:'.PHP_EOL.$this->getTraceAsString(); |
|
48 | 48 | return $str; |
49 | 49 | } |
50 | 50 | } |
51 | 51 | \ No newline at end of file |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function createService($serviceName, array $options = []) |
51 | 51 | { |
52 | - $className = $this->getServiceNamespace() . '\\' . ucfirst($serviceName); |
|
52 | + $className = $this->getServiceNamespace().'\\'.ucfirst($serviceName); |
|
53 | 53 | |
54 | 54 | // Override service base options |
55 | 55 | $options = array_merge($this->defaultOptions, [ |
@@ -109,6 +109,6 @@ discard block |
||
109 | 109 | */ |
110 | 110 | protected function getServiceNamespace() |
111 | 111 | { |
112 | - return __NAMESPACE__ . '\\' . 'Service'; |
|
112 | + return __NAMESPACE__.'\\'.'Service'; |
|
113 | 113 | } |
114 | 114 | } |
115 | 115 | \ No newline at end of file |