Passed
Push — master ( b510be...536de0 )
by Robert
11:14 queued 08:58
created
src/Collections/ConversationHistory.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
 	
20 20
 	public function next() {
21 21
 		
22
-		if (!$this->instance) return false;
22
+		if (!$this->instance) {
23
+			return false;
24
+		}
23 25
 		
24 26
 		$instance = $this->instance;
25 27
 		
@@ -42,7 +44,9 @@  discard block
 block discarded – undo
42 44
 	
43 45
 	public function prev() {
44 46
 		
45
-		if (!$this->instance) return false;
47
+		if (!$this->instance) {
48
+			return false;
49
+		}
46 50
 		
47 51
 		$instance = $this->instance;
48 52
 		
Please login to merge, or discard this patch.
src/LiveEngageLaravel.php 1 patch
Braces   +30 added lines, -16 removed lines patch added patch discarded remove patch
@@ -94,7 +94,9 @@  discard block
 block discarded – undo
94 94
 	
95 95
 	public function visitor($visitorID, $sessionID, $setData = false) {
96 96
 		
97
-		if (!$this->domain) $this->domain('smt');
97
+		if (!$this->domain) {
98
+			$this->domain('smt');
99
+		}
98 100
 		
99 101
 		if ($setData) {
100 102
 			$url = "https://{$this->domain}/api/account/{$this->account}/monitoring/visitors/{$visitorID}/visits/current/events?v=1&sid={$sessionID}";
@@ -108,7 +110,9 @@  discard block
 block discarded – undo
108 110
 	
109 111
 	public function agentStatus() {
110 112
 		
111
-		if (!$this->domain) $this->domain('msgHist');
113
+		if (!$this->domain) {
114
+			$this->domain('msgHist');
115
+		}
112 116
 		
113 117
 		$url = "https://{$this->domain}/messaging_history/api/account/{$this->account}/agent-view/status";
114 118
 		return $this->request($url, 'POST', new Payload(['skillIds' => $this->skills]));
@@ -117,7 +121,9 @@  discard block
 block discarded – undo
117 121
 	
118 122
 	public final function retrieveHistory(Carbon $start, Carbon $end, $url = false) {
119 123
 		
120
-		if (!$this->domain) $this->domain('engHistDomain');
124
+		if (!$this->domain) {
125
+			$this->domain('engHistDomain');
126
+		}
121 127
 		
122 128
 		$url = $url ?: "https://{$this->domain}/interaction_history/api/account/{$this->account}/interactions/search?limit={$this->history_limit}&offset=0";
123 129
 		
@@ -144,7 +150,9 @@  discard block
 block discarded – undo
144 150
 	
145 151
 	public final function retrieveMsgHistory(Carbon $start, Carbon $end, $url = false) {
146 152
 		
147
-		if (!$this->domain) $this->domain('msgHist');
153
+		if (!$this->domain) {
154
+			$this->domain('msgHist');
155
+		}
148 156
 		
149 157
 		$url = $url ?: "https://{$this->domain}/messaging_history/api/account/{$this->account}/conversations/search?limit={$this->history_limit}&offset=0";
150 158
 		
@@ -191,14 +199,17 @@  discard block
 block discarded – undo
191 199
 		$history = [];
192 200
 		foreach ($results as $item) {
193 201
 			
194
-			if (property_exists($item, 'info'))
195
-				$item->info = new Info((array) $item->info);
202
+			if (property_exists($item, 'info')) {
203
+							$item->info = new Info((array) $item->info);
204
+			}
196 205
 			
197
-			if (property_exists($item, 'visitorInfo'))
198
-				$item->visitorInfo = new Visitor((array) $item->visitorInfo);
206
+			if (property_exists($item, 'visitorInfo')) {
207
+							$item->visitorInfo = new Visitor((array) $item->visitorInfo);
208
+			}
199 209
 				
200
-			if (property_exists($item, 'campaign'))
201
-				$item->campaign = new Campaign((array) $item->campaign);
210
+			if (property_exists($item, 'campaign')) {
211
+							$item->campaign = new Campaign((array) $item->campaign);
212
+			}
202 213
 			
203 214
 			$history[] = new Conversation((array) $item);
204 215
 			
@@ -230,14 +241,17 @@  discard block
 block discarded – undo
230 241
 		$history = [];
231 242
 		foreach ($results as $item) {
232 243
 			
233
-			if (property_exists($item, 'info'))
234
-				$item->info = new Info((array) $item->info);
244
+			if (property_exists($item, 'info')) {
245
+							$item->info = new Info((array) $item->info);
246
+			}
235 247
 			
236
-			if (property_exists($item, 'visitorInfo'))
237
-				$item->visitorInfo = new Visitor((array) $item->visitorInfo);
248
+			if (property_exists($item, 'visitorInfo')) {
249
+							$item->visitorInfo = new Visitor((array) $item->visitorInfo);
250
+			}
238 251
 				
239
-			if (property_exists($item, 'campaign'))
240
-				$item->campaign = new Campaign((array) $item->campaign);
252
+			if (property_exists($item, 'campaign')) {
253
+							$item->campaign = new Campaign((array) $item->campaign);
254
+			}
241 255
 			
242 256
 			$history[] = new Engagement((array) $item);
243 257
 			
Please login to merge, or discard this patch.
src/Collections/EngagementHistory.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
 	
20 20
 	public function next() {
21 21
 		
22
-		if (!$this->instance) return false;
22
+		if (!$this->instance) {
23
+			return false;
24
+		}
23 25
 		
24 26
 		$instance = $this->instance;
25 27
 		
@@ -42,7 +44,9 @@  discard block
 block discarded – undo
42 44
 	
43 45
 	public function prev() {
44 46
 		
45
-		if (!$this->instance) return false;
47
+		if (!$this->instance) {
48
+			return false;
49
+		}
46 50
 		
47 51
 		$instance = $this->instance;
48 52
 		
Please login to merge, or discard this patch.