@@ -51,8 +51,7 @@ |
||
51 | 51 | * @class MaintenanceDriverInterface |
52 | 52 | * @package Platine\Framework\Http\Maintenance |
53 | 53 | */ |
54 | -interface MaintenanceDriverInterface |
|
55 | -{ |
|
54 | +interface MaintenanceDriverInterface { |
|
56 | 55 | /** |
57 | 56 | * Whether the maintenance is active or not |
58 | 57 | * @return bool |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * @package Platine\Framework\Console\Command |
59 | 59 | * @template T |
60 | 60 | */ |
61 | -class MaintenanceCommand extends Command |
|
62 | -{ |
|
61 | +class MaintenanceCommand extends Command { |
|
63 | 62 | /** |
64 | 63 | * The configuration to use |
65 | 64 | * @var Config<T> |
@@ -173,8 +172,7 @@ discard block |
||
173 | 172 | /** |
174 | 173 | * {@inheritdoc} |
175 | 174 | */ |
176 | - public function execute() |
|
177 | - { |
|
175 | + public function execute() { |
|
178 | 176 | $type = $this->getArgumentValue('type'); |
179 | 177 | |
180 | 178 | $io = $this->io(); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $this->config = $config; |
86 | 86 | |
87 | 87 | $this->setName('maintenance') |
88 | - ->setDescription('Command to manage application maintenance'); |
|
88 | + ->setDescription('Command to manage application maintenance'); |
|
89 | 89 | |
90 | 90 | $this->addArgument('type', 'type of action [up|down]', 'up', true, true, false, function ($val) { |
91 | 91 | if (!in_array($val, ['up', 'down'])) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | )); |
96 | 96 | } |
97 | 97 | |
98 | - return $val; |
|
98 | + return $val; |
|
99 | 99 | }); |
100 | 100 | |
101 | 101 | $this->addOption( |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $this->setName('maintenance') |
88 | 88 | ->setDescription('Command to manage application maintenance'); |
89 | 89 | |
90 | - $this->addArgument('type', 'type of action [up|down]', 'up', true, true, false, function ($val) { |
|
90 | + $this->addArgument('type', 'type of action [up|down]', 'up', true, true, false, function($val) { |
|
91 | 91 | if (!in_array($val, ['up', 'down'])) { |
92 | 92 | throw new RuntimeException(sprintf( |
93 | 93 | 'Invalid argument type [%s], must be one of [up, down]', |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | false, |
114 | 114 | true, |
115 | 115 | false, |
116 | - function ($val) { |
|
116 | + function($val) { |
|
117 | 117 | if (strlen($val) > 0 && (!is_numeric($val) || (int) $val <= 0)) { |
118 | 118 | throw new RuntimeException(sprintf( |
119 | 119 | 'Invalid retry value [%s], must be an integer greather than zero', |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | false, |
132 | 132 | true, |
133 | 133 | false, |
134 | - function ($val) { |
|
134 | + function($val) { |
|
135 | 135 | if (strlen($val) > 0 && (!is_numeric($val) || (int) $val <= 0)) { |
136 | 136 | throw new RuntimeException(sprintf( |
137 | 137 | 'Invalid refresh value [%s], must be an integer greather than zero', |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | false, |
157 | 157 | true, |
158 | 158 | false, |
159 | - function ($val) { |
|
159 | + function($val) { |
|
160 | 160 | if (strlen($val) > 0 && (!is_numeric($val) || (int) $val < 200 || (int) $val > 505)) { |
161 | 161 | throw new RuntimeException(sprintf( |
162 | 162 | 'Invalid HTTP status value [%s], must be between 200 and 505', |