Completed
Push — main ( 5a4a86...029b29 )
by mohsen
32s queued 14s
created
src/Listeners/SendResourceLogNotification.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     public function handle($resourceLogs)
8 8
     {
9
-        if (! is_null(config('stethoscope.notifications.notifiable'))) {
9
+        if (!is_null(config('stethoscope.notifications.notifiable'))) {
10 10
             $notifiable = app(config('stethoscope.notifications.notifiable'));
11 11
 
12 12
             $notificationClass = $this->detemineNotificationClass();
@@ -21,6 +21,6 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $notifications = config('stethoscope.notifications.notifications');
23 23
 
24
-        return array_keys($notifications)[0];
24
+        return array_keys($notifications)[ 0 ];
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
src/Http/Middleware/CheckAccessToMonitoringPanel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function handle($request, Closure $next)
10 10
     {
11
-        if (! config('stethoscope.monitoring_panel.status')) {
11
+        if (!config('stethoscope.monitoring_panel.status')) {
12 12
             abort(404);
13 13
         }
14 14
 
Please login to merge, or discard this patch.
src/Http/Controllers/MonitorController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function history($from, $to)
28 28
     {
29
-        $resourceLogs = ResourceLog::where('created_at', '>=', $from.' 00:00:00')
30
-            ->where('created_at', '<=', $to.' 23:59:59')
29
+        $resourceLogs = ResourceLog::where('created_at', '>=', $from . ' 00:00:00')
30
+            ->where('created_at', '<=', $to . ' 23:59:59')
31 31
             ->select(DB::raw('date(created_at) as date'), 'resource')
32 32
             ->get();
33 33
 
34
-        $labels = [];
34
+        $labels = [ ];
35 35
         foreach (CarbonPeriod::create($from, $to) as $date) {
36 36
             array_push($labels, $date->format('Y-m-d'));
37 37
         }
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 
51 51
     protected function resourceLogCount($resource, $labels, $resourceLogs)
52 52
     {
53
-        $logCount = [];
53
+        $logCount = [ ];
54 54
         foreach ($labels as $label) {
55
-            $resourceCount = $resourceLogs->countBy(function ($resourceLogs) use ($resource, $label) {
56
-                return $resourceLogs['resource'] == $resource && $resourceLogs['date'] == $label;
55
+            $resourceCount = $resourceLogs->countBy(function($resourceLogs) use ($resource, $label) {
56
+                return $resourceLogs[ 'resource' ] == $resource && $resourceLogs[ 'date' ] == $label;
57 57
             });
58
-            array_push($logCount, count($resourceCount) > 1 ? $resourceCount[1] : 0);
58
+            array_push($logCount, count($resourceCount) > 1 ? $resourceCount[ 1 ] : 0);
59 59
         }
60 60
 
61 61
         return $logCount;
Please login to merge, or discard this patch.
src/StethoscopeServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function register()
21 21
     {
22
-        $this->app->singleton('record', function ($app) {
22
+        $this->app->singleton('record', function($app) {
23 23
             return new LogManager($app);
24 24
         });
25 25
 
26 26
         $this->mergeConfigFrom(
27
-            __DIR__.'/../config/stethoscope.php',
27
+            __DIR__ . '/../config/stethoscope.php',
28 28
             'stethoscope'
29 29
         );
30 30
 
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
         if ($this->app->runningInConsole()) {
42 42
             // publishing the config
43 43
             $this->publishes([
44
-                __DIR__.'/../config/stethoscope.php' => config_path('stethoscope.php'),
44
+                __DIR__ . '/../config/stethoscope.php' => config_path('stethoscope.php'),
45 45
             ], 'stethoscope-publish-config');
46 46
 
47 47
             // publishing the build files
48 48
             $this->publishes([
49
-                __DIR__.'/../public/build' => public_path('vendor/stethoscope'),
49
+                __DIR__ . '/../public/build' => public_path('vendor/stethoscope'),
50 50
             ], 'stethoscope-publish-view');
51 51
 
52 52
             $this->commands([
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
             ]);
57 57
         }
58 58
 
59
-        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
59
+        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
60 60
 
61
-        $this->loadRoutesFrom(__DIR__.'/../routes/api.php');
62
-        $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
61
+        $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');
62
+        $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');
63 63
 
64
-        $this->loadViewsFrom(__DIR__.'/../resources/views', 'mohsenabrishami');
64
+        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'mohsenabrishami');
65 65
 
66
-        $this->app['router']->aliasMiddleware('check.access.to.monitoring.panel', CheckAccessToMonitoringPanel::class);
66
+        $this->app[ 'router' ]->aliasMiddleware('check.access.to.monitoring.panel', CheckAccessToMonitoringPanel::class);
67 67
     }
68 68
 }
Please login to merge, or discard this patch.
src/Traits/MessageCreatorTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function networkMessage($networkStatus)
57 57
     {
58
-        return 'network connection status ===> '.($networkStatus == 'false' ? 'not connected' : 'connected');
58
+        return 'network connection status ===> ' . ($networkStatus == 'false' ? 'not connected' : 'connected');
59 59
     }
60 60
 
61 61
     /**
@@ -66,6 +66,6 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function webServerMessage($webServerStatus)
68 68
     {
69
-        return 'web server status ===> '.$webServerStatus;
69
+        return 'web server status ===> ' . $webServerStatus;
70 70
     }
71 71
 }
Please login to merge, or discard this patch.