@@ -5,9 +5,9 @@ |
||
5 | 5 | final class Status |
6 | 6 | { |
7 | 7 | const WAITING = 'waiting', |
8 | - RUNNING = 'running', |
|
9 | - FINISHED = 'finished', |
|
10 | - FAILED = 'failed'; |
|
8 | + RUNNING = 'running', |
|
9 | + FINISHED = 'finished', |
|
10 | + FAILED = 'failed'; |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * |
@@ -163,7 +163,7 @@ |
||
163 | 163 | } |
164 | 164 | |
165 | 165 | // Order Tasks |
166 | - usort($tasks, function ($a, $b) use ($orderBy) { |
|
166 | + usort($tasks, function($a, $b) use ($orderBy) { |
|
167 | 167 | $aValue = $a[$orderBy]; |
168 | 168 | $bValue = $b[$orderBy]; |
169 | 169 |
@@ -167,7 +167,9 @@ |
||
167 | 167 | $aValue = $a[$orderBy]; |
168 | 168 | $bValue = $b[$orderBy]; |
169 | 169 | |
170 | - if ($aValue === $bValue) return 0; |
|
170 | + if ($aValue === $bValue) { |
|
171 | + return 0; |
|
172 | + } |
|
171 | 173 | |
172 | 174 | return $aValue < $bValue ? -1 : 1; |
173 | 175 | }); |
@@ -19,9 +19,9 @@ |
||
19 | 19 | { |
20 | 20 | return cachedDispatcher(function (RouteCollector $r) { |
21 | 21 | |
22 | - $r->get( '/tasks', ListTasks::class ); |
|
22 | + $r->get( '/tasks', ListTasks::class ); |
|
23 | 23 | $r->post( '/tasks', AddTask::class ); |
24 | - $r->get( '/task/{identifier}', ShowTask::class ); |
|
24 | + $r->get( '/task/{identifier}', ShowTask::class ); |
|
25 | 25 | |
26 | 26 | }, [ |
27 | 27 | 'cacheFile' => $dir, |
@@ -17,11 +17,11 @@ |
||
17 | 17 | */ |
18 | 18 | public static function createFromCache(string $dir, bool $disable = false): Dispatcher |
19 | 19 | { |
20 | - return cachedDispatcher(function (RouteCollector $r) { |
|
20 | + return cachedDispatcher(function(RouteCollector $r) { |
|
21 | 21 | |
22 | - $r->get( '/tasks', ListTasks::class ); |
|
23 | - $r->post( '/tasks', AddTask::class ); |
|
24 | - $r->get( '/task/{identifier}', ShowTask::class ); |
|
22 | + $r->get('/tasks', ListTasks::class); |
|
23 | + $r->post('/tasks', AddTask::class); |
|
24 | + $r->get('/task/{identifier}', ShowTask::class); |
|
25 | 25 | |
26 | 26 | }, [ |
27 | 27 | 'cacheFile' => $dir, |