Completed
Pull Request — master (#8)
by Aivis
02:08
created
src/Understand/UnderstandLaravel5/ExceptionEncoder.php 2 patches
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -125,28 +125,22 @@
 block discarded – undo
125 125
             if (is_array($arg))
126 126
             {
127 127
                 $params[] = 'array(' . count($arg) . ')';
128
-            }
129
-            else if (is_object($arg))
128
+            } else if (is_object($arg))
130 129
             {
131 130
                 $params[] = get_class($arg);
132
-            }
133
-            else if (is_string($arg))
131
+            } else if (is_string($arg))
134 132
             {
135 133
                 $params[] = 'string(' . $arg . ')';
136
-            }
137
-            else if (is_int($arg))
134
+            } else if (is_int($arg))
138 135
             {
139 136
                 $params[] = 'int(' . $arg . ')';
140
-            }
141
-            else if (is_float($arg))
137
+            } else if (is_float($arg))
142 138
             {
143 139
                 $params[] = 'float(' . $arg . ')';
144
-            }
145
-            else if (is_bool($arg))
140
+            } else if (is_bool($arg))
146 141
             {
147 142
                 $params[] = 'bool(' . ($arg ? 'true' : 'false') . ')';
148
-            }
149
-            else
143
+            } else
150 144
             {
151 145
                 $params[] = (string) $arg;
152 146
             }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     protected function stackTraceCallToString(array $trace)
