@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | // Sort all activities by date (most recent first) |
| 148 | - usort($activities, function ($a, $b) { |
|
| 148 | + usort($activities, function($a, $b) { |
|
| 149 | 149 | return $b->created_at <=> $a->created_at; |
| 150 | 150 | }); |
| 151 | 151 | |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | // Get number of physical cores |
| 328 | 328 | preg_match_all('/^cpu cores\s*:\s*(\d+)/m', $cpuinfo, $coresMatches); |
| 329 | - if (! empty($coresMatches[1])) { |
|
| 329 | + if (!empty($coresMatches[1])) { |
|
| 330 | 330 | $info['cores'] = (int) $coresMatches[1][0]; |
| 331 | 331 | } |
| 332 | 332 | |
@@ -336,14 +336,14 @@ discard block |
||
| 336 | 336 | |
| 337 | 337 | // Get CPU model |
| 338 | 338 | preg_match('/^model name\s*:\s*(.+)$/m', $cpuinfo, $modelMatches); |
| 339 | - if (! empty($modelMatches[1])) { |
|
| 339 | + if (!empty($modelMatches[1])) { |
|
| 340 | 340 | $info['model'] = trim($modelMatches[1]); |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | // If cores is 0, try to get from physical id count |
| 344 | 344 | if ($info['cores'] === 0) { |
| 345 | 345 | preg_match_all('/^physical id\s*:\s*(\d+)/m', $cpuinfo, $physicalMatches); |
| 346 | - $uniquePhysical = ! empty($physicalMatches[1]) ? count(array_unique($physicalMatches[1])) : 1; |
|
| 346 | + $uniquePhysical = !empty($physicalMatches[1]) ? count(array_unique($physicalMatches[1])) : 1; |
|
| 347 | 347 | $info['cores'] = (int) ($info['threads'] / $uniquePhysical); |
| 348 | 348 | } |
| 349 | 349 | } |