Completed
Push — master ( 63a43a...66f803 )
by
unknown
55:43 queued 30:40
created
packages/Article/src/Mapper/ArticleVideosMapper.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -36,16 +36,16 @@  discard block
 block discarded – undo
36 36
             ->join(
37 37
                 'articles',
38 38
                 'article_videos.article_uuid = articles.article_uuid',
39
-                ['slug', 'published_at', 'status', 'article_id']
39
+                [ 'slug', 'published_at', 'status', 'article_id' ]
40 40
             )->join(
41 41
                 'admin_users',
42 42
                 'admin_users.admin_user_uuid = articles.admin_user_uuid',
43
-                ['admin_user_id', 'first_name', 'last_name']
44
-            )->where(['articles.type' => ArticleType::VIDEO])
45
-            ->order(['articles.created_at' => 'desc']);
43
+                [ 'admin_user_id', 'first_name', 'last_name' ]
44
+            )->where([ 'articles.type' => ArticleType::VIDEO ])
45
+            ->order([ 'articles.created_at' => 'desc' ]);
46 46
 
47 47
         if ($isActive !== null) {
48
-            $select->where(['articles.status' => (int)$isActive]);
48
+            $select->where([ 'articles.status' => (int) $isActive ]);
49 49
         }
50 50
 
51 51
         return $select;
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
     public function get($id)
55 55
     {
56 56
         $select = $this->getSql()->select()
57
-            ->columns(['title', 'body', 'lead', 'featured_img', 'main_img', 'video_url', 'sub_title'])
57
+            ->columns([ 'title', 'body', 'lead', 'featured_img', 'main_img', 'video_url', 'sub_title' ])
58 58
             ->join('articles', 'article_videos.article_uuid = articles.article_uuid')
59 59
             ->join(
60 60
                 'category', 'category.category_uuid = articles.category_uuid',
61
-                ['category_slug' => 'slug', 'category_name' => 'name', 'category_id'], 'left'
61
+                [ 'category_slug' => 'slug', 'category_name' => 'name', 'category_id' ], 'left'
62 62
             )
63
-            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id'], 'left')
64
-            ->where(['articles.article_id' => $id]);
63
+            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id' ], 'left')
64
+            ->where([ 'articles.article_id' => $id ]);
65 65
 
66 66
         return $this->selectWith($select)->current();
67 67
     }
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
         $select = $this->getSql()->select()
72 72
             ->join(
73 73
                 'articles',
74
-                'article_videos.article_uuid = articles.article_uuid', ['article_id', 'slug', 'published_at']
75
-            )->where(['articles.status' => 1])
76
-            ->order(['published_at' => 'desc'])
74
+                'article_videos.article_uuid = articles.article_uuid', [ 'article_id', 'slug', 'published_at' ]
75
+            )->where([ 'articles.status' => 1 ])
76
+            ->order([ 'published_at' => 'desc' ])
77 77
             ->limit($limit);
78 78
 
79 79
         return $this->selectWith($select);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $select = $this->getSql()->select()
85 85
             ->join('articles', 'article_videos.article_uuid = articles.article_uuid')
86
-            ->where(['articles.slug' => $slug]);
86
+            ->where([ 'articles.slug' => $slug ]);
87 87
 
88 88
         return $this->selectWith($select)->current();
89 89
     }
Please login to merge, or discard this patch.
packages/Article/src/Mapper/ArticleMapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
     public function getCategories($articleId)
45 45
     {
46 46
         $select = $this->getSql()->select()
47
-            ->columns([])
48
-            ->join('category', 'category.category_uuid = articles.category_uuid', ['name', 'slug', 'category_id'])
49
-            ->where(['articles.article_id' => $articleId]);
47
+            ->columns([ ])
48
+            ->join('category', 'category.category_uuid = articles.category_uuid', [ 'name', 'slug', 'category_id' ])
49
+            ->where([ 'articles.article_id' => $articleId ]);
50 50
 
51 51
         return $this->selectWith($select);
52 52
     }
Please login to merge, or discard this patch.
packages/Article/src/Mapper/ArticlePostsMapper.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -33,24 +33,24 @@  discard block
 block discarded – undo
33 33
     public function getPaginationSelect()
