@@ -27,7 +27,7 @@ |
||
| 27 | 27 | if (!$this->checkLevel($level)) { |
| 28 | 28 | throw new InvalidArgumentException("Invalid log level {$level}"); |
| 29 | 29 | } |
| 30 | - echo "[$level] $message" . PHP_EOL; |
|
| 30 | + echo "[$level] $message".PHP_EOL; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | private function checkLevel($level) |
@@ -41,9 +41,9 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function __toString() |
| 43 | 43 | { |
| 44 | - $str = 'Exception ' . __CLASS__ . " code {$this->code} with message '{$this->message}' in `{$this->file}`" . PHP_EOL; |
|
| 45 | - $str .= 'Details: ' . $this->details . PHP_EOL; |
|
| 46 | - $str .= 'Stack trace:' . PHP_EOL . $this->getTraceAsString(); |
|
| 44 | + $str = 'Exception '.__CLASS__." code {$this->code} with message '{$this->message}' in `{$this->file}`".PHP_EOL; |
|
| 45 | + $str .= 'Details: '.$this->details.PHP_EOL; |
|
| 46 | + $str .= 'Stack trace:'.PHP_EOL.$this->getTraceAsString(); |
|
| 47 | 47 | return $str; |
| 48 | 48 | } |
| 49 | 49 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function createService($serviceName, array $options = []) |
| 50 | 50 | { |
| 51 | - $className = $this->getServiceNamespace() . '\\' . ucfirst($serviceName); |
|
| 51 | + $className = $this->getServiceNamespace().'\\'.ucfirst($serviceName); |
|
| 52 | 52 | |
| 53 | 53 | // Override service base options |
| 54 | 54 | $options = array_merge($this->defaultOptions, [ |
@@ -112,6 +112,6 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | protected function getServiceNamespace() |
| 114 | 114 | { |
| 115 | - return __NAMESPACE__ . '\\' . 'Service'; |
|
| 115 | + return __NAMESPACE__.'\\'.'Service'; |
|
| 116 | 116 | } |
| 117 | 117 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | public function setOptions(array $options, $ignoreMissingOptions = false) |
| 19 | 19 | { |
| 20 | 20 | foreach ($options as $option => $value) { |
| 21 | - $setter = 'set' . ucfirst($option); |
|
| 21 | + $setter = 'set'.ucfirst($option); |
|
| 22 | 22 | |
| 23 | 23 | if (method_exists($this, $setter)) { |
| 24 | 24 | $this->$setter($value); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | if (!$ignoreMissingOptions) { |
| 34 | 34 | throw new InvalidArgumentException( |
| 35 | - "Property `{$option}` not found in class `" . __CLASS__ . "`." |
|
| 35 | + "Property `{$option}` not found in class `".__CLASS__."`." |
|
| 36 | 36 | ); |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -96,10 +96,10 @@ discard block |
||
| 96 | 96 | if (preg_match('#http[s]*://#u', $this->serviceUrls[$serviceName])) { |
| 97 | 97 | return $this->serviceUrls[$serviceName]; |
| 98 | 98 | } |
| 99 | - return $this->baseUrl . $this->serviceUrls[$serviceName]; |
|
| 99 | + return $this->baseUrl.$this->serviceUrls[$serviceName]; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - return $this->baseUrl . '/json/v5/' . strtolower($serviceName); |
|
| 102 | + return $this->baseUrl.'/json/v5/'.strtolower($serviceName); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | private function prepareHeaders(RequestInterface $request) |
| 217 | 217 | { |
| 218 | 218 | $headers = array_merge([ |
| 219 | - 'Authorization' => 'Bearer ' . $request->getCredentials()->getToken(), |
|
| 219 | + 'Authorization' => 'Bearer '.$request->getCredentials()->getToken(), |
|
| 220 | 220 | 'Client-Login' => $request->getCredentials()->getLogin(), |
| 221 | 221 | 'Accept-Language' => $request->getLanguage(), |
| 222 | 222 | ], $this->headers); |