Completed
Branch master (f7441c)
by Aleksandar
09:22
created
src/Admin/Controller/AuthController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
     /**
99 99
      * Clears user session.
100 100
      *
101
-     * @return static
101
+     * @return \Psr\Http\Message\ResponseInterface
102 102
      */
103 103
     public function logout() : \Psr\Http\Message\ResponseInterface
104 104
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@
 block discarded – undo
82 82
         }
83 83
 
84 84
         $data     = $this->request->getParsedBody();
85
-        $email    = isset($data['email']) ? $data['email'] : null;
86
-        $password = isset($data['password']) ? $data['password'] : null;
85
+        $email    = isset($data[ 'email' ]) ? $data[ 'email' ] : null;
86
+        $password = isset($data[ 'password' ]) ? $data[ 'password' ] : null;
87 87
 
88 88
         try {
89 89
             $this->session->getStorage()->user = $this->adminUserService->loginUser($email, $password);
Please login to merge, or discard this patch.
src/Core/Middleware/Error.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
     /**
33 33
      * Invoked on middleware execution.
34 34
      *
35
-     * @param mixed $exception   exception
36 35
      * @param Request $request   request
37 36
      * @param Response $response response
38 37
      * @return HtmlResponse
Please login to merge, or discard this patch.
data/phinx/migrations/20161003183353_create_articles_table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
 {
6 6
     public function up()
7 7
     {
8
-        $this->table('articles', ['id' => false, 'primary_key' => 'article_uuid'])
9
-            ->addColumn('article_uuid', 'binary', ['limit' => 16])
8
+        $this->table('articles', [ 'id' => false, 'primary_key' => 'article_uuid' ])
9
+            ->addColumn('article_uuid', 'binary', [ 'limit' => 16 ])
10 10
             ->addColumn('title', 'text')
11 11
             ->addColumn('slug', 'text')
12 12
             ->addColumn('type', 'integer')
13 13
             ->addColumn('published_at', 'datetime')
14
-            ->addIndex('type', ['name' => 'type_INDEX'])
15
-            ->addIndex('published_at', ['name' => 'published_at_INDEX'])
14
+            ->addIndex('type', [ 'name' => 'type_INDEX' ])
15
+            ->addIndex('published_at', [ 'name' => 'published_at_INDEX' ])
16 16
             ->create();
17 17
     }
18 18
 
Please login to merge, or discard this patch.
data/phinx/migrations/20160908142829_admin_users.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 {
7 7
     public function up()
8 8
     {
9
-        $this->table('admin_users', ['id' => false, 'primary_key' => 'admin_user_uuid'])
10
-            ->addColumn('admin_user_uuid', 'binary', ['limit' => 16])
9
+        $this->table('admin_users', [ 'id' => false, 'primary_key' => 'admin_user_uuid' ])
10
+            ->addColumn('admin_user_uuid', 'binary', [ 'limit' => 16 ])
11 11
             ->addColumn('first_name', 'text')
12 12
             ->addColumn('last_name', 'text')
13
-            ->addColumn('email', 'string', ['limit' => 128])
14
-            ->addColumn('password', 'char', ['limit' => 60])
15
-            ->addColumn('created_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
16
-            ->addColumn('last_login', 'datetime', ['null' => true])
17
-            ->addIndex(['email'], ['name' => 'email_INDEX'])
13
+            ->addColumn('email', 'string', [ 'limit' => 128 ])
14
+            ->addColumn('password', 'char', [ 'limit' => 60 ])
15
+            ->addColumn('created_at', 'datetime', [ 'default' => 'CURRENT_TIMESTAMP' ])
16
+            ->addColumn('last_login', 'datetime', [ 'null' => true ])
17
+            ->addIndex([ 'email' ], [ 'name' => 'email_INDEX' ])
18 18
             ->create();
19 19
 
20 20
         //password is: testtest
Please login to merge, or discard this patch.
data/phinx/phinx.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
             "adapter" => 'mysql',
14 14
             "host"    => 'localhost',
15 15
             "name"    => 'unfinished',
16
-            "user"    => 'root',  // set username
16
+            "user"    => 'root', // set username
17 17
             "pass"    => '12345', // and pass
18 18
             "port"    => '5432'
19 19
         ]
Please login to merge, or discard this patch.
config/autoload/templates.global.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@
 block discarded – undo
14 14
             'error/404'      => 'templates/error/404.phtml',
15 15
         ],
16 16
         'paths'  => [
17
-            'web'    => ['templates/web'],
18
-            'admin'  => ['templates/admin'],
19
-            'layout' => ['templates/layout'],
20
-            'error'  => ['templates/error'],
17
+            'web'    => [ 'templates/web' ],
18
+            'admin'  => [ 'templates/admin' ],
19
+            'layout' => [ 'templates/layout' ],
20
+            'error'  => [ 'templates/error' ],
21 21
         ],
22 22
     ],
23 23
 
Please login to merge, or discard this patch.
config/autoload/routes.global.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             'name'            => 'home',
25 25
             'path'            => '/',
26 26
             'middleware'      => Web\Action\IndexAction::class,
27
-            'allowed_methods' => ['GET'],
27
+            'allowed_methods' => [ 'GET' ],
28 28
         ],
29 29
         [
30 30
             'name'       => 'about',
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
             'name'            => 'api.ping',
41 41
             'path'            => '/api/ping',
42 42
             'middleware'      => Web\Action\PingAction::class,
43
-            'allowed_methods' => ['GET'],
43
+            'allowed_methods' => [ 'GET' ],
44 44
         ],
45 45
         [
46 46
             'name'            => 'auth',
47 47
             'path'            => '/auth/:action',
48 48
             'middleware'      => Admin\Controller\AuthController::class,
49
-            'allowed_methods' => ['GET', 'POST'],
49
+            'allowed_methods' => [ 'GET', 'POST' ],
50 50
         ],
51 51
 
52 52
         // Admin
@@ -54,25 +54,25 @@  discard block
 block discarded – undo
54 54
             'name'            => 'admin',
55 55
             'path'            => '/admin',
56 56
             'middleware'      => Admin\Action\IndexAction::class,
57
-            'allowed_methods' => ['GET'],
57
+            'allowed_methods' => [ 'GET' ],
58 58
         ],
59 59
         [
60 60
             'name'            => 'admin.users',
61 61
             'path'            => '/admin/users',
62 62
             'middleware'      => Admin\Controller\UserController::class,
63
-            'allowed_methods' => ['GET'],
63
+            'allowed_methods' => [ 'GET' ],
64 64
         ],
65 65
         [
66 66
             'name'            => 'admin.tags',
67 67
             'path'            => '/admin/tags',
68 68
             'middleware'      => Admin\Controller\TagController::class,
69
-            'allowed_methods' => ['GET'],
69
+            'allowed_methods' => [ 'GET' ],
70 70
         ],
71 71
         [
72 72
             'name'            => 'admin.posts',
73 73
             'path'            => '/admin/posts',
74 74
             'middleware'      => Admin\Controller\PostController::class,
75
-            'allowed_methods' => ['GET'],
75
+            'allowed_methods' => [ 'GET' ],
76 76
         ],
77 77
     ],
78 78
 ];
Please login to merge, or discard this patch.
config/autoload/middlewares.global.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         // execute this middlweare on every /admin[*] path
54 54
         'permission' => [
55
-            'middleware' => [Core\Middleware\AdminAuth::class],
55
+            'middleware' => [ Core\Middleware\AdminAuth::class ],
56 56
             'priority'   => 100,
57 57
             'path'       => '/admin'
58 58
         ],
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
         ],
75 75
 
76 76
         'error404' => [
77
-            'middleware' => [Core\Middleware\ErrorNotFound::class],
77
+            'middleware' => [ Core\Middleware\ErrorNotFound::class ],
78 78
             'priority'   => -1,
79 79
         ],
80 80
 
81 81
         'error' => [
82
-            'middleware' => [Core\Middleware\Error::class],
82
+            'middleware' => [ Core\Middleware\Error::class ],
83 83
             'error'      => true,
84 84
             'priority'   => -10000,
85 85
         ],
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 $cachedConfigFile = 'data/cache/app_config.php';
16 16
 
17
-$config = [];
17
+$config = [ ];
18 18
 if (is_file($cachedConfigFile)) {
19 19
     // Try to load the cached config
20 20
     $config = include $cachedConfigFile;
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     }
26 26
 
27 27
     // Cache config if enabled
28
-    if (isset($config['config_cache_enabled']) && $config['config_cache_enabled'] === true) {
28
+    if (isset($config[ 'config_cache_enabled' ]) && $config[ 'config_cache_enabled' ] === true) {
29 29
         file_put_contents($cachedConfigFile, '<?php return ' . var_export($config, true) . ';');
30 30
     }
31 31
 }
Please login to merge, or discard this patch.