@@ -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 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | $this->rewind(); |
| 35 | - for ($i=0; $i<$key; $i++) { |
|
| 35 | + for ($i = 0; $i < $key; $i++) { |
|
| 36 | 36 | $this->next(); |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -42,11 +42,11 @@ |
||
| 42 | 42 | ->setName('list') |
| 43 | 43 | ->setDescription('Lists tasks') |
| 44 | 44 | ->addOption('profile', 'p', InputOption::VALUE_OPTIONAL, 'Limits the listing to a profile') |
| 45 | - ->addOption('status', 's', InputOption::VALUE_OPTIONAL, 'Limits the listing to a status') |
|
| 46 | - ->addOption('tags', 't', InputOption::VALUE_IS_ARRAY|InputOption::VALUE_OPTIONAL, 'Limits the listing to one or many (array) tags') |
|
| 47 | - ->addOption('order', 'o', InputOption::VALUE_REQUIRED, 'Orders tasks by "date", "profile" or "status"', 'status') |
|
| 48 | - ->addOption('follow', 'f', InputOption::VALUE_NONE, 'Enables to keep tasks evolution on the console') |
|
| 49 | - ->addOption('legend', 'l', InputOption::VALUE_NONE, 'Displays a legend for status labels at the list footer') |
|
| 45 | + ->addOption('status', 's', InputOption::VALUE_OPTIONAL, 'Limits the listing to a status') |
|
| 46 | + ->addOption('tags', 't', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'Limits the listing to one or many (array) tags') |
|
| 47 | + ->addOption('order', 'o', InputOption::VALUE_REQUIRED, 'Orders tasks by "date", "profile" or "status"', 'status') |
|
| 48 | + ->addOption('follow', 'f', InputOption::VALUE_NONE, 'Enables to keep tasks evolution on the console') |
|
| 49 | + ->addOption('legend', 'l', InputOption::VALUE_NONE, 'Displays a legend for status labels at the list footer') |
|
| 50 | 50 | ; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | ->addArgument('profile', InputArgument::REQUIRED, 'Profile name') |
| 25 | 25 | ->addArgument('job', InputArgument::REQUIRED, 'Job class name') |
| 26 | 26 | ->addArgument('parameters', InputArgument::IS_ARRAY, 'List of parameters (key:value)', []) |
| 27 | - ->addOption('tags', 't', InputOption::VALUE_IS_ARRAY|InputOption::VALUE_OPTIONAL, 'Add one or multiple (array) tags') |
|
| 27 | + ->addOption('tags', 't', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'Add one or multiple (array) tags') |
|
| 28 | 28 | ; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -15,11 +15,11 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public static function create(): Dispatcher |
| 17 | 17 | { |
| 18 | - return cachedDispatcher(function (RouteCollector $r) |
|
| 18 | + return cachedDispatcher(function(RouteCollector $r) |
|
| 19 | 19 | { |
| 20 | - $r->get( '/tasks', ListTasks::class ); |
|
| 21 | - $r->post( '/tasks', AddTask::class ); |
|
| 22 | - $r->get( '/task/{identifier}', ShowTask::class ); |
|
| 20 | + $r->get('/tasks', ListTasks::class); |
|
| 21 | + $r->post('/tasks', AddTask::class); |
|
| 22 | + $r->get('/task/{identifier}', ShowTask::class); |
|
| 23 | 23 | |
| 24 | 24 | }, [ |
| 25 | 25 | 'cacheFile' => self::getRoutingCachePath(), |