Passed
Push — develop ( ac3052...955933 )
by nguereza
04:41
created
src/Console/Command/MakeListenerCommand.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * @class MakeListenerCommand
58 58
  * @package Platine\Framework\Console\Command
59 59
  */
60
-class MakeListenerCommand extends MakeCommand
61
-{
60
+class MakeListenerCommand extends MakeCommand {
62 61
     /**
63 62
      * {@inheritdoc}
64 63
      */
@@ -146,6 +145,4 @@  discard block
 block discarded – undo
146 145
      */
147 146
     protected function getUsesContent(): string
148 147
     {
149
-        return $this->getUsesTemplate($this->eventClass);
150
-    }
151
-}
148
+        return $this->getUsesTemplate($this->eventClass
152 149
\ No newline at end of file
Please login to merge, or discard this patch.
src/Console/Command/MakeValidatorCommand.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @class MakeValidatorCommand
61 61
  * @package Platine\Framework\Console\Command
62 62
  */
63
-class MakeValidatorCommand extends MakeCommand
64
-{
63
+class MakeValidatorCommand extends MakeCommand {
65 64
     /**
66 65
      * {@inheritdoc}
67 66
      */
@@ -257,6 +256,4 @@  discard block
 block discarded – undo
257 256
     {
258 257
         $paramName = basename($this->paramClass);
259 258
 
260
-        return str_replace('%param_class%', $paramName, $content);
261
-    }
262
-}
259
+        return str_replace('%param_class%', $paramName, $content
263 260
\ No newline at end of file
Please login to merge, or discard this patch.
src/Console/Command/MakeActionCommand.php 1 patch
Braces   +1 added lines, -35 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
  * @class MakeActionCommand
59 59
  * @package Platine\Framework\Console\Command
60 60
  */
61
-class MakeActionCommand extends MakeCommand
62
-{
61
+class MakeActionCommand extends MakeCommand {
63 62
     /**
64 63
      * {@inheritdoc}
65 64
      */
@@ -120,36 +119,3 @@  discard block
 block discarded – undo
120 119
     public function getClassTemplate(): string
121 120
     {
122 121
         return <<<EOF
123
-        <?php
124
-        
125
-        declare(strict_types=1);
126
-        
127
-        namespace %namespace%;
128
-        
129
-        use Platine\Http\Handler\RequestHandlerInterface;
130
-        use Platine\Http\ResponseInterface;
131
-        use Platine\Http\ServerRequestInterface;
132
-        %uses%
133
-
134
-        /**
135
-        * @class %classname%
136
-        * @package %namespace%
137
-        */
138
-        class %classname% implements RequestHandlerInterface
139
-        {
140
-            
141
-            %properties%
142
-        
143
-            %constructor%
144
-        
145
-            /**
146
-            * {@inheritdoc}
147
-            */
148
-            public function handle(ServerRequestInterface \$request): ResponseInterface
149
-            {
150
-            }
151
-        }
152
-        
153
-        EOF;
154
-    }
155
-}
Please login to merge, or discard this patch.
src/Console/Command/MakeMiddlewareCommand.php 1 patch
Braces   +1 added lines, -43 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class MakeMiddlewareCommand
56 56
  * @package Platine\Framework\Console\Command
57 57
  */
58
-class MakeMiddlewareCommand extends MakeCommand
59
-{
58
+class MakeMiddlewareCommand extends MakeCommand {
60 59
     /**
61 60
      * {@inheritdoc}
62 61
      */
@@ -82,44 +81,3 @@  discard block
 block discarded – undo
82 81
     public function getClassTemplate(): string
83 82
     {
84 83
         return <<<EOF
85
-        <?php
86
-        
87
-        declare(strict_types=1);
88
-        
89
-        namespace %namespace%;
90
-        
91
-        use Platine\Http\Handler\MiddlewareInterface;
92
-        use Platine\Http\Handler\RequestHandlerInterface;
93
-        use Platine\Http\ResponseInterface;
94
-        use Platine\Http\ServerRequestInterface;
95
-        %uses%
96
-
97
-        /**
98
-        * @class %classname%
99
-        * @package %namespace%
100
-        */
101
-        class %classname% implements MiddlewareInterface
102
-        {
103
-            /**
104
-            * {@inheritdoc}
105
-            */
106
-           public function process(
107
-               ServerRequestInterface \$request,
108
-               RequestHandlerInterface \$handler
109
-           ): ResponseInterface {
110
-               
111
-               return \$handler->handle(\$request);
112
-           }
113
-        }
114
-        
115
-        EOF;
116
-    }
117
-
118
-    /**
119
-     * {@inheritdoc}
120
-     */
121
-    protected function getUsesContent(): string
122
-    {
123
-        return '';
124
-    }
125
-}
Please login to merge, or discard this patch.
src/Console/Command/MakeProviderCommand.php 1 patch
Braces   +2 added lines, -12 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * @class MakeProviderCommand
58 58
  * @package Platine\Framework\Console\Command
59 59
  */
60
-class MakeProviderCommand extends MakeCommand
61
-{
60
+class MakeProviderCommand extends MakeCommand {
62 61
     /**
63 62
      * {@inheritdoc}
64 63
      */
@@ -203,13 +202,4 @@  discard block
 block discarded – undo
203 202
      */
204 203
     protected function getUsesContent(): string
205 204
     {
206
-        if (!$this->addRoutes) {
207
-            return '';
208
-        }
209
-
210
-        return <<<EOF
211
-        use Platine\Route\Router; 
212
-        
213
-        EOF;
214
-    }
215
-}
205
+        if (!$this->addRoutes
216 206
\ No newline at end of file
Please login to merge, or discard this patch.
src/Console/Command/MakeEntityCommand.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * @class MakeEntityCommand
58 58
  * @package Platine\Framework\Console\Command
59 59
  */
60
-class MakeEntityCommand extends MakeCommand
61
-{
60
+class MakeEntityCommand extends MakeCommand {
62 61
     /**
63 62
      * {@inheritdoc}
64 63
      */
@@ -186,6 +185,4 @@  discard block
 block discarded – undo
186 185
         EOF;
187 186
         }
188 187
 
189
-        return str_replace('%mapper_body%', $result, $content);
190
-    }
191
-}
188
+        return str_replace('%mapper_body%', $result, $content
192 189
\ No newline at end of file
Please login to merge, or discard this patch.
src/Console/Command/MakeEventCommand.php 1 patch
Braces   +1 added lines, -38 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class MakeEventCommand
56 56
  * @package Platine\Framework\Console\Command
57 57
  */
58
-class MakeEventCommand extends MakeCommand
59
-{
58
+class MakeEventCommand extends MakeCommand {
60 59
     /**
61 60
      * {@inheritdoc}
62 61
      */
@@ -82,39 +81,3 @@  discard block
 block discarded – undo
82 81
     public function getClassTemplate(): string
83 82
     {
84 83
         return <<<EOF
85
-        <?php
86
-        
87
-        declare(strict_types=1);
88
-        
89
-        namespace %namespace%;
90
-        
91
-        use Platine\Event\Event;
92
-        %uses%
93
-
94
-        /**
95
-        * @class %classname%
96
-        * @package %namespace%
97
-        */
98
-        class %classname% extends Event
99
-        {
100
-            /**
101
-            * Create new instance
102
-            */
103
-            public function __construct()
104
-            {
105
-               parent::__construct(__CLASS__, []);
106
-               
107
-            }
108
-        }
109
-        
110
-        EOF;
111
-    }
112
-
113
-    /**
114
-     * {@inheritdoc}
115
-     */
116
-    protected function getUsesContent(): string
117
-    {
118
-        return '';
119
-    }
120
-}
Please login to merge, or discard this patch.
src/Console/Command/MakeFormParamCommand.php 1 patch
Braces   +2 added lines, -12 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
  * @class MakeFormParamCommand
59 59
  * @package Platine\Framework\Console\Command
60 60
  */
61
-class MakeFormParamCommand extends MakeCommand
62
-{
61
+class MakeFormParamCommand extends MakeCommand {
63 62
     /**
64 63
      * {@inheritdoc}
65 64
      */
@@ -330,13 +329,4 @@  discard block
 block discarded – undo
330 329
      */
331 330
     protected function getUsesContent(): string
332 331
     {
333
-        if (!$this->createInstanceFormEntity) {
334
-            return '';
335
-        }
336
-
337
-        return <<<EOF
338
-        use Platine\Orm\Entity; 
339
-        
340
-        EOF;
341
-    }
342
-}
332
+        if (!$this->createInstanceFormEntity
343 333
\ No newline at end of file
Please login to merge, or discard this patch.
src/Console/Command/ConfigCommand.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
  * @package Platine\Framework\Console\Command
57 57
  * @template T
58 58
  */
59
-class ConfigCommand extends Command
60
-{
59
+class ConfigCommand extends Command {
61 60
     /**
62 61
      * The configuration instance
63 62
      * @var Config<T>
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * Create new instance
69 68
      * @param Config<T> $config
70 69
      */
71
-    public function __construct(Config $config)
72
-    {
70
+    public function __construct(Config $config) {
73 71
         parent::__construct('config', 'Command to manage configuration');
74 72
 
75 73
         $this->addOption('-l|--list', 'List the configuration', '', false);
@@ -81,8 +79,7 @@  discard block
 block discarded – undo
81 79
     /**
82 80
      * {@inheritdoc}
83 81
      */
84
-    public function execute()
85
-    {
82
+    public function execute() {
86 83
         if ($this->getOptionValue('list')) {
87 84
             $this->showConfigList();
88 85
         }
Please login to merge, or discard this patch.