@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class CsvReader |
| 54 | 54 | * @package Platine\Framework\Helper |
| 55 | 55 | */ |
| 56 | -class CsvReader |
|
| 57 | -{ |
|
| 56 | +class CsvReader { |
|
| 58 | 57 | /** |
| 59 | 58 | * The valid delimiters list |
| 60 | 59 | * @var array<string> |
@@ -150,8 +150,8 @@ |
||
| 150 | 150 | $task->run(); |
| 151 | 151 | } catch (Throwable $e) { |
| 152 | 152 | $this->logger->error('Error occurred when execute task {task}, error: {error}', [ |
| 153 | - 'task' => $task->name(), |
|
| 154 | - 'error' => $e->getMessage() |
|
| 153 | + 'task' => $task->name(), |
|
| 154 | + 'error' => $e->getMessage() |
|
| 155 | 155 | ]); |
| 156 | 156 | } |
| 157 | 157 | } |
@@ -56,8 +56,7 @@ |
||
| 56 | 56 | * @class Scheduler |
| 57 | 57 | * @package Platine\Framework\Task |
| 58 | 58 | */ |
| 59 | -class Scheduler implements SchedulerInterface |
|
| 60 | -{ |
|
| 59 | +class Scheduler implements SchedulerInterface { |
|
| 61 | 60 | /** |
| 62 | 61 | * The logger instance |
| 63 | 62 | * @var LoggerInterface |
@@ -51,8 +51,7 @@ |
||
| 51 | 51 | * @class TaskInterface |
| 52 | 52 | * @package Platine\Framework\Task |
| 53 | 53 | */ |
| 54 | -interface TaskInterface |
|
| 55 | -{ |
|
| 54 | +interface TaskInterface { |
|
| 56 | 55 | /** |
| 57 | 56 | * Execute the task |
| 58 | 57 | * @return void |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class Cron |
| 54 | 54 | * @package Platine\Framework\Task |
| 55 | 55 | */ |
| 56 | -class Cron |
|
| 57 | -{ |
|
| 56 | +class Cron { |
|
| 58 | 57 | /** |
| 59 | 58 | * Parse the given cron expression and finds next execution time(stamp) |
| 60 | 59 | * @param string $expression |
@@ -51,8 +51,7 @@ |
||
| 51 | 51 | * @class SchedulerInterface |
| 52 | 52 | * @package Platine\Framework\Task |
| 53 | 53 | */ |
| 54 | -interface SchedulerInterface |
|
| 55 | -{ |
|
| 54 | +interface SchedulerInterface { |
|
| 56 | 55 | /** |
| 57 | 56 | * Execute the scheduler |
| 58 | 57 | * @return void |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | parent::__construct($scheduler, $application, $config); |
| 74 | 74 | |
| 75 | 75 | $this->setName('scheduler:list') |
| 76 | - ->setDescription('Show the list of scheduled tasks'); |
|
| 76 | + ->setDescription('Show the list of scheduled tasks'); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -59,8 +59,7 @@ discard block |
||
| 59 | 59 | * @template T |
| 60 | 60 | * @extends AbstractCommand<T> |
| 61 | 61 | */ |
| 62 | -class SchedulerListCommand extends AbstractCommand |
|
| 63 | -{ |
|
| 62 | +class SchedulerListCommand extends AbstractCommand { |
|
| 64 | 63 | /** |
| 65 | 64 | * Create new instance |
| 66 | 65 | * @param SchedulerInterface $scheduler |
@@ -81,8 +80,7 @@ discard block |
||
| 81 | 80 | /** |
| 82 | 81 | * {@inheritdoc} |
| 83 | 82 | */ |
| 84 | - public function execute() |
|
| 85 | - { |
|
| 83 | + public function execute() { |
|
| 86 | 84 | //Load the task list |
| 87 | 85 | $this->loadTasks(); |
| 88 | 86 | |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | parent::__construct($scheduler, $application, $config); |
| 73 | 73 | |
| 74 | 74 | $this->setName('scheduler:run') |
| 75 | - ->setDescription('Execute the scheduled tasks'); |
|
| 75 | + ->setDescription('Execute the scheduled tasks'); |
|
| 76 | 76 | |
| 77 | 77 | $this->addArgument('name', 'the name of task to execute instead of all', null, false, true); |
| 78 | 78 | } |
@@ -57,8 +57,7 @@ discard block |
||
| 57 | 57 | * @template T |
| 58 | 58 | * @extends AbstractCommand<T> |
| 59 | 59 | */ |
| 60 | -class SchedulerRunCommand extends AbstractCommand |
|
| 61 | -{ |
|
| 60 | +class SchedulerRunCommand extends AbstractCommand { |
|
| 62 | 61 | /** |
| 63 | 62 | * Create new instance |
| 64 | 63 | * @param SchedulerInterface $scheduler |
@@ -81,8 +80,7 @@ discard block |
||
| 81 | 80 | /** |
| 82 | 81 | * {@inheritdoc} |
| 83 | 82 | */ |
| 84 | - public function execute() |
|
| 85 | - { |
|
| 83 | + public function execute() { |
|
| 86 | 84 | //Load the task |
| 87 | 85 | $this->loadTasks(); |
| 88 | 86 | |
@@ -57,8 +57,7 @@ |
||
| 57 | 57 | * @class SchedulerServiceProvider |
| 58 | 58 | * @package Platine\Framework\Service\Provider |
| 59 | 59 | */ |
| 60 | -class SchedulerServiceProvider extends ServiceProvider |
|
| 61 | -{ |
|
| 60 | +class SchedulerServiceProvider extends ServiceProvider { |
|
| 62 | 61 | /** |
| 63 | 62 | * {@inheritdoc} |
| 64 | 63 | */ |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | ) { |
| 89 | 89 | parent::__construct($application, $filesystem); |
| 90 | 90 | $this->setName('make:task') |
| 91 | - ->setDescription('Command to generate new task class'); |
|
| 91 | + ->setDescription('Command to generate new task class'); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | * @class MakeTaskCommand |
| 59 | 59 | * @package Platine\Framework\Console\Command |
| 60 | 60 | */ |
| 61 | -class MakeTaskCommand extends MakeCommand |
|
| 62 | -{ |
|
| 61 | +class MakeTaskCommand extends MakeCommand { |
|
| 63 | 62 | /** |
| 64 | 63 | * {@inheritdoc} |
| 65 | 64 | */ |