@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | ->limit(10) |
| 57 | 57 | ->get(); |
| 58 | 58 | |
| 59 | - return $activities->map(function ($activity) { |
|
| 59 | + return $activities->map(function($activity) { |
|
| 60 | 60 | return (object) [ |
| 61 | 61 | 'type' => $activity->activity_type, |
| 62 | 62 | 'message' => $activity->description, |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | return response()->json([ |
| 80 | 80 | 'success' => true, |
| 81 | - 'activities' => array_map(function ($activity) { |
|
| 81 | + 'activities' => array_map(function($activity) { |
|
| 82 | 82 | return [ |
| 83 | 83 | 'type' => $activity->type, |
| 84 | 84 | 'message' => $activity->message, |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | |
| 266 | 266 | // Get number of physical cores |
| 267 | 267 | preg_match_all('/^cpu cores\s*:\s*(\d+)/m', $cpuinfo, $coresMatches); |
| 268 | - if (! empty($coresMatches[1])) { |
|
| 268 | + if (!empty($coresMatches[1])) { |
|
| 269 | 269 | $info['cores'] = (int) $coresMatches[1][0]; |
| 270 | 270 | } |
| 271 | 271 | |
@@ -275,14 +275,14 @@ discard block |
||
| 275 | 275 | |
| 276 | 276 | // Get CPU model |
| 277 | 277 | preg_match('/^model name\s*:\s*(.+)$/m', $cpuinfo, $modelMatches); |
| 278 | - if (! empty($modelMatches[1])) { |
|
| 278 | + if (!empty($modelMatches[1])) { |
|
| 279 | 279 | $info['model'] = trim($modelMatches[1]); |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | // If cores is 0, try to get from physical id count |
| 283 | 283 | if ($info['cores'] === 0) { |
| 284 | 284 | preg_match_all('/^physical id\s*:\s*(\d+)/m', $cpuinfo, $physicalMatches); |
| 285 | - $uniquePhysical = ! empty($physicalMatches[1]) ? count(array_unique($physicalMatches[1])) : 1; |
|
| 285 | + $uniquePhysical = !empty($physicalMatches[1]) ? count(array_unique($physicalMatches[1])) : 1; |
|
| 286 | 286 | $info['cores'] = (int) ($info['threads'] / $uniquePhysical); |
| 287 | 287 | } |
| 288 | 288 | } |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | */ |
| 115 | 115 | private function getRoleName(?int $roleId): string |
| 116 | 116 | { |
| 117 | - if (! $roleId) { |
|
| 117 | + if (!$roleId) { |
|
| 118 | 118 | return 'None'; |
| 119 | 119 | } |
| 120 | 120 | |
@@ -43,10 +43,10 @@ discard block |
||
| 43 | 43 | $this->checkSystemResources(); |
| 44 | 44 | |
| 45 | 45 | // Check if session already exists |
| 46 | - if (! $this->option('force') && $this->isSessionRunning($tmuxSession)) { |
|
| 46 | + if (!$this->option('force') && $this->isSessionRunning($tmuxSession)) { |
|
| 47 | 47 | $this->error("❌ Tmux session '$tmuxSession' is already running"); |
| 48 | 48 | |
| 49 | - if (! $this->confirm('Would you like to restart the session?')) { |
|
| 49 | + if (!$this->confirm('Would you like to restart the session?')) { |
|
| 50 | 50 | return Command::FAILURE; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | $recommendations = UpdatePerformanceHelper::checkSystemResources(); |
| 81 | 81 | |
| 82 | - if (! empty($recommendations)) { |
|
| 82 | + if (!empty($recommendations)) { |
|
| 83 | 83 | $this->warn('⚠️ System resource information:'); |
| 84 | 84 | foreach ($recommendations as $recommendation) { |
| 85 | 85 | $this->line(" • $recommendation"); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | $runScript = base_path('misc/update/tmux/run.php'); |
| 109 | 109 | |
| 110 | - if (! file_exists($runScript)) { |
|
| 110 | + if (!file_exists($runScript)) { |
|
| 111 | 111 | throw new \Exception("Tmux run script not found: $runScript"); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $this->info(' |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | $this->info(' |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $type = $this->option('type'); |
| 38 | 38 | $force = $this->option('force'); |
| 39 | 39 | |
| 40 | - if (! in_array($type, ['daily', 'hourly'])) { |
|
| 40 | + if (!in_array($type, ['daily', 'hourly'])) { |
|
| 41 | 41 | $this->error("Invalid type '{$type}'. Must be 'daily' or 'hourly'."); |
| 42 | 42 | |
| 43 | 43 | return Command::FAILURE; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | $date = Carbon::now()->subDays($i)->format('Y-m-d'); |
| 69 | 69 | |
| 70 | 70 | // Check if stats already exist for this date |
| 71 | - if (! $force && UserActivityStat::where('stat_date', $date)->exists()) { |
|
| 71 | + if (!$force && UserActivityStat::where('stat_date', $date)->exists()) { |
|
| 72 | 72 | $statsSkipped++; |
| 73 | 73 | $progressBar->advance(); |
| 74 | 74 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $hour = Carbon::now()->subHours($i)->startOfHour()->format('Y-m-d H:00:00'); |
| 129 | 129 | |
| 130 | 130 | // Check if stats already exist for this hour |
| 131 | - if (! $force && DB::table('user_activity_stats_hourly')->where('stat_hour', $hour)->exists()) { |
|
| 131 | + if (!$force && DB::table('user_activity_stats_hourly')->where('stat_hour', $hour)->exists()) { |
|
| 132 | 132 | $statsSkipped++; |
| 133 | 133 | $progressBar->advance(); |
| 134 | 134 | |
@@ -87,16 +87,16 @@ discard block |
||
| 87 | 87 | { |
| 88 | 88 | $steps = 3; // prepare, finalize, cleanup |
| 89 | 89 | |
| 90 | - if (! $this->option('skip-git')) { |
|
| 90 | + if (!$this->option('skip-git')) { |
|
| 91 | 91 | $steps++; |
| 92 | 92 | } |
| 93 | - if (! $this->option('skip-composer')) { |
|
| 93 | + if (!$this->option('skip-composer')) { |
|
| 94 | 94 | $steps++; |
| 95 | 95 | } |
| 96 | - if (! $this->option('skip-npm')) { |
|
| 96 | + if (!$this->option('skip-npm')) { |
|
| 97 | 97 | $steps += 2; |
| 98 | 98 | } // install + build |
| 99 | - if (! $this->option('skip-db')) { |
|
| 99 | + if (!$this->option('skip-db')) { |
|
| 100 | 100 | $steps++; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | // Check if app is in maintenance mode |
| 116 | 116 | $this->wasInMaintenance = App::isDownForMaintenance(); |
| 117 | - if (! $this->wasInMaintenance) { |
|
| 117 | + if (!$this->wasInMaintenance) { |
|
| 118 | 118 | $this->call('down', [ |
| 119 | 119 | '--render' => 'errors::maintenance', |
| 120 | 120 | '--retry' => 120, |
@@ -138,22 +138,22 @@ discard block |
||
| 138 | 138 | private function executeUpdateSteps(): void |
| 139 | 139 | { |
| 140 | 140 | // Git operations |
| 141 | - if (! $this->option('skip-git')) { |
|
| 141 | + if (!$this->option('skip-git')) { |
|
| 142 | 142 | $this->performGitUpdate(); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | // Composer operations |
| 146 | - if (! $this->option('skip-composer')) { |
|
| 146 | + if (!$this->option('skip-composer')) { |
|
| 147 | 147 | $this->performComposerUpdate(); |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | // Database migrations |
| 151 | - if (! $this->option('skip-db')) { |
|
| 151 | + if (!$this->option('skip-db')) { |
|
| 152 | 152 | $this->performDatabaseUpdate(); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | // NPM operations |
| 156 | - if (! $this->option('skip-npm')) { |
|
| 156 | + if (!$this->option('skip-npm')) { |
|
| 157 | 157 | $this->performNpmOperations(); |
| 158 | 158 | } |
| 159 | 159 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | { |
| 217 | 217 | // Check if package.json has changed |
| 218 | 218 | $packageLockExists = File::exists(base_path('package-lock.json')); |
| 219 | - $shouldInstall = ! $packageLockExists || $this->option('force'); |
|
| 219 | + $shouldInstall = !$packageLockExists || $this->option('force'); |
|
| 220 | 220 | |
| 221 | 221 | if ($shouldInstall) { |
| 222 | 222 | $this->info(' |
@@ -42,14 +42,14 @@ |
||
| 42 | 42 | $this->info(' |