34 34
     {
35 35
         return $this->getSql()->select()
36
-            ->columns(['title', 'body', 'lead', 'featured_img', 'main_img'])
36
+            ->columns([ 'title', 'body', 'lead', 'featured_img', 'main_img' ])
37 37
             ->join('articles', 'article_posts.article_uuid = articles.article_uuid')
38
-            ->join('category', 'articles.category_uuid = category.category_uuid', ['category_name' => 'name'], 'left')
39
-            ->where(['articles.type' => ArticleType::POST])
40
-            ->order(['created_at' => 'desc']);
38
+            ->join('category', 'articles.category_uuid = category.category_uuid', [ 'category_name' => 'name' ], 'left')
39
+            ->where([ 'articles.type' => ArticleType::POST ])
40
+            ->order([ 'created_at' => 'desc' ]);
41 41
     }
42 42
 
43 43
     public function get($id)
44 44
     {
45 45
         $select = $this->getSql()->select()
46
-            ->columns(['title', 'body', 'lead', 'featured_img', 'main_img', 'has_layout'])
46
+            ->columns([ 'title', 'body', 'lead', 'featured_img', 'main_img', 'has_layout' ])
47 47
             ->join('articles', 'article_posts.article_uuid = articles.article_uuid')
48 48
             ->join(
49 49
                 'category', 'category.category_uuid = articles.category_uuid',
50
-                ['category_slug' => 'slug', 'category_name' => 'name', 'category_id'], 'left'
50
+                [ 'category_slug' => 'slug', 'category_name' => 'name', 'category_id' ], 'left'
51 51
             )
52
-            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id'], 'left')
53
-            ->where(['articles.article_id' => $id]);
52
+            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id' ], 'left')
53
+            ->where([ 'articles.article_id' => $id ]);
54 54
 
55 55
         return $this->selectWith($select)->current();
56 56
     }
@@ -59,16 +59,16 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $select = $this->getSql()->select()
61 61
             ->join('articles', 'article_posts.article_uuid = articles.article_uuid')
62
-            ->join('category', 'category.category_uuid = articles.category_uuid', ['category_slug' => 'slug'])
63
-            ->where(['articles.status' => 1])
62
+            ->join('category', 'category.category_uuid = articles.category_uuid', [ 'category_slug' => 'slug' ])
63
+            ->where([ 'articles.status' => 1 ])
64 64
             ->limit(1);
65 65
 
66 66
         if ($direction > 0) {
67 67
             $select->where->greaterThan('published_at', $publishedAt);
68
-            $select->order(['published_at' => 'asc']);
68
+            $select->order([ 'published_at' => 'asc' ]);
69 69
         } elseif ($direction < 0) {
70 70
             $select->where->lessThan('published_at', $publishedAt);
71
-            $select->order(['published_at' => 'desc']);
71
+            $select->order([ 'published_at' => 'desc' ]);
72 72
         }
73 73
 
74 74
         return $this->selectWith($select)->current();
@@ -77,17 +77,17 @@  discard block
 block discarded – undo
77 77
     public function getBySlug($slug)
78 78
     {
79 79
         $select = $this->getSql()->select()
80
-            ->columns(['title', 'body', 'lead', 'featured_img', 'main_img'])
80
+            ->columns([ 'title', 'body', 'lead', 'featured_img', 'main_img' ])
81 81
             ->join('articles', 'article_posts.article_uuid = articles.article_uuid')
82 82
             ->join(
83 83
                 'category',
84 84
                 'category.category_uuid = articles.category_uuid',
85
-                ['category_name' => 'name', 'category_slug' => 'slug']
85
+                [ 'category_name' => 'name', 'category_slug' => 'slug' ]
86 86
             )->join(
87 87
                 'admin_users',
88 88
                 'admin_users.admin_user_uuid = articles.admin_user_uuid',
89
-                ['first_name', 'last_name'])
90
-            ->where(['articles.slug' => $slug, 'articles.status' => 1]);
89
+                [ 'first_name', 'last_name' ])
90
+            ->where([ 'articles.slug' => $slug, 'articles.status' => 1 ]);
91 91
 
92 92
         return $this->selectWith($select)->current();
93 93
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     public function getAll()
96 96
     {
97 97
         $select = $this->getSql()->select()
98
-            ->join('articles', 'article_posts.article_uuid = articles.article_uuid', ['article_id', 'slug']);
98
+            ->join('articles', 'article_posts.article_uuid = articles.article_uuid', [ 'article_id', 'slug' ]);
99 99
 
100 100
         return $this->selectWith($select);
101 101
     }
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
     {
105 105
         $select = $this->getSql()->select()
106 106
             ->join('articles', 'article_posts.article_uuid = articles.article_uuid')
107
-            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['first_name', 'last_name'])
107
+            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'first_name', 'last_name' ])
108 108
             ->join(
109 109
                 'category', 'category.category_uuid = articles.category_uuid',
110
-                ['category_name' => 'name', 'category_id', 'category_slug' => 'slug']
110
+                [ 'category_name' => 'name', 'category_id', 'category_slug' => 'slug' ]
111 111
             )
