@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | use HasFactory; |
12 | 12 | |
13 | - protected $guarded = []; |
|
13 | + protected $guarded = [ ]; |
|
14 | 14 | |
15 | 15 | protected static function newFactory() |
16 | 16 | { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('resource_logs', function (Blueprint $table) { |
|
16 | + Schema::create('resource_logs', function(Blueprint $table) { |
|
17 | 17 | $table->id(); |
18 | 18 | $table->string('resource'); |
19 | 19 | $table->string('log'); |
@@ -3,9 +3,9 @@ |
||
3 | 3 | use Illuminate\Support\Facades\Route; |
4 | 4 | use MohsenAbrishami\Stethoscope\Http\Controllers\MonitoringPanelController; |
5 | 5 | |
6 | -Route::middleware(['check.access.to.monitoring.panel'])->group(function () { |
|
6 | +Route::middleware([ 'check.access.to.monitoring.panel' ])->group(function() { |
|
7 | 7 | Route::get( |
8 | 8 | config('stethoscope.monitoring_panel.path', 'monitoring-panel'), |
9 | - [MonitoringPanelController::class, 'index'] |
|
9 | + [ MonitoringPanelController::class, 'index' ] |
|
10 | 10 | )->name('monitoring-panel'); |
11 | 11 | }); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use Illuminate\Support\Facades\Route; |
4 | 4 | use MohsenAbrishami\Stethoscope\Http\Controllers\MonitorController; |
5 | 5 | |
6 | -Route::middleware(['check.access.to.monitoring.panel'])->group(function () { |
|
7 | - Route::get('monitor/current', [MonitorController::class, 'current']); |
|
8 | - Route::get('monitor/history/{from}/{to}', [MonitorController::class, 'history']); |
|
6 | +Route::middleware([ 'check.access.to.monitoring.panel' ])->group(function() { |
|
7 | + Route::get('monitor/current', [ MonitorController::class, 'current' ]); |
|
8 | + Route::get('monitor/history/{from}/{to}', [ MonitorController::class, 'history' ]); |
|
9 | 9 | }); |
@@ -19,23 +19,23 @@ |
||
19 | 19 | |
20 | 20 | public function record($resourceLogs) |
21 | 21 | { |
22 | - $file = config('stethoscope.log_file_storage.path').now()->format('Y-m-d'); |
|
22 | + $file = config('stethoscope.log_file_storage.path') . now()->format('Y-m-d'); |
|
23 | 23 | |
24 | 24 | $log = ''; |
25 | 25 | |
26 | 26 | foreach ($resourceLogs as $resource => $report) { |
27 | - $method = $resource.'Message'; |
|
27 | + $method = $resource . 'Message'; |
|
28 | 28 | |
29 | 29 | if (method_exists($this, $method)) { |
30 | - $log .= $this->$method($report)."\n"; |
|
30 | + $log .= $this->$method($report) . "\n"; |
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | 34 | if ($log != '') { |
35 | - $log = $this->timeMessage()."\n".$log; |
|
35 | + $log = $this->timeMessage() . "\n" . $log; |
|
36 | 36 | |
37 | 37 | if ($this->storage->exists($file)) { |
38 | - $log = $this->storage->get($file)."\n \n".$log; |
|
38 | + $log = $this->storage->get($file) . "\n \n" . $log; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $this->storage->put($file, $log); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | use NotifiableTrait; |
10 | 10 | |
11 | - public function routeNotificationForMail(): string|array |
|
11 | + public function routeNotificationForMail(): string | array |
|
12 | 12 | { |
13 | 13 | return config('stethoscope.notifications.mail.to'); |
14 | 14 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function via($notifiable) |
29 | 29 | { |
30 | - $notificationChannels = config('stethoscope.notifications.notifications.'.static::class); |
|
30 | + $notificationChannels = config('stethoscope.notifications.notifications.' . static::class); |
|
31 | 31 | |
32 | 32 | return array_filter($notificationChannels); |
33 | 33 | } |
@@ -6,7 +6,7 @@ discard block |
||
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 |
||
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 | } |
@@ -8,7 +8,7 @@ |
||
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 |