@@ -83,10 +83,10 @@ |
||
83 | 83 | $app->make(Token::class), $app->make(Guzzle::class), |
84 | 84 | $app->make(ModelResolver::class) |
85 | 85 | ))->setClientId($app->config->get('services.connectwise.client_id')) |
86 | - ->setIntegrator($app->config->get('services.connectwise.integrator')) |
|
87 | - ->setPassword($app->config->get('services.connectwise.password')) |
|
88 | - ->setUrl($app->config->get('services.connectwise.url')) |
|
89 | - ->setVersion($app->config->get('services.connectwise.version')); |
|
86 | + ->setIntegrator($app->config->get('services.connectwise.integrator')) |
|
87 | + ->setPassword($app->config->get('services.connectwise.password')) |
|
88 | + ->setUrl($app->config->get('services.connectwise.url')) |
|
89 | + ->setVersion($app->config->get('services.connectwise.version')); |
|
90 | 90 | } |
91 | 91 | ); |
92 | 92 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $this->token->refresh($this); |
170 | 170 | } |
171 | 171 | |
172 | - return 'Basic ' . base64_encode($this->token->getUsername() . ':' . $this->token->getPassword()); |
|
172 | + return 'Basic '.base64_encode($this->token->getUsername().':'.$this->token->getPassword()); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function buildUri($resource) |
204 | 204 | { |
205 | - $uri = $this->getUrl() . ltrim($resource, '/'); |
|
205 | + $uri = $this->getUrl().ltrim($resource, '/'); |
|
206 | 206 | |
207 | 207 | if (strlen($uri) > 2000) { |
208 | 208 | throw new MalformedRequest( |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | return array_merge( |
262 | 262 | [ |
263 | 263 | 'x-cw-usertype' => 'member', |
264 | - 'Accept' => 'application/vnd.connectwise.com+json; version=' . $this->getVersion(), |
|
264 | + 'Accept' => 'application/vnd.connectwise.com+json; version='.$this->getVersion(), |
|
265 | 265 | ], |
266 | 266 | $authorization_headers, |
267 | 267 | $this->headers |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | */ |
296 | 296 | public function getUrl() |
297 | 297 | { |
298 | - return $this->url . '/v4_6_release/apis/3.0/'; |
|
298 | + return $this->url.'/v4_6_release/apis/3.0/'; |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
@@ -334,14 +334,14 @@ discard block |
||
334 | 334 | */ |
335 | 335 | protected function processResponse($resource, Response $response) |
336 | 336 | { |
337 | - $response = (array)json_decode($response->getBody(), true); |
|
337 | + $response = (array) json_decode($response->getBody(), true); |
|
338 | 338 | |
339 | 339 | if ($model = $this->resolver->find($resource, $this->getVersion())) { |
340 | - $model = 'Spinen\ConnectWise\Models\\' . $model; |
|
340 | + $model = 'Spinen\ConnectWise\Models\\'.$model; |
|
341 | 341 | |
342 | 342 | if ($this->isCollection($response)) { |
343 | 343 | $response = array_map( |
344 | - function ($item) use ($model) { |
|
344 | + function($item) use ($model) { |
|
345 | 345 | $item = new $model($item, $this); |
346 | 346 | |
347 | 347 | return $item; |