Completed
Branch master (7eae42)
by Thiago
14:03
created
src/Bootstrap.php 3 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,13 +115,17 @@
 block discarded – undo
115 115
     /**
116 116
      * Load controllers
117 117
      *
118
-     * @param $routeFile
118
+     * @param string|null $routeFile
119 119
      * @internal param string $routesPath
120 120
      */
121 121
     private function controllers($routeFile)
122 122
     {
123 123
         $this['routes'] = $this->extend(
124 124
             'routes',
125
+
126
+            /**
127
+             * @param string|null $routes
128
+             */
125 129
             function (RouteCollection $routes) use ($routeFile) {
126 130
                 $routesPath = dirname($routeFile);
127 131
                 $loader     = new RoutingFileLoader(new FileLocator($routesPath));
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of Skel system
4
- *
5
- * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
- */
3
+     * This file is part of Skel system
4
+     *
5
+     * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
+     */
7 7
 namespace Skel;
8 8
 
9 9
 use Skel\Response as View;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->controllers($route);
59 59
 
60 60
         $this->before(
61
-            function (Request $request) {
61
+            function(Request $request) {
62 62
                 // Skipping OPTIONS requests
63 63
                 if ($request->getMethod() === 'OPTIONS') {
64 64
                     return;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         );
85 85
 
86 86
         $this->after(
87
-            function (Request $request, Response $response, Bootstrap $app) {
87
+            function(Request $request, Response $response, Bootstrap $app) {
88 88
                 $app[CorsServiceProvider::HTTP_CORS]($request, $response);
89 89
 
90 90
                 $this['dispatcher']->dispatch($request->attributes->get('_route') . '.after');
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
         );
93 93
 
94 94
         $this->finish(
95
-            function (Request $request, Response $response) {
95
+            function(Request $request, Response $response) {
96 96
                 $this['dispatcher']->dispatch($request->attributes->get('_route') . '.finish');
97 97
             }
98 98
         );
99 99
 
100 100
         $this->error(
101
-            function (\Exception $e, $code = Response::HTTP_INTERNAL_SERVER_ERROR) {
101
+            function(\Exception $e, $code = Response::HTTP_INTERNAL_SERVER_ERROR) {
102 102
                 if ($e->getCode() !== 0) {
103 103
                     $code = $e->getCode();
104 104
                 }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     {
123 123
         $this['routes'] = $this->extend(
124 124
             'routes',
125
-            function (RouteCollection $routes) use ($routeFile) {
125
+            function(RouteCollection $routes) use ($routeFile) {
126 126
                 $routesPath = dirname($routeFile);
127 127
                 $loader     = new RoutingFileLoader(new FileLocator($routesPath));
128 128
                 $collection = $loader->load(basename($routeFile));
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
                 'orm.auto_generate_proxies' => APPLICATION_ENV !== 'production' ? true : false,
188 188
                 "orm.em.options"            => [
189 189
                     "mappings"          => $this['config']['mappings'],
190
-                    "query_cache"       => [ "driver" => "array" ],
191
-                    "metadata_cache"    => [ "driver" => "array" ],
192
-                    "hydratation_cache" => [ "driver" => "array" ]
190
+                    "query_cache"       => ["driver" => "array"],
191
+                    "metadata_cache"    => ["driver" => "array"],
192
+                    "hydratation_cache" => ["driver" => "array"]
193 193
                 ]
194 194
             ]
195 195
         );
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     private function translations()
227 227
     {
228
-        $this['translator'] = $this->share($this->extend('translator', function ($translator) {
228
+        $this['translator'] = $this->share($this->extend('translator', function($translator) {
229 229
             $translator->addLoader('yaml', new TranslationFileLoader());
230 230
 
231 231
             $translator->addResource('yaml', 'config/locales/pt-br.yml', 'pt-br');
Please login to merge, or discard this patch.
src/Controller/Home/Index.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      * GET Request for /
21 21
      *
22 22
      * @param  Application $app
23
-     * @return Application
23
+     * @return View
24 24
      */
25 25
     public function get(Application $app)
26 26
     {
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of Skel system
4
- *
5
- * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
- */
3
+     * This file is part of Skel system
4
+     *
5
+     * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
+     */
7 7
 namespace Skel\Controller\Home;
8 8
 
9 9
 use Skel\Bootstrap as Application;
Please login to merge, or discard this patch.
src/Controller/Users/User.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,6 @@
 block discarded – undo
78 78
      * Create an user
79 79
      *
80 80
      * @param  Application $app
81
-     * @param  Request $app['request']
82 81
      * @return View
83 82
      */
84 83
     public function create(Application $app)
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of Skel system
4
- *
5
- * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
- */
3
+     * This file is part of Skel system
4
+     *
5
+     * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
+     */
7 7
 namespace Skel\Controller\Users;
8 8
 
9 9
 use Skel\Bootstrap as Application;
Please login to merge, or discard this patch.
src/Service/Users/User.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
      *
91 91
      * @param UserModel $user
92 92
      * @param Request $request
93
-     * @return mixed
93
+     * @return UserModel
94 94
      */
95 95
     public function update(UserModel $user, Request $request)
96 96
     {
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of Skel system
4
- *
5
- * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
- */
3
+     * This file is part of Skel system
4
+     *
5
+     * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
+     */
7 7
 namespace Skel\Service\Users;
8 8
 
9 9
 use Skel\Entity\EntityInterface;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         parent::__construct($em);
39 39
 
40
-        $this->users        = $users;
40
+        $this->users = $users;
41 41
     }
42 42
 
43 43
     /**
Please login to merge, or discard this patch.
public/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
  */
14 14
 chdir(dirname(__DIR__));
15 15
 
16
-$filename = __DIR__.preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']);
16
+$filename = __DIR__ . preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']);
17 17
 if (php_sapi_name() === 'cli-server' && is_file($filename)) {
18 18
     return false;
19 19
 }
Please login to merge, or discard this patch.
src/Controller/Users/UserInterface.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of Skel system
4
- *
5
- * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
- */
3
+     * This file is part of Skel system
4
+     *
5
+     * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
+     */
7 7
 namespace Skel\Controller\Users;
8 8
 
9 9
 use Skel\Bootstrap as Application;
Please login to merge, or discard this patch.
src/Console/Stats/Stats.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of Skel system
4
- *
5
- * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
- */
3
+     * This file is part of Skel system
4
+     *
5
+     * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
+     */
7 7
 namespace Skel\Console\Stats;
8 8
 
9 9
 use Knp\Command\Command;
Please login to merge, or discard this patch.
src/Console/Stats/StatsInterface.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of Skel system
4
- *
5
- * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
- */
3
+     * This file is part of Skel system
4
+     *
5
+     * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
+     */
7 7
 namespace Skel\Console\Stats;
8 8
 
9 9
 use Symfony\Component\Console\Input\InputInterface;
Please login to merge, or discard this patch.
src/Response.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of Skel system
4
- *
5
- * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
- */
3
+     * This file is part of Skel system
4
+     *
5
+     * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
6
+     */
7 7
 namespace Skel;
8 8
 
9 9
 use JMS\Serializer\SerializerBuilder;
Please login to merge, or discard this patch.