91 91
     {
92
-        if (! isset($trace['type']))
92
+        if (!isset($trace['type']))
93 93
         {
94 94
             return 'function';
95 95
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     {
116 116
         $params = [];
117 117
 
118
-        if (! isset($trace['args']))
118
+        if (!isset($trace['args']))
119 119
         {
120 120
             return $params;
121 121
         }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         {
125 125
             if (is_array($arg))
126 126
             {
127
-                $params[] = 'array(' . count($arg) . ')';
127
+                $params[] = 'array('.count($arg).')';
128 128
             }
129 129
             else if (is_object($arg))
130 130
             {
@@ -132,19 +132,19 @@  discard block
 block discarded – undo
132 132
             }
133 133
             else if (is_string($arg))
134 134
             {
135
-                $params[] = 'string(' . $arg . ')';
135
+                $params[] = 'string('.$arg.')';
136 136
             }
137 137
             else if (is_int($arg))
138 138
             {
139
-                $params[] = 'int(' . $arg . ')';
139
+                $params[] = 'int('.$arg.')';
140 140
             }
141 141
             else if (is_float($arg))
142 142
             {
143
-                $params[] = 'float(' . $arg . ')';
143
+                $params[] = 'float('.$arg.')';
144 144
             }
145 145
             else if (is_bool($arg))
146 146
             {
147
-                $params[] = 'bool(' . ($arg ? 'true' : 'false') . ')';
147
+                $params[] = 'bool('.($arg ? 'true' : 'false').')';
148 148
             }
149 149
             else
150 150
             {
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/ExceptionLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
             return;
58 58
         }
59 59
 
60
-        if ( ! $this->config->get('understand-laravel.log_types.exception_log.enabled'))
60
+        if (!$this->config->get('understand-laravel.log_types.exception_log.enabled'))
61 61
         {
62 62
             return;
63 63
         }
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/Handlers/LaravelQueueHandler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         }
20 20
         catch (\Exception $ex)
21 21
         {
22
-            if ( ! $this->silent)
22
+            if (!$this->silent)
23 23
             {
24 24
                 throw new \Understand\UnderstandLaravel5\Exceptions\HandlerException($ex->getMessage(), $ex->getCode(), $ex);
25 25
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,8 +125,7 @@
 block discarded – undo
125 125
         try
126 126
         {
127 127
             return $this->handler->handle($event);
128
-        }
129
-        catch (\Exception $ex)
128
+        } catch (\Exception $ex)
130 129
         {
131 130
             if (! $this->silent)
132 131
             {
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/UnderstandLaravel5ServiceProvider.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -220,18 +220,15 @@
 block discarded – undo
220 220
             if ($message instanceof Exceptions\HandlerException)
221 221
             {
222 222
                 return;
223
-            }
224
-            else if ($message instanceof \Exception)
223
+            } else if ($message instanceof \Exception)
225 224
             {
226 225
                 $log = $this->app['understand.exception-encoder']->exceptionToArray($message);
227 226
                 $log['tags'] = ['exception_log'];
228
-            }
229
-            else if (is_string($message))
227
+            } else if (is_string($message))
230 228
             {
231 229
                 $log['message'] = $message;
232 230
                 $log['tags'] = ['laravel_log'];
233
-            }
234
-            else
231
+            } else
235 232
             {
236 233
                 $log = $message;
237 234
                 $log['tags'] = ['laravel_log'];
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	 */
21 21
 	public function boot()
22 22
 	{
23
-        $configPath = __DIR__ . '/../../config/understand-laravel.php';
23
+        $configPath = __DIR__.'/../../config/understand-laravel.php';
24 24
         $this->publishes([$configPath => config_path('understand-laravel.php')], 'config');
25 25
 
26 26
         if ($this->app['config']->get('understand-laravel.log_types.eloquent_log.enabled'))
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     protected function registerConfig()
59 59
     {
60
-        $configPath = __DIR__ . '/../../config/understand-laravel.php';
60
+        $configPath = __DIR__.'/../../config/understand-laravel.php';
61 61
         $this->mergeConfigFrom($configPath, 'understand-laravel');
62 62
     }
63 63
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             return new Handlers\LaravelQueueHandler($inputToken, $apiUrl, $silent, $sslBundlePath);
190 190
         }
191 191
 
192
-        throw new \ErrorException('understand-laravel handler misconfiguration:' . $handlerType);
192
+        throw new \ErrorException('understand-laravel handler misconfiguration:'.$handlerType);
193 193
     }
194 194
 
195 195
     /**
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/FieldProvider.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -315,8 +315,7 @@  discard block
 block discarded – undo
315 315
             {
316 316
                 return $userId;
317 317
             }
318
-        }
319
-        catch (\Exception $e) 
318
+        } catch (\Exception $e) 
320 319
         {}
321 320
 
322 321
         try 
@@ -325,8 +324,7 @@  discard block
 block discarded – undo
325 324
             {
326 325
                 return $user->id;
327 326
             }
328
-        } 
329
-        catch (\Exception $e) 
327
+        } catch (\Exception $e) 
330 328
         {}
331 329
         
332 330
         try
@@ -335,8 +333,7 @@  discard block
 block discarded – undo
335 333
             {
336 334
                 return $user->id;
337 335
             }
338
-        }
339
-        catch (\Exception $e) 
336
+        } catch (\Exception $e) 
340 337
         {}
341 338
     }
342 339
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -226,16 +226,16 @@
 block discarded – undo
226 226
     {
227 227
         $url = $this->request->path();
228 228
 
229
-        if ( ! starts_with($url, '/'))
229
+        if (!starts_with($url, '/'))
230 230
         {
231
-            $url = '/' . $url;
231
+            $url = '/'.$url;
232 232
         }
233 233
 
234 234
         $queryString = $this->request->getQueryString();
235 235
 
236 236
         if ($queryString)
237 237
         {
238
-            $url .= '?' . $queryString;
238
+            $url .= '?'.$queryString;
239 239
         }
240 240
 
241 241
         return $url;
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/Logger.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
         }
129 129
         catch (\Exception $ex)
130 130
         {
131
-            if (! $this->silent)
131
+            if (!$this->silent)
132 132
             {
133 133
                 throw new $ex;
134 134
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,8 +125,7 @@
 block discarded – undo
125 125
         try
126 126
         {
127 127
             return $this->handler->handle($event);
128
-        }
129
-        catch (\Exception $ex)
128
+        } catch (\Exception $ex)
130 129
         {
131 130
             if (! $this->silent)
132 131
             {
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/Exceptions/HandlerException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     public function __construct($message = '', $code = 0, $previous = null)
12 12
     {
13
-        $message = 'understand-laravel: ' . $message;
13
+        $message = 'understand-laravel: '.$message;
14 14
 
15 15
         parent::__construct($message, $code, $previous);
16 16
     }
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/Handlers/BaseHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     {
132 132
         if (!$responseArr)
133 133
         {
134
-            throw new HandlerException('Cannot create connection to ' . $this->apiUrl);
134
+            throw new HandlerException('Cannot create connection to '.$this->apiUrl);
135 135
         }
136 136
 
137 137
         if (isset($responseArr['error']))
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             throw new HandlerException($responseArr['error']);
140 140
         }
141 141
 
142
-        throw new HandlerException('Error. ' . ' Request data: ' . json_decode($requestData));
142
+        throw new HandlerException('Error. '.' Request data: '.json_decode($requestData));
143 143
     }
144 144
 
145 145
 }
Please login to merge, or discard this patch.