Passed
Push — develop ( ec03b4...36c2b4 )
by nguereza
02:46
created
src/Demo/Provider/PermissionServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
      */
78 78
     public function addRoutes(Router $router): void
79 79
     {
80
-        $router->group('/permissions', function (Router $router) {
80
+        $router->group('/permissions', function(Router $router) {
81 81
             $router->get('', ListAction::class, 'permission_list');
82 82
             $router->post('/batch', BatchAction::class, 'permission_batch');
83 83
             $router->add('/add', CreateAction::class, ['GET', 'POST'], 'permission_create');
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
  * @class PermissionServiceProvider
59 59
  * @package Platine\Framework
60 60
  */
61
-class PermissionServiceProvider extends ServiceProvider
62
-{
61
+class PermissionServiceProvider extends ServiceProvider {
63 62
 
64 63
     /**
65 64
      * {@inheritdoc}
Please login to merge, or discard this patch.
public/index.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 
7 7
 $app = new Application();
8 8
 $app->setConfigPath(__DIR__ . '/../config')
9
-      ->setAppPath(dirname(__DIR__))
10
-      ->setVendorPath(dirname(__DIR__) . '/../../vendor');
9
+        ->setAppPath(dirname(__DIR__))
10
+        ->setVendorPath(dirname(__DIR__) . '/../../vendor');
11 11
 
12 12
 /** @var HttpKernel $kernel */
13 13
 $kernel = $app->make(HttpKernel::class); 
Please login to merge, or discard this patch.
src/Service/Provider/PaginationServiceProvider.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
             $config = $app->get(Config::class);
88 88
 
89 89
             $pagination->setItemsPerPage($config->get('pagination.item_per_page', 10))
90
-                      ->setMaxPages($config->get('pagination.max_pages', 5));
90
+                        ->setMaxPages($config->get('pagination.max_pages', 5));
91 91
 
92 92
             return $pagination;
93 93
         });
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
  * @class PaginationServiceProvider
62 62
  * @package Platine\Framework\Service\Provider
63 63
  */
64
-class PaginationServiceProvider extends ServiceProvider
65
-{
64
+class PaginationServiceProvider extends ServiceProvider {
66 65
 
67 66
     /**
68 67
      * {@inheritdoc}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function register(): void
71 71
     {
72
-        $this->app->bind(UrlGeneratorInterface::class, function (ContainerInterface $app) {
72
+        $this->app->bind(UrlGeneratorInterface::class, function(ContainerInterface $app) {
73 73
             return new ServerRequestUrlGenerator(
74 74
                 $app->get(ServerRequestInterface::class),
75 75
                 'page'
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
         $this->app->bind(RendererInterface::class, BootstrapRenderer::class);
80 80
 
81
-        $this->app->bind(Pagination::class, function (ContainerInterface $app) {
81
+        $this->app->bind(Pagination::class, function(ContainerInterface $app) {
82 82
             $pagination = new Pagination(
83 83
                 $app->get(UrlGeneratorInterface::class),
84 84
                 $app->get(RendererInterface::class)
Please login to merge, or discard this patch.
src/Console/Command/MakeActionCommand.php 5 patches
Indentation   +1 added lines, -29 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     ) {
75 75
         parent::__construct($application, $filesystem);
76 76
         $this->setName('make:action')
77
-               ->setDescription('Command to generate new request handler class');
77
+                ->setDescription('Command to generate new request handler class');
78 78
 
79 79
         $this->addOption('-o|--overwrite', 'Overwrite existing files.', false, false);
80 80
     }
@@ -85,31 +85,3 @@  discard block
 block discarded – undo
85 85
     public function getClassTemplate(): string
86 86
     {
87 87
         return <<<EOF
88
-        <?php
89
-        
90
-        declare(strict_types=1);
91
-        
92
-        namespace %namespace%;
93
-
94
-        use Platine\Http\Handler\RequestHandlerInterface;
95
-        use Platine\Http\ResponseInterface;
96
-        use Platine\Http\ServerRequestInterface;
97
-
98
-        /**
99
-        * @class %classname%
100
-        * @package %namespace%
101
-        */
102
-        class %classname% implements RequestHandlerInterface
103
-        {
104
-
105
-            /**
106
-            * {@inheritodc}
107
-            */
108
-            public function handle(ServerRequestInterface \$request): ResponseInterface
109
-            {
110
-            }
111
-        }
112
-        
113
-        EOF;
114
-    }
115
-}
Please login to merge, or discard this patch.
Switch Indentation   -28 removed lines patch added patch discarded remove patch
@@ -85,31 +85,3 @@
 block discarded – undo
85 85
     public function getClassTemplate(): string
86 86
     {
87 87
         return <<<EOF
88
-        <?php
89
-        
90
-        declare(strict_types=1);
91
-        
92
-        namespace %namespace%;
93
-
94
-        use Platine\Http\Handler\RequestHandlerInterface;
95
-        use Platine\Http\ResponseInterface;
96
-        use Platine\Http\ServerRequestInterface;
97
-
98
-        /**
99
-        * @class %classname%
100
-        * @package %namespace%
101
-        */
102
-        class %classname% implements RequestHandlerInterface
103
-        {
104
-
105
-            /**
106
-            * {@inheritodc}
107
-            */
108
-            public function handle(ServerRequestInterface \$request): ResponseInterface
109
-            {
110
-            }
111
-        }
112
-        
113
-        EOF;
114
-    }
115
-}
Please login to merge, or discard this patch.
Spacing   -28 removed lines patch added patch discarded remove patch
@@ -85,31 +85,3 @@
 block discarded – undo
85 85
     public function getClassTemplate(): string
86 86
     {
87 87
         return <<<EOF
88
-        <?php
89
-        
90
-        declare(strict_types=1);
91
-        
92
-        namespace %namespace%;
93
-
94
-        use Platine\Http\Handler\RequestHandlerInterface;
95
-        use Platine\Http\ResponseInterface;
96
-        use Platine\Http\ServerRequestInterface;
97
-
98
-        /**
99
-        * @class %classname%
100
-        * @package %namespace%
101
-        */
102
-        class %classname% implements RequestHandlerInterface
103
-        {
104
-
105
-            /**
106
-            * {@inheritodc}
107
-            */
108
-            public function handle(ServerRequestInterface \$request): ResponseInterface
109
-            {
110
-            }
111
-        }
112
-        
113
-        EOF;
114
-    }
115
-}
Please login to merge, or discard this patch.
Braces   +1 added lines, -30 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class MakeActionCommand
56 56
  * @package Platine\Framework\Console\Command
57 57
  */
58
-class MakeActionCommand extends MakeCommand
59
-{
58
+class MakeActionCommand extends MakeCommand {
60 59
 
61 60
     /**
62 61
      * {@inheritodc}
@@ -85,31 +84,3 @@  discard block
 block discarded – undo
85 84
     public function getClassTemplate(): string
86 85
     {
87 86
         return <<<EOF
88
-        <?php
89
-        
90
-        declare(strict_types=1);
91
-        
92
-        namespace %namespace%;
93
-
94
-        use Platine\Http\Handler\RequestHandlerInterface;
95
-        use Platine\Http\ResponseInterface;
96
-        use Platine\Http\ServerRequestInterface;
97
-
98
-        /**
99
-        * @class %classname%
100
-        * @package %namespace%
101
-        */
102
-        class %classname% implements RequestHandlerInterface
103
-        {
104
-
105
-            /**
106
-            * {@inheritodc}
107
-            */
108
-            public function handle(ServerRequestInterface \$request): ResponseInterface
109
-            {
110
-            }
111
-        }
112
-        
113
-        EOF;
114
-    }
115
-}
Please login to merge, or discard this patch.
Upper-Lower-Casing   -28 removed lines patch added patch discarded remove patch
@@ -85,31 +85,3 @@
 block discarded – undo
85 85
     public function getClassTemplate(): string
86 86
     {
87 87
         return <<<EOF
88
-        <?php
89
-        
90
-        declare(strict_types=1);
91
-        
92
-        namespace %namespace%;
93
-
94
-        use Platine\Http\Handler\RequestHandlerInterface;
95
-        use Platine\Http\ResponseInterface;
96
-        use Platine\Http\ServerRequestInterface;
97
-
98
-        /**
99
-        * @class %classname%
100
-        * @package %namespace%
101
-        */
102
-        class %classname% implements RequestHandlerInterface
103
-        {
104
-
105
-            /**
106
-            * {@inheritodc}
107
-            */
108
-            public function handle(ServerRequestInterface \$request): ResponseInterface
109
-            {
110
-            }
111
-        }
112
-        
113
-        EOF;
114
-    }
115
-}
Please login to merge, or discard this patch.
src/Console/MakeCommand.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * @class MakeCommand
58 58
  * @package Platine\Framework\Console
59 59
  */
60
-abstract class MakeCommand extends Command
61
-{
60
+abstract class MakeCommand extends Command {
62 61
 
63 62
     /**
64 63
      * The Application instance
@@ -111,8 +110,7 @@  discard block
 block discarded – undo
111 110
     /**
112 111
      * {@inheritodc}
113 112
      */
114
-    public function execute()
115
-    {
113
+    public function execute() {
116 114
         $writer = $this->io()->writer();
117 115
         $name = $this->getArgumentValue('name');
118 116
         $cleanName = str_replace('/', '\\', $name);
Please login to merge, or discard this patch.
src/Pagination/BootstrapRenderer.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,8 @@
 block discarded – undo
79 79
         foreach ($pages as $page) {
80 80
             if ($page->getUrl() !== null) {
81 81
                 $html .= '<li class = "page-item' . ($page->isCurrent() ? '  active"' : '"')
82
-                      . '><a href = "' . $page->getUrl() . '" class="page-link">'
83
-                      . $page->getNumber() . '</a></li>';
82
+                        . '><a href = "' . $page->getUrl() . '" class="page-link">'
83
+                        . $page->getNumber() . '</a></li>';
84 84
             } else {
85 85
                 $html .= '<li class = "page-item disabled"><a href="#" class="page-link">'
86 86
                         . $page->getNumber() . '</a></li>';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
  * @class BootstrapRenderer
55 55
  * @package Platine\Framework\Pagination
56 56
  */
57
-class BootstrapRenderer implements RendererInterface
58
-{
57
+class BootstrapRenderer implements RendererInterface {
59 58
 
60 59
     /**
61 60
      * {@inheritdoc}
Please login to merge, or discard this patch.
src/Pagination/ServerRequestUrlGenerator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * @class ServerRequestUrlGenerator
55 55
  * @package Platine\Framework\Pagination
56 56
  */
57
-class ServerRequestUrlGenerator implements UrlGeneratorInterface
58
-{
57
+class ServerRequestUrlGenerator implements UrlGeneratorInterface {
59 58
 
60 59
     /**
61 60
      * The server request instance
@@ -80,8 +79,7 @@  discard block
 block discarded – undo
80 79
      * @param ServerRequestInterface $request
81 80
      * @param string $queryName
82 81
      */
83
-    public function __construct(ServerRequestInterface $request, string $queryName)
84
-    {
82
+    public function __construct(ServerRequestInterface $request, string $queryName) {
85 83
         $this->request = $request;
86 84
         $this->queryVarName = $queryName;
87 85
 
Please login to merge, or discard this patch.
src/Demo/Form/Validator/AuthValidator.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,12 +91,12 @@
 block discarded – undo
91 91
     public function setValidationRules(): void
92 92
     {
93 93
         $this->addRules('username', [
94
-           new NotEmpty(),
95
-           new MinLength(3)
94
+            new NotEmpty(),
95
+            new MinLength(3)
96 96
         ]);
97 97
 
98 98
         $this->addRules('password', [
99
-           new NotEmpty(),
99
+            new NotEmpty(),
100 100
         ]);
101 101
     }
102 102
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * @class AuthValidator
58 58
  * @package Platine\Framework\Demo\Form\Validator
59 59
  */
60
-class AuthValidator extends AbstractValidator
61
-{
60
+class AuthValidator extends AbstractValidator {
62 61
     /**
63 62
      * The parameter instance
64 63
      * @var AuthParam
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
      * @param AuthParam $param
71 70
      * @param Lang $lang
72 71
      */
73
-    public function __construct(AuthParam $param, Lang $lang)
74
-    {
72
+    public function __construct(AuthParam $param, Lang $lang) {
75 73
         parent::__construct($lang);
76 74
         $this->param = $param;
77 75
     }
Please login to merge, or discard this patch.
src/Demo/Form/Validator/RoleValidator.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,12 +92,12 @@
 block discarded – undo
92 92
     public function setValidationRules(): void
93 93
     {
94 94
         $this->addRules('name', [
95
-           new NotEmpty(),
96
-           new MinLength(2)
95
+            new NotEmpty(),
96
+            new MinLength(2)
97 97
         ]);
98 98
 
99 99
         $this->addRules('description', [
100
-           new MinLength(3)
100
+            new MinLength(3)
101 101
         ]);
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
  * @class RoleValidator
58 58
  * @package Platine\Framework\Demo\Form\Validator
59 59
  */
60
-class RoleValidator extends AbstractValidator
61
-{
60
+class RoleValidator extends AbstractValidator {
62 61
 
63 62
     /**
64 63
      * The parameter instance
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
      * @param RoleParam $param
72 71
      * @param Lang $lang
73 72
      */
74
-    public function __construct(RoleParam $param, Lang $lang)
75
-    {
73
+    public function __construct(RoleParam $param, Lang $lang) {
76 74
         parent::__construct($lang);
77 75
         $this->param = $param;
78 76
     }
Please login to merge, or discard this patch.