112
-            ->where(['articles.status' => 1])
113
-            ->order(['articles.published_at' => 'desc'])
112
+            ->where([ 'articles.status' => 1 ])
113
+            ->order([ 'articles.published_at' => 'desc' ])
114 114
             ->limit($limit);
115 115
 
116 116
         return $this->selectWith($select);
Please login to merge, or discard this patch.
packages/Article/src/Mapper/ArticleDiscussionsMapper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,23 +22,23 @@
 block discarded – undo
22 22
     public function getPaginationSelect()
23 23
     {
24 24
         return $this->getSql()->select()
25
-            ->columns(['title', 'body'])
25
+            ->columns([ 'title', 'body' ])
26 26
             ->join('articles', 'article_discussions.article_uuid = articles.article_uuid')
27
-            ->where(['articles.type' => ArticleType::DISCUSSION])
28
-            ->order(['created_at' => 'desc']);
27
+            ->where([ 'articles.type' => ArticleType::DISCUSSION ])
28
+            ->order([ 'created_at' => 'desc' ]);
29 29
     }
30 30
 
31 31
     public function get($id)
32 32
     {
33 33
         $select = $this->getSql()->select()
34
-            ->columns(['title', 'body'])
34
+            ->columns([ 'title', 'body' ])
35 35
             ->join('articles', 'article_discussions.article_uuid = articles.article_uuid')
36 36
             ->join(
37 37
                 'category', 'category.category_uuid = articles.category_uuid',
38
-                ['category_slug' => 'slug', 'category_name' => 'name', 'category_id'], 'left'
38
+                [ 'category_slug' => 'slug', 'category_name' => 'name', 'category_id' ], 'left'
39 39
             )
40
-            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id'], 'left')
41
-            ->where(['articles.article_id' => $id]);
40
+            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id' ], 'left')
41
+            ->where([ 'articles.article_id' => $id ]);
42 42
 
43 43
         return $this->selectWith($select)->current();
44 44
     }
Please login to merge, or discard this patch.
packages/Article/src/Mapper/ArticleEventsMapper.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,17 +34,17 @@  discard block
 block discarded – undo
34 34
     public function getPaginationSelect($status = null)
35 35
     {
36 36
         $select = $this->getSql()->select()
37
-            ->columns(['title', 'body', 'longitude', 'latitude'])
37
+            ->columns([ 'title', 'body', 'longitude', 'latitude' ])
38 38
             ->join('articles', 'article_events.article_uuid = articles.article_uuid')
39 39
             ->join(
40 40
                 'admin_users',
41 41
                 'admin_users.admin_user_uuid = articles.admin_user_uuid',
42
-                ['admin_user_id', 'first_name', 'last_name']
43
-            )->where(['articles.type' => ArticleType::EVENT])
44
-            ->order(['created_at' => 'desc']);
42
+                [ 'admin_user_id', 'first_name', 'last_name' ]
43
+            )->where([ 'articles.type' => ArticleType::EVENT ])
44
+            ->order([ 'created_at' => 'desc' ]);
45 45
 
46 46
         if ($status) {
47
-            $select->where(['articles.status' => (int)$status]);
47
+            $select->where([ 'articles.status' => (int) $status ]);
48 48
         }
49 49
 
50 50
         return $select;
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
             ->join('articles', 'article_events.article_uuid = articles.article_uuid')
57 57
             ->join(
58 58
                 'category', 'category.category_uuid = articles.category_uuid',
59
-                ['category_slug' => 'slug', 'category_name' => 'name', 'category_id'], 'left'
59
+                [ 'category_slug' => 'slug', 'category_name' => 'name', 'category_id' ], 'left'
60 60
             )
61
-            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id'], 'left')
62
-            ->where(['articles.article_id' => $id]);
61
+            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id' ], 'left')
62
+            ->where([ 'articles.article_id' => $id ]);
63 63
 
64 64
         return $this->selectWith($select)->current();
65 65
     }
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
             ->join('articles', 'article_events.article_uuid = articles.article_uuid')
71 71
             ->join(
72 72
                 'category', 'category.category_uuid = articles.category_uuid',
73
-                ['category_slug' => 'slug', 'category_name' => 'name', 'category_id'], 'left'
73
+                [ 'category_slug' => 'slug', 'category_name' => 'name', 'category_id' ], 'left'
74 74
             )
