Passed
Push — develop ( 027947...5e3b9c )
by nguereza
02:57
created
src/Http/Maintenance/Driver/FileMaintenanceDriver.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @package Platine\Framework\Http\Maintenance\Driver
56 56
  * @template T
57 57
  */
58
-class FileMaintenanceDriver implements MaintenanceDriverInterface
59
-{
58
+class FileMaintenanceDriver implements MaintenanceDriverInterface {
60 59
     /**
61 60
      * The application configuration
62 61
      * @var Config<T>
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
      * @param Config<T> $config
75 74
      * @param Filesystem $filesystem
76 75
      */
77
-    public function __construct(Config $config, Filesystem $filesystem)
78
-    {
76
+    public function __construct(Config $config, Filesystem $filesystem) {
79 77
         $this->config = $config;
80 78
         $this->filesystem = $filesystem;
81 79
     }
Please login to merge, or discard this patch.
src/Http/Maintenance/MaintenanceDriverInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Console/Command/MaintenanceCommand.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $this->config = $config;
86 86
 
87 87
         $this->setName('maintenance')
88
-             ->setDescription('The Maintenance management command');
88
+                ->setDescription('The Maintenance management command');
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
 block discarded – undo
95 95
                 ));
96 96
             }
97 97
 
98
-             return $val;
98
+                return $val;
99 99
         });
100 100
 
101 101
         $this->addOption(
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $this->setName('maintenance')
88 88
              ->setDescription('The Maintenance management command');
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
 block discarded – undo
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',
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             false,
130 130
             true,
131 131
             false,
132
-            function ($val) {
132
+            function($val) {
133 133
                 if (strlen($val) > 0 && (!is_numeric($val) || (int) $val <= 0)) {
134 134
                     throw new RuntimeException(sprintf(
135 135
                         'Invalid refresh value [%s], must be an integer greather than zero',
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             false,
153 153
             true,
154 154
             false,
155
-            function ($val) {
155
+            function($val) {
156 156
                 if (strlen($val) > 0 && (!is_numeric($val) || (int) $val < 200 || (int) $val > 505)) {
157 157
                     throw new RuntimeException(sprintf(
158 158
                         'Invalid HTTP status value [%s], must be between 200 and 505',
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Service/Provider/BaseServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $this->app->share(Application::class, $this->app);
79 79
         $this->app->share('app', $this->app);
80
-        $this->app->share(ConsoleApp::class, function () {
80
+        $this->app->share(ConsoleApp::class, function() {
81 81
             return new ConsoleApp('PLATINE CONSOLE', '1.0.0');
82 82
         });
83 83
         $this->app->share(ContainerInterface::class, $this->app);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $this->app->bind(RouteCollectionInterface::class, RouteCollection::class);
87 87
         $this->app->bind(MiddlewareResolverInterface::class, MiddlewareResolver::class);
88 88
         $this->app->bind(MaintenanceDriverInterface::class, FileMaintenanceDriver::class);
89
-        $this->app->bind(EmitterInterface::class, function (ContainerInterface $app) {
89
+        $this->app->bind(EmitterInterface::class, function(ContainerInterface $app) {
90 90
             return new ResponseEmitter(
91 91
                 $app->get(Config::class)->get('app.response_chunck_size', null)
92 92
             );
Please login to merge, or discard this patch.