Completed
Push — master ( c11784...191fd3 )
by Aleksandar
24:03
created
packages/Web/Factory/Action/PageActionFactory.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.
packages/Page/src/Mapper/PageMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
 
34 34
     public function getActivePage($urlSlug)
35 35
     {
36
-        return $this->select(['slug' => $urlSlug, 'is_active' => true]);
36
+        return $this->select([ 'slug' => $urlSlug, 'is_active' => true ]);
37 37
     }
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
packages/Page/src/Service/PageService.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             + ['main_img' => $this->upload->uploadImage($data, 'main_img')];
84 84
         $data['page_id'] = Uuid::uuid1()->toString();
85 85
         $data['page_uuid']
86
-                         = (new MysqlUuid($data['page_id']))->toFormat(new Binary);
86
+                            = (new MysqlUuid($data['page_id']))->toFormat(new Binary);
87 87
 
88 88
         if ($data['is_homepage']) {
89 89
             $this->pageMapper->update(['is_homepage' => false]);
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function getPage($pageId)
46 46
     {
47
-        return $this->pageMapper->select(['page_id' => $pageId])->current();
47
+        return $this->pageMapper->select([ 'page_id' => $pageId ])->current();
48 48
     }
49 49
 
50 50
     /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function getHomepage()
64 64
     {
65
-        return $this->pageMapper->select(['is_homepage' => true])->current();
65
+        return $this->pageMapper->select([ 'is_homepage' => true ])->current();
66 66
     }
67 67
 
68 68
     /**
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
         }
81 81
 
82 82
         $data            = $filter->getValues()
83
-            + ['main_img' => $this->upload->uploadImage($data, 'main_img')];
84
-        $data['page_id'] = Uuid::uuid1()->toString();
85
-        $data['page_uuid']
86
-                         = (new MysqlUuid($data['page_id']))->toFormat(new Binary);
83
+            + [ 'main_img' => $this->upload->uploadImage($data, 'main_img') ];
84
+        $data[ 'page_id' ] = Uuid::uuid1()->toString();
85
+        $data[ 'page_uuid' ]
86
+                         = (new MysqlUuid($data[ 'page_id' ]))->toFormat(new Binary);
87 87
 
88
-        if ($data['is_homepage']) {
89
-            $this->pageMapper->update(['is_homepage' => false]);
88
+        if ($data[ 'is_homepage' ]) {
89
+            $this->pageMapper->update([ 'is_homepage' => false ]);
90 90
         }
91 91
 
92 92
         return $this->pageMapper->insert($data);
@@ -105,22 +105,22 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         $data = $filter->getValues()
108
-            + ['main_img' => $this->upload->uploadImage($data, 'main_img'),];
108
+            + [ 'main_img' => $this->upload->uploadImage($data, 'main_img'), ];
109 109
 
110 110
         // We don't want to force user to re-upload image on edit
111
-        if (!$data['main_img']) {
112
-            unset($data['main_img']);
111
+        if (!$data[ 'main_img' ]) {
112
+            unset($data[ 'main_img' ]);
113 113
         }
114 114
 
115
-        if ($data['is_homepage']) {
116
-            $this->pageMapper->update(['is_homepage' => false]);
115
+        if ($data[ 'is_homepage' ]) {
116
+            $this->pageMapper->update([ 'is_homepage' => false ]);
117 117
         }
118 118
 
119
-        return $this->pageMapper->update($data, ['page_id' => $pageId]);
119
+        return $this->pageMapper->update($data, [ 'page_id' => $pageId ]);
120 120
     }
121 121
 
122 122
     public function delete($pageId)
123 123
     {
124
-        return (bool)$this->pageMapper->delete(['page_id' => $pageId]);
124
+        return (bool) $this->pageMapper->delete([ 'page_id' => $pageId ]);
125 125
     }
126 126
 }
127 127
\ No newline at end of file
Please login to merge, or discard this patch.