Completed
Push — master ( 39dfcd...b9f790 )
by Aleksandar
27:20
created
src/Web/Factory/Action/CategoryActionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Web\Factory\Action;
6 6
 
Please login to merge, or discard this patch.
src/Web/Action/CategoryAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Web\Action;
6 6
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         $category = $this->categoryService->getCategoryBySlug($urlSlug);
56 56
 
57
-        if(!$category) {
57
+        if (!$category) {
58 58
             $response = $response->withStatus(404);
59 59
 
60 60
             return $next($request, $response, new \Exception("Category by URL does not exist!", 404));
Please login to merge, or discard this patch.
src/Web/Action/PostAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Web\Action;
6 6
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $urlSlug1 = $request->getAttribute('segment_1');
49 49
         $urlSlug2 = $request->getAttribute('segment_2');
50 50
 
51
-        if($urlSlug2) {
51
+        if ($urlSlug2) {
52 52
             $categorySlug = $urlSlug1;
53 53
             $postSlug     = $urlSlug2;
54 54
         } else {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         $post = $this->postService->fetchSingleArticleBySlug($postSlug);
60 60
 
61
-        if(!$post) {
61
+        if (!$post) {
62 62
             $response = $response->withStatus(404);
63 63
 
64 64
             return $next($request, $response, new \Exception("Post by URL does not exist!", 404));
Please login to merge, or discard this patch.
src/Article/src/Mapper/ArticleVideosMapper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Article\Mapper;
5 5
 
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
     public function getPaginationSelect($isActive = null)
35 35
     {
36 36
         $select = $this->getSql()->select()
37
-            ->columns(['title', 'body', 'lead'])
37
+            ->columns([ 'title', 'body', 'lead' ])
38 38
             ->join('articles', 'article_videos.article_uuid = articles.article_uuid')
39
-            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id', 'first_name', 'last_name'])
40
-            ->where(['articles.type' => ArticleType::POST])
41
-            ->order(['created_at' => 'desc']);
39
+            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id', 'first_name', 'last_name' ])
40
+            ->where([ 'articles.type' => ArticleType::POST ])
41
+            ->order([ 'created_at' => 'desc' ]);
42 42
 
43
-        if($isActive !== null) {
44
-            $select->where(['articles.status' => (int)$isActive]);
43
+        if ($isActive !== null) {
44
+            $select->where([ 'articles.status' => (int) $isActive ]);
45 45
         }
46 46
 
47 47
         return $select;
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
     public function get($id)
51 51
     {
52 52
         $select = $this->getSql()->select()
53
-            ->columns(['title', 'body', 'lead', 'featured_img', 'main_img', 'embed_code'])
53
+            ->columns([ 'title', 'body', 'lead', 'featured_img', 'main_img', 'embed_code' ])
54 54
             ->join('articles', 'article_videos.article_uuid = articles.article_uuid')
55
-            ->where(['articles.article_id' => $id]);
55
+            ->where([ 'articles.article_id' => $id ]);
56 56
 
57 57
         return $this->selectWith($select)->current();
58 58
     }
Please login to merge, or discard this patch.
src/Article/src/Mapper/ArticleEventsMapper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Article\Mapper;
6 6
 
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
     public function getPaginationSelect($status = null)
36 36
     {
37 37
         $select = $this->getSql()->select()
38
-            ->columns(['title', 'body', 'longitude', 'latitude'])
38
+            ->columns([ 'title', 'body', 'longitude', 'latitude' ])
39 39
             ->join('articles', 'article_events.article_uuid = articles.article_uuid')
40
-            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id', 'first_name', 'last_name'])
41
-            ->where(['articles.type' => ArticleType::EVENT])
42
-            ->order(['created_at' => 'desc']);
40
+            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id', 'first_name', 'last_name' ])
41
+            ->where([ 'articles.type' => ArticleType::EVENT ])
42
+            ->order([ 'created_at' => 'desc' ]);
43 43
 
44
-        if($status) {
45
-            $select->where(['articles.status' => (int)$status]);
44
+        if ($status) {
45
+            $select->where([ 'articles.status' => (int) $status ]);
46 46
         }
47 47
 
48 48
         return $select;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $select = $this->getSql()->select()
54 54
             ->join('articles', 'article_events.article_uuid = articles.article_uuid')
55
-            ->where(['articles.article_id' => $id]);
55
+            ->where([ 'articles.article_id' => $id ]);
56 56
 
57 57
         return $this->selectWith($select)->current();
58 58
     }
Please login to merge, or discard this patch.
src/Category/src/Mapper/CategoryMapper.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Category\Mapper;
6 6
 
@@ -33,12 +33,12 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function get($id)
35 35
     {
36
-        return $this->select(['category_id' => $id])->current();
36
+        return $this->select([ 'category_id' => $id ])->current();
37 37
     }
38 38
 
39 39
     public function getPaginationSelect()
40 40
     {
41
-        $select = $this->getSql()->select()->order(['name' => 'asc']);
41
+        $select = $this->getSql()->select()->order([ 'name' => 'asc' ]);
42 42
 
43 43
         return $select;
44 44
     }
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
     public function getCategoryPostsSelect($categoryId)
47 47
     {
48 48
         $select = $this->getSql()->select()
49
-            ->columns([])
50
-            ->join('article_categories', 'article_categories.category_uuid = category.category_uuid', [])
51
-            ->join('articles', 'articles.article_uuid = article_categories.article_uuid', ['article_id', 'slug', 'admin_user_uuid', 'published_at'])
52
-            ->join('article_posts', 'article_posts.article_uuid = articles.article_uuid', ['*'], 'right')
53
-            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', ['admin_user_id', 'first_name', 'last_name'])
54
-            ->where(['category_id' => $categoryId])
55
-            ->where(['articles.status' => 1]);
49
+            ->columns([ ])
50
+            ->join('article_categories', 'article_categories.category_uuid = category.category_uuid', [ ])
51
+            ->join('articles', 'articles.article_uuid = article_categories.article_uuid', [ 'article_id', 'slug', 'admin_user_uuid', 'published_at' ])
52
+            ->join('article_posts', 'article_posts.article_uuid = articles.article_uuid', [ '*' ], 'right')
53
+            ->join('admin_users', 'admin_users.admin_user_uuid = articles.admin_user_uuid', [ 'admin_user_id', 'first_name', 'last_name' ])
54
+            ->where([ 'category_id' => $categoryId ])
55
+            ->where([ 'articles.status' => 1 ]);
56 56
 
57 57
         return $select;
58 58
     }
Please login to merge, or discard this patch.
src/Web/Action/EventsAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Web\Action;
6 6
 
Please login to merge, or discard this patch.
src/Web/Factory/Action/EventsActionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Web\Factory\Action;
6 6
 
Please login to merge, or discard this patch.
src/Web/Factory/Action/EventActionFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Web\Factory\Action;
6 6
 
Please login to merge, or discard this patch.