Completed
Push — master ( 46c45d...1f3eb2 )
by Aivis
14s
created
src/Understand/UnderstandLaravel5/UnderstandLaravel5ServiceProvider.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -218,8 +218,8 @@  discard block
 block discarded – undo
218 218
     /**
219 219
      * Detect Laravel version
220 220
      * 
221
-     * @param array $versions
222
-     * @return type
221
+     * @param string[] $versions
222
+     * @return boolean
223 223
      */
224 224
     protected function detectLaravelVersion(array $versions)
225 225
     {
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     /**
341 341
      * Get the services provided by the provider.
342 342
      *
343
-     * @return array
343
+     * @return string[]
344 344
      */
345 345
     public function provides()
346 346
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	public function boot()
25 25
 	{
26
-        $configPath = __DIR__ . '/../../config/understand-laravel.php';
26
+        $configPath = __DIR__.'/../../config/understand-laravel.php';
27 27
         $this->publishes([$configPath => config_path('understand-laravel.php')], 'config');
28 28
 
29 29
         if ($this->app['config']->get('understand-laravel.log_types.eloquent_log.enabled'))
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     protected function registerConfig()
62 62
     {
63
-        $configPath = __DIR__ . '/../../config/understand-laravel.php';
63
+        $configPath = __DIR__.'/../../config/understand-laravel.php';
64 64
         $this->mergeConfigFrom($configPath, 'understand-laravel');
65 65
     }
66 66
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             return new Handlers\LaravelQueueHandler($inputToken, $apiUrl, $silent, $sslBundlePath);
197 197
         }
198 198
 
199
-        throw new \ErrorException('understand-laravel handler misconfiguration:' . $handlerType);
199
+        throw new \ErrorException('understand-laravel handler misconfiguration:'.$handlerType);
200 200
     }
201 201
 
202 202
     /**
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         }
283 283
         else
284 284
         {
285
-            $log = (array)$message;
285
+            $log = (array) $message;
286 286
             $log['tags'] = ['laravel_log'];
287 287
         }
288 288
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             {
320 320
                 $this->app['events']->listen($listenerName, function($model) use($modelLogger, $eventName)
321 321
                 {
322
-                    $modelLevelEventName = 'eloquent.' . $eventName . ': ' . get_class($model);
322
+                    $modelLevelEventName = 'eloquent.'.$eventName.': '.get_class($model);
323 323
                     
324 324
                     $modelLogger->logModelEvent($eventName, $model, $modelLevelEventName);
325 325
                 });
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -240,8 +240,7 @@  discard block
 block discarded – undo
240 240
             {
241 241
                 $this->handleEvent($level, $message, $context);
242 242
             });
243
-        }
244
-        else
243
+        } else
245 244
         {
246 245
             // starting from L5.4 MessageLogged event class was introduced
247 246
             // https://github.com/laravel/framework/commit/57c82d095c356a0fe0f9381536afec768cdcc072
@@ -268,8 +267,7 @@  discard block
 block discarded – undo
268 267
         if ($message instanceof Exceptions\HandlerException)
269 268
         {
270 269
             return;
271
-        }
272
-        else if ($message instanceof \Exception)
270
+        } else if ($message instanceof \Exception)
273 271
         {
274 272
             $log = $this->app['understand.exception-encoder']->exceptionToArray($message);
275 273
             $log['tags'] = ['exception_log'];
@@ -279,8 +277,7 @@  discard block
 block discarded – undo
279 277
         {
280 278
             $log['message'] = $message;
281 279
             $log['tags'] = ['laravel_log'];
282
-        }
283
-        else
280
+        } else
284 281
         {
285 282
             $log = (array)$message;
286 283
             $log['tags'] = ['laravel_log'];
@@ -323,8 +320,7 @@  discard block
 block discarded – undo
323 320
                     
324 321
                     $modelLogger->logModelEvent($eventName, $model, $modelLevelEventName);
325 322
                 });
326
-            }
327
-            else
323
+            } else
328 324
             {
329 325
                 $this->app['events']->listen($listenerName, function($modelLevelEventName, $eventPayload) use($modelLogger, $eventName)
330 326
                 {
Please login to merge, or discard this patch.
src/Understand/UnderstandLaravel5/ModelEventListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     public function logModelEvent($eventName, Model $model, $modelLevelEventName = null)
43 43
     {
44 44
         $log = [
45
-            'message' => is_null($modelLevelEventName) ? null : (string)$modelLevelEventName,
45
+            'message' => is_null($modelLevelEventName) ? null : (string) $modelLevelEventName,
46 46
             'id' => (int) $model->id,
47 47
             'model_event' => $eventName,
48 48
             'model_name' => get_class($model),
Please login to merge, or discard this patch.