75
-            ->where(['articles.slug' => $slug]);
75
+            ->where([ 'articles.slug' => $slug ]);
76 76
 
77 77
         return $this->selectWith($select)->current();
78 78
     }
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
             ->join(
84 84
                 'articles',
85 85
                 'article_events.article_uuid = articles.article_uuid',
86
-                ['article_id', 'slug', 'published_at']
87
-            )->where(['articles.status' => 1])
88
-            ->order(['published_at' => 'desc'])
86
+                [ 'article_id', 'slug', 'published_at' ]
87
+            )->where([ 'articles.status' => 1 ])
88
+            ->order([ 'published_at' => 'desc' ])
89 89
             ->limit($limit);
90 90
 
91 91
         return $this->selectWith($select);
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
     public function getFuture()
95 95
     {
96 96
         $select = $this->getSql()->select()
97
-            ->where(['articles.status' => 1])
97
+            ->where([ 'articles.status' => 1 ])
98 98
             ->join(
99 99
                 'articles',
100 100
                 'articles.article_uuid = article_events.article_uuid',
101
-                ['article_id', 'slug', 'published_at']
101
+                [ 'article_id', 'slug', 'published_at' ]
102 102
             )->order(new Expression('rand()'));
103 103
 
104 104
         $select->where->greaterThanOrEqualTo('end_at', date('Y-m-d H:i:s'));
@@ -109,12 +109,12 @@  discard block
 block discarded – undo
109 109
     public function getPastSelect()
110 110
     {
111 111
         $select = $this->getSql()->select()
112
-            ->where(['articles.status' => 1])
112
+            ->where([ 'articles.status' => 1 ])
113 113
             ->join(
114 114
                 'articles',
115 115
                 'articles.article_uuid = article_events.article_uuid',
116
-                ['article_id', 'slug', 'published_at']
117
-            )->order(['start_at' => 'desc']);
116
+                [ 'article_id', 'slug', 'published_at' ]
117
+            )->order([ 'start_at' => 'desc' ]);
118 118
         $select->where->lessThan('end_at', date('Y-m-d H:i:s'));
119 119
 
120 120
         return $select;
Please login to merge, or discard this patch.
packages/Article/src/Controller/EventController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,24 +45,24 @@
 block discarded – undo
45 45
     public function index(): \Psr\Http\Message\ResponseInterface
46 46
     {
47 47
         $params = $this->request->getQueryParams();
48
-        $page = isset($params['page']) ? $params['page'] : 1;
49
-        $limit = isset($params['limit']) ? $params['limit'] : 15;
48
+        $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1;
49
+        $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15;
50 50
         $events = $this->eventService->fetchAllArticles($page, $limit);
51 51
 
52 52
         return new HtmlResponse($this->template->render(
53 53
             'article::event/index',
54
-            ['list' => $events, 'layout' => 'layout/admin'])
54
+            [ 'list' => $events, 'layout' => 'layout/admin' ])
55 55
         );
56 56
     }
57 57
 
58
-    public function edit($errors = []): \Psr\Http\Message\ResponseInterface
58
+    public function edit($errors = [ ]): \Psr\Http\Message\ResponseInterface
59 59
     {
60 60
         $id = $this->request->getAttribute('id');
61 61
         $event = $this->eventService->fetchSingleArticle($id);
62 62
         $categories = $this->categoryService->getAll();
63 63
 
64 64
         if ($this->request->getParsedBody()) {
65
-            $event = (object)($this->request->getParsedBody() + (array)$event);
65
+            $event = (object) ($this->request->getParsedBody() + (array) $event);
66 66
             $event->article_id = $id;
67 67
         }
68 68
 
Please login to merge, or discard this patch.
packages/Article/src/Controller/VideoController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
     public function index(): HtmlResponse
67 67
     {
68 68
         $params = $this->request->getQueryParams();
69
-        $page = isset($params['page']) ? $params['page'] : 1;
70
-        $limit = isset($params['limit']) ? $params['limit'] : 15;
69
+        $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1;
70
+        $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15;
71 71
         $videos = $this->videoService->fetchAllArticles($page, $limit);
72 72
 
73 73
         return new HtmlResponse($this->template->render(
74 74
             'article::video/index',
75
-            ['list' => $videos, 'layout' => 'layout/admin'])
75
+            [ 'list' => $videos, 'layout' => 'layout/admin' ])
76 76
         );
77 77
     }
78 78
 
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return \Psr\Http\Message\ResponseInterface
83 83
      */
