@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
6 | 6 | { |
7 | - const CONFIG_PATH = __DIR__.'/../config/live-engage-laravel.php'; |
|
7 | + const CONFIG_PATH = __DIR__ . '/../config/live-engage-laravel.php'; |
|
8 | 8 | |
9 | 9 | public function boot() |
10 | 10 | { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | 'live-engage-laravel' |
21 | 21 | ); |
22 | 22 | |
23 | - $this->app->bind('live-engage-laravel', function () { |
|
23 | + $this->app->bind('live-engage-laravel', function() { |
|
24 | 24 | return new LiveEngageLaravel(); |
25 | 25 | }); |
26 | 26 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | public function find($engagementID) |
24 | 24 | { |
25 | - $result = $this->filter(function ($value, $key) use ($engagementID) { |
|
25 | + $result = $this->filter(function($value, $key) use ($engagementID) { |
|
26 | 26 | return $value->info->sessionId == $engagementID; |
27 | 27 | }); |
28 | 28 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | public function next() |
33 | 33 | { |
34 | - if (! $this->instance) { |
|
34 | + if (!$this->instance) { |
|
35 | 35 | return false; |
36 | 36 | } |
37 | 37 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function prev() |
69 | 69 | { |
70 | - if (! $this->instance) { |
|
70 | + if (!$this->instance) { |
|
71 | 71 | return false; |
72 | 72 | } |
73 | 73 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | public function state($state = 'ONLINE') |
21 | 21 | { |
22 | - $result = $this->filter(function ($value, $key) use ($state) { |
|
22 | + $result = $this->filter(function($value, $key) use ($state) { |
|
23 | 23 | return strtolower($value->currentStatus) == strtolower($state); |
24 | 24 | }); |
25 | 25 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | public function find($engagementID) |
24 | 24 | { |
25 | - $result = $this->filter(function ($value, $key) use ($engagementID) { |
|
25 | + $result = $this->filter(function($value, $key) use ($engagementID) { |
|
26 | 26 | return $value->info->conversationId == $engagementID; |
27 | 27 | }); |
28 | 28 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | public function next() |
33 | 33 | { |
34 | - if (! $this->instance) { |
|
34 | + if (!$this->instance) { |
|
35 | 35 | return false; |
36 | 36 | } |
37 | 37 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | public function prev() |
67 | 67 | { |
68 | - if (! $this->instance) { |
|
68 | + if (!$this->instance) { |
|
69 | 69 | return false; |
70 | 70 | } |
71 | 71 |
@@ -14,6 +14,6 @@ |
||
14 | 14 | // custom string representation of object |
15 | 15 | public function __toString() |
16 | 16 | { |
17 | - return __CLASS__.": [{$this->code}]: {$this->message}\n"; |
|
17 | + return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; |
|
18 | 18 | } |
19 | 19 | } |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | 'interactive' => $this->interactive, |
151 | 151 | 'ended' => $this->ended, |
152 | 152 | 'start' => [ |
153 | - 'from' => strtotime($start_str).'000', |
|
154 | - 'to' => strtotime($end_str).'000', |
|
153 | + 'from' => strtotime($start_str) . '000', |
|
154 | + 'to' => strtotime($end_str) . '000', |
|
155 | 155 | ], |
156 | 156 | ]; |
157 | 157 | if (count($this->skills)) { |
@@ -176,8 +176,8 @@ discard block |
||
176 | 176 | 'interactive' => $this->interactive, |
177 | 177 | 'ended' => $this->ended, |
178 | 178 | 'start' => [ |
179 | - 'from' => strtotime($start_str).'000', |
|
180 | - 'to' => strtotime($end_str).'000', |
|
179 | + 'from' => strtotime($start_str) . '000', |
|
180 | + 'to' => strtotime($end_str) . '000', |
|
181 | 181 | ], |
182 | 182 | ]; |
183 | 183 | if (count($this->skills)) { |
@@ -339,7 +339,9 @@ |
||
339 | 339 | |
340 | 340 | private function requestV2($url, $method, $payload = false) |
341 | 341 | { |
342 | - if (!$this->bearer) $this->login(); |
|
342 | + if (!$this->bearer) { |
|
343 | + $this->login(); |
|
344 | + } |
|
343 | 345 | |
344 | 346 | $client = new Client(); |
345 | 347 | $args = [ |