84
-    public function edit($errors = []): \Psr\Http\Message\ResponseInterface
84
+    public function edit($errors = [ ]): \Psr\Http\Message\ResponseInterface
85 85
     {
86 86
         $id = $this->request->getAttribute('id');
87 87
         $video = $this->videoService->fetchSingleArticle($id);
88 88
         $categories = $this->categoryService->getAll();
89 89
 
90 90
         if ($this->request->getParsedBody()) {
91
-            $video = (object)($this->request->getParsedBody() + (array)$video);
91
+            $video = (object) ($this->request->getParsedBody() + (array) $video);
92 92
             $video->article_id = $id;
93 93
         }
94 94
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         }
149 149
 
150 150
         return $this->response->withStatus(302)->withHeader(
151
-            'Location', $this->router->generateUri('admin.videos', ['action' => 'index'])
151
+            'Location', $this->router->generateUri('admin.videos', [ 'action' => 'index' ])
152 152
         );
153 153
     }
154 154
 }
Please login to merge, or discard this patch.
packages/Article/src/Controller/DiscussionController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
     public function index(): \Psr\Http\Message\ResponseInterface
70 70
     {
71 71
         $params = $this->request->getQueryParams();
72
-        $page = isset($params['page']) ? $params['page'] : 1;
73
-        $limit = isset($params['limit']) ? $params['limit'] : 15;
72
+        $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1;
73
+        $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15;
74 74
 
75 75
         $discussions = $this->discussionService->fetchAllArticles($page, $limit);
76 76
 
77 77
         return new HtmlResponse($this->template->render(
78 78
             'article::discussion/index',
79
-            ['list' => $discussions, 'layout' => 'layout/admin'])
79
+            [ 'list' => $discussions, 'layout' => 'layout/admin' ])
80 80
         );
81 81
     }
82 82
 
@@ -87,14 +87,14 @@  discard block
 block discarded – undo
87 87
      *
88 88
      * @return \Psr\Http\Message\ResponseInterface
89 89
      */
90
-    public function edit($errors = []): \Psr\Http\Message\ResponseInterface
90
+    public function edit($errors = [ ]): \Psr\Http\Message\ResponseInterface
91 91
     {
92 92
         $id = $this->request->getAttribute('id');
93 93
         $discussion = $this->discussionService->fetchSingleArticle($id);
94 94
         $categories = $this->categoryService->getAll();
95 95
 
96 96
         if ($this->request->getParsedBody()) {
97
-            $discussion = (object)($this->request->getParsedBody() + (array)$discussion);
97
+            $discussion = (object) ($this->request->getParsedBody() + (array) $discussion);
98 98
             $discussion->article_id = $id;
99 99
         }
100 100
 
Please login to merge, or discard this patch.
packages/Article/src/Controller/PostController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
     public function index(): HtmlResponse
67 67
     {
68 68
         $params = $this->request->getQueryParams();
69
-        $page = isset($params['page']) ? $params['page'] : 1;
70
-        $limit = isset($params['limit']) ? $params['limit'] : 15;
69
+        $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1;
70
+        $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15;
71 71
         $posts = $this->postService->fetchAllArticles($page, $limit);
72 72
 
73 73
         return new HtmlResponse($this->template->render(
74 74
             'article::post/index',
75
-            ['list' => $posts, 'layout' => 'layout/admin'])
75
+            [ 'list' => $posts, 'layout' => 'layout/admin' ])
76 76
         );
77 77
     }
78 78
 
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @return \Psr\Http\Message\ResponseInterface
83 83
      */
84
-    public function edit($errors = []): \Psr\Http\Message\ResponseInterface
84
+    public function edit($errors = [ ]): \Psr\Http\Message\ResponseInterface
85 85
     {
86 86
         $id = $this->request->getAttribute('id');
87 87
         $post = $this->postService->fetchSingleArticle($id);
88 88
         $categories = $this->categoryService->getAll();
89 89
 
90 90
         if ($this->request->getParsedBody()) {
91
-            $post = (object)($this->request->getParsedBody() + (array)$post);
91
+            $post = (object) ($this->request->getParsedBody() + (array) $post);
92 92
             $post->article_id = $id;
93 93
         }
94 94
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         }
149 149
 
150 150
         return $this->response->withStatus(302)->withHeader(
151
-            'Location', $this->router->generateUri('admin.posts', ['action' => 'index'])
151
+            'Location', $this->router->generateUri('admin.posts', [ 'action' => 'index' ])
152 152
         );
153 153
     }
154 154
 }
Please login to merge, or discard this patch.