Completed
Push — master ( e9a84e...21be5c )
by Aleksandar
26:24
created
packages/Admin/tests/View/Helper/WebAdminUserHelperTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
     public function testGetRandomShouldReturnArray()
17 17
     {
18 18
         $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class)
19
-            ->setMethods(['getForWeb'])
19
+            ->setMethods([ 'getForWeb' ])
20 20
             ->disableOriginalConstructor()
21 21
             ->getMockForAbstractClass();
22 22
         $adminUserService->expects(static::once())
23 23
             ->method('getForWeb')
24
-            ->willReturn([]);
24
+            ->willReturn([ ]);
25 25
         $adminUserHelper = new \Admin\View\Helper\WebAdminUserHelper($adminUserService);
26
-        static::assertSame([], $adminUserHelper->getRandom());
26
+        static::assertSame([ ], $adminUserHelper->getRandom());
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
packages/Admin/tests/Controller/AuthControllerTest.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@  discard block
 block discarded – undo
15 15
         $request = $request->withAttribute('action', 'login');
16 16
         $response = new \Zend\Diactoros\Response\EmptyResponse();
17 17
         $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class)
18
-            ->setMethods(['generateUri'])
18
+            ->setMethods([ 'generateUri' ])
19 19
             ->getMockForAbstractClass();
20 20
         $router->expects(static::at(0))
21 21
             ->method('generateUri')
22 22
             ->will(static::returnValue('http://unfinished.dev/admin'));
23 23
         $sessionManager = $this->getMockBuilder(\Zend\Session\SessionManager::class)
24
-            ->setMethods(['getStorage', 'writeClose'])
24
+            ->setMethods([ 'getStorage', 'writeClose' ])
25 25
             ->getMock();
26 26
         $sessionManager->expects(static::at(0))
27 27
             ->method('getStorage')
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         /** @var \Zend\Diactoros\Response\EmptyResponse $response */
35 35
         $response = $auth($request, $response);
36 36
         static::assertSame(302, $response->getStatusCode());
37
-        static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location'));
37
+        static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location'));
38 38
     }
39 39
 
40 40
     public function testIfUserNotLoggedInLoginActionShouldTakeHimToLoginHtmlPage()
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             ->disableOriginalConstructor()
44 44
             ->getMockForAbstractClass();
45 45
         $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class)
46
-            ->setMethods(['render'])
46
+            ->setMethods([ 'render' ])
47 47
             ->getMockForAbstractClass();
48 48
         $template->expects(static::at(0))
49 49
             ->method('render')
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class)
55 55
             ->getMockForAbstractClass();
56 56
         $sessionManager = $this->getMockBuilder(\Zend\Session\SessionManager::class)
57
-            ->setMethods(['getStorage', 'writeClose'])
57
+            ->setMethods([ 'getStorage', 'writeClose' ])
58 58
             ->getMock();
59 59
         $sessionManager->expects(static::at(0))
60 60
             ->method('getStorage')
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $request = $request->withAttribute('action', 'logout');
82 82
         $response = new \Zend\Diactoros\Response\EmptyResponse();
83 83
         $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class)
84
-            ->setMethods(['generateUri'])
84
+            ->setMethods([ 'generateUri' ])
85 85
             ->getMockForAbstractClass();
86 86
         $router->expects(static::at(0))
87 87
             ->method('generateUri')
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
         $response = $auth($request, $response);
97 97
         static::assertNull($sessionManager->getStorage()->user);
98 98
         static::assertSame(302, $response->getStatusCode());
99
-        static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location'));
99
+        static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location'));
100 100
     }
101 101
 
102 102
     public function testUserLoginHandleWithCorrectCredentialsShouldSetUserInSessionStorage()
103 103
     {
104 104
         $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class)
105 105
             ->disableOriginalConstructor()
106
-            ->setMethods(['loginUser'])
106
+            ->setMethods([ 'loginUser' ])
107 107
             ->getMockForAbstractClass();
108 108
         $adminUserService->expects(static::once())
109 109
             ->method('loginUser')
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $request = $request->withAttribute('action', 'loginHandle');
123 123
         $response = new \Zend\Diactoros\Response\EmptyResponse();
124 124
         $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class)
125
-            ->setMethods(['generateUri'])
125
+            ->setMethods([ 'generateUri' ])
126 126
             ->getMockForAbstractClass();
127 127
         $router->expects(static::at(0))
128 128
             ->method('generateUri')
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
         $response = $auth($request, $response);
136 136
         static::assertTrue($sessionManager->getStorage()->user->isLoggedIn);
137 137
         static::assertSame(302, $response->getStatusCode());
138
-        static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location'));
138
+        static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location'));
139 139
     }
140 140
 
141 141
     public function testUserLoginHandleWithWrongCredentialsShouldNotSetUserInSessionStorage()
142 142
     {
143 143
         $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class)
144 144
             ->disableOriginalConstructor()
145
-            ->setMethods(['loginUser'])
145
+            ->setMethods([ 'loginUser' ])
146 146
             ->getMockForAbstractClass();
147 147
         $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class)
148 148
             ->getMockForAbstractClass();
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $request = $request->withAttribute('action', 'loginHandle');
155 155
         $response = new \Zend\Diactoros\Response\EmptyResponse();
156 156
         $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class)
157
-            ->setMethods(['generateUri'])
157
+            ->setMethods([ 'generateUri' ])
158 158
             ->getMockForAbstractClass();
159 159
         $router->expects(static::at(0))
160 160
             ->method('generateUri')
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $response = $auth($request, $response);
169 169
         static::assertNull($sessionManager->getStorage()->user);
170 170
         static::assertSame(302, $response->getStatusCode());
171
-        static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location'));
171
+        static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location'));
172 172
     }
173 173
 
174 174
     public function testUserLoginHandleWitAlreadyLoggedInUserShouldRedirectToAdminPage()
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $request = $request->withAttribute('action', 'loginHandle');
183 183
         $response = new \Zend\Diactoros\Response\EmptyResponse();
184 184
         $router = $this->getMockBuilder(\Zend\Expressive\Router\RouterInterface::class)
185
-            ->setMethods(['generateUri'])
185
+            ->setMethods([ 'generateUri' ])
186 186
             ->getMockForAbstractClass();
187 187
         $router->expects(static::at(0))
188 188
             ->method('generateUri')
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
         /** @var \Zend\Diactoros\Response\HtmlResponse $response */
197 197
         $response = $auth($request, $response);
198 198
         static::assertSame(302, $response->getStatusCode());
199
-        static::assertSame(['http://unfinished.dev/admin'], $response->getHeader('Location'));
199
+        static::assertSame([ 'http://unfinished.dev/admin' ], $response->getHeader('Location'));
200 200
     }
201 201
 
202 202
     public function testUserLoginHandleShouldThrowExceptionAndDisplayMessage()
203 203
     {
204 204
         $adminUserService = $this->getMockBuilder(\Admin\Service\AdminUserService::class)
205 205
             ->disableOriginalConstructor()
206
-            ->setMethods(['loginUser'])
206
+            ->setMethods([ 'loginUser' ])
207 207
             ->getMockForAbstractClass();
208 208
         $adminUserService->expects(static::once())
209 209
             ->method('loginUser')
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             ->method('render')
215 215
             ->will(static::returnCallback(
216 216
                 function($tpl, $error) {
217
-                    return $error['error'];
217
+                    return $error[ 'error' ];
218 218
                 }
219 219
             ));
220 220
         $request = new \Zend\Diactoros\ServerRequest();
Please login to merge, or discard this patch.
packages/Article/tests/Controller/DiscussionControllerTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     public function testIndexMethodShouldReturnHtmlResponse()
8 8
     {
9 9
         $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class)
10
-            ->setMethods(['render'])
10
+            ->setMethods([ 'render' ])
11 11
             ->getMockForAbstractClass();
12 12
         $template->expects(static::once())
13 13
             ->method('render')
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $sessionStorage = new \Zend\Session\Storage\ArrayStorage();
44 44
         $sessionStorage->user = $user;
45 45
         $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class)
46
-            ->setMethods(['render'])
46
+            ->setMethods([ 'render' ])
47 47
             ->getMockForAbstractClass();
48 48
         $template->expects(static::once())
49 49
             ->method('render')
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $sessionStorage = new \Zend\Session\Storage\ArrayStorage();
81 81
         $sessionStorage->user = $user;
82 82
         $template = $this->getMockBuilder(\Zend\Expressive\Template\TemplateRendererInterface::class)
83
-            ->setMethods(['render'])
83
+            ->setMethods([ 'render' ])
84 84
             ->getMockForAbstractClass();
85 85
         $template->expects(static::once())
86 86
             ->method('render')
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $request = new \Zend\Diactoros\ServerRequest();
100 100
         $request = $request->withAttribute('action', 'edit');
101 101
         $request = $request->withAttribute('id', 1);
102
-        $request = $request->withParsedBody(['discussion' => 'test']);
102
+        $request = $request->withParsedBody([ 'discussion' => 'test' ]);
103 103
         $response = new \Zend\Diactoros\Response();
104 104
         $discussionController = new \Article\Controller\DiscussionController(
105 105
             $template,
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             ->will(static::returnValue('http://unfinished.dev/admin'));
138 138
         $request = new \Zend\Diactoros\ServerRequest();
139 139
         $request = $request->withAttribute('action', 'save');
140
-        $request = $request->withParsedBody(['user' => 'test']);
140
+        $request = $request->withParsedBody([ 'user' => 'test' ]);
141 141
         $response = new \Zend\Diactoros\Response();
142 142
         $discussionController = new \Article\Controller\DiscussionController(
143 143
             $template,
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $request = new \Zend\Diactoros\ServerRequest();
181 181
         $request = $request->withAttribute('action', 'save');
182 182
         $request = $request->withAttribute('id', 2);
183
-        $request = $request->withParsedBody(['user' => 'test']);
183
+        $request = $request->withParsedBody([ 'user' => 'test' ]);
184 184
         $response = new \Zend\Diactoros\Response();
185 185
         $discussionController = new \Article\Controller\DiscussionController(
186 186
             $template,
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             ->getMock();
215 215
         $discussionService->expects(static::once())
216 216
             ->method('updateArticle')
217
-            ->willThrowException(new \Std\FilterException(['test error']));
217
+            ->willThrowException(new \Std\FilterException([ 'test error' ]));
218 218
         $categoryService = $this->getMockBuilder(\Category\Service\CategoryService::class)
219 219
             ->disableOriginalConstructor()
220 220
             ->getMock();
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         $request = new \Zend\Diactoros\ServerRequest();
224 224
         $request = $request->withAttribute('action', 'save');
225 225
         $request = $request->withAttribute('id', 2);
226
-        $request = $request->withParsedBody(['user' => 'test']);
226
+        $request = $request->withParsedBody([ 'user' => 'test' ]);
227 227
         $response = new \Zend\Diactoros\Response();
228 228
         $discussionController = new \Article\Controller\DiscussionController(
229 229
             $template,
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $request = new \Zend\Diactoros\ServerRequest();
270 270
         $request = $request->withAttribute('action', 'save');
271 271
         $request = $request->withAttribute('id', 2);
272
-        $request = $request->withParsedBody(['user' => 'test']);
272
+        $request = $request->withParsedBody([ 'user' => 'test' ]);
273 273
         $response = new \Zend\Diactoros\Response();
274 274
         $discussionController = new \Article\Controller\DiscussionController(
275 275
             $template,
Please login to merge, or discard this patch.
packages/Page/src/ConfigProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
                     'page/pagination' => __DIR__ . '/../templates/partial/pagination.php',
15 15
                 ],
16 16
                 'paths' => [
17
-                    'page' => [__DIR__ . '/../templates/page'],
17
+                    'page' => [ __DIR__ . '/../templates/page' ],
18 18
                 ],
19 19
             ],
20 20
 
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
                     'name'            => 'admin.pages',
33 33
                     'path'            => '/admin/pages',
34 34
                     'middleware'      => Controller\PageController::class,
35
-                    'allowed_methods' => ['GET'],
35
+                    'allowed_methods' => [ 'GET' ],
36 36
                 ],
37 37
                 [
38 38
                     'name'            => 'admin.pages.action',
39 39
                     'path'            => '/admin/pages/:action/:id',
40 40
                     'middleware'      => Controller\PageController::class,
41
-                    'allowed_methods' => ['GET', 'POST']
41
+                    'allowed_methods' => [ 'GET', 'POST' ]
42 42
                 ]
43 43
             ],
44 44
 
Please login to merge, or discard this patch.
packages/Page/src/Entity/Page.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -228,10 +228,10 @@  discard block
 block discarded – undo
228 228
      *
229 229
      * @param array $data
230 230
      */
231
-    public function exchangeArray($data = [])
231
+    public function exchangeArray($data = [ ])
232 232
     {
233 233
         foreach (array_keys(get_object_vars($this)) as $property) {
234
-            $this->{$property} = isset($data[$property]) ? $data[$property]
234
+            $this->{$property} = isset($data[ $property ]) ? $data[ $property ]
235 235
                 : null;
236 236
         }
237 237
     }
@@ -242,18 +242,18 @@  discard block
 block discarded – undo
242 242
     public function getArrayCopy()
243 243
     {
244 244
         return [
245
-            'page_uuid'         => (binary)$this->page_uuid,
246
-            'page_id'           => (string)$this->page_id,
247
-            'title'             => (string)$this->title,
248
-            'body'              => (string)$this->body,
249
-            'description'       => (string)$this->description,
250
-            'main_img'          => (string)$this->main_img,
251
-            'has_layout'        => (boolean)$this->has_layout,
252
-            'is_homepage'       => (boolean)$this->is_homepage,
253
-            'is_active'         => (boolean)$this->is_active,
254
-            'is_wysiwyg_editor' => (boolean)$this->is_wysiwyg_editor,
255
-            'created_at'        => (string)$this->created_at,
256
-            'slug'              => (string)$this->slug
245
+            'page_uuid'         => (binary) $this->page_uuid,
246
+            'page_id'           => (string) $this->page_id,
247
+            'title'             => (string) $this->title,
248
+            'body'              => (string) $this->body,
249
+            'description'       => (string) $this->description,
250
+            'main_img'          => (string) $this->main_img,
251
+            'has_layout'        => (boolean) $this->has_layout,
252
+            'is_homepage'       => (boolean) $this->is_homepage,
253
+            'is_active'         => (boolean) $this->is_active,
254
+            'is_wysiwyg_editor' => (boolean) $this->is_wysiwyg_editor,
255
+            'created_at'        => (string) $this->created_at,
256
+            'slug'              => (string) $this->slug
257 257
         ];
258 258
     }
259 259
 
Please login to merge, or discard this patch.
packages/Menu/src/Mapper/MenuMapper.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -15,24 +15,24 @@  discard block
 block discarded – undo
15 15
         $this->adapter = $adapter;
16 16
     }
17 17
 
18
-    public function selectAll($isActive = null, $filter = [])
18
+    public function selectAll($isActive = null, $filter = [ ])
19 19
     {
20 20
         $select = $this->getSql()->select()
21
-            ->join('category', 'menu.category_uuid = category.category_uuid', ['category_name' => 'name', 'category_slug' => 'slug'], 'left')
22
-            ->join('page', 'page.page_uuid = menu.page_uuid', ['page_id', 'page_slug' => 'slug'], 'left')
23
-            ->order(['order_no' => 'asc']);
21
+            ->join('category', 'menu.category_uuid = category.category_uuid', [ 'category_name' => 'name', 'category_slug' => 'slug' ], 'left')
22
+            ->join('page', 'page.page_uuid = menu.page_uuid', [ 'page_id', 'page_slug' => 'slug' ], 'left')
23
+            ->order([ 'order_no' => 'asc' ]);
24 24
 
25
-        if($isActive !== null) {
26
-            $select->where(['menu.is_active' => $isActive]);
25
+        if ($isActive !== null) {
26
+            $select->where([ 'menu.is_active' => $isActive ]);
27 27
         }
28 28
 
29
-        if($filter) {
30
-            if(isset($filter['is_in_header'])) {
31
-                $select->where(['is_in_header' => $filter['is_in_header']]);
32
-            } elseif(isset($filter['is_in_footer'])) {
33
-                $select->where(['is_in_footer' => $filter['is_in_footer']]);
34
-            } elseif(isset($filter['is_in_side'])) {
35
-                $select->where(['is_in_side' => $filter['is_in_side']]);
29
+        if ($filter) {
30
+            if (isset($filter[ 'is_in_header' ])) {
31
+                $select->where([ 'is_in_header' => $filter[ 'is_in_header' ] ]);
32
+            } elseif (isset($filter[ 'is_in_footer' ])) {
33
+                $select->where([ 'is_in_footer' => $filter[ 'is_in_footer' ] ]);
34
+            } elseif (isset($filter[ 'is_in_side' ])) {
35
+                $select->where([ 'is_in_side' => $filter[ 'is_in_side' ] ]);
36 36
             }
37 37
         }
38 38
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function updateMenuItem($data, $id)
50 50
     {
51
-        $this->update($data, ['menu_id' => $id]);
51
+        $this->update($data, [ 'menu_id' => $id ]);
52 52
 
53 53
         return $id;
54 54
     }
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
     public function get($id)
57 57
     {
58 58
         $select = $this->getSql()->select()
59
-            ->join('page', 'page.page_uuid = menu.page_uuid', ['page_id'], 'left')
60
-            ->join('category', 'category.category_uuid = menu.category_uuid', ['category_id'], 'left')
61
-            ->where(['menu_id' => $id]);
59
+            ->join('page', 'page.page_uuid = menu.page_uuid', [ 'page_id' ], 'left')
60
+            ->join('category', 'category.category_uuid = menu.category_uuid', [ 'category_id' ], 'left')
61
+            ->where([ 'menu_id' => $id ]);
62 62
 
63 63
         return $this->selectWith($select)->current();
64 64
     }
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     public function forSelect()
67 67
     {
68 68
         $select = $this->getSql()->select()
69
-            ->columns(['menu_id', 'title', 'is_active'])
70
-            ->order(['is_active' => 'desc']);
69
+            ->columns([ 'menu_id', 'title', 'is_active' ])
70
+            ->order([ 'is_active' => 'desc' ]);
71 71
 
72 72
         return $this->selectWith($select);
73 73
     }
Please login to merge, or discard this patch.
packages/Menu/src/View/Helper/MenuUrlHelper.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@
 block discarded – undo
31 31
      */
32 32
     public function __invoke($menuItem)
33 33
     {
34
-        if($menuItem['href']) {
35
-            return strpos($menuItem['href'], 'http') === 0 ? $menuItem['href'] : '/' . $menuItem['href'];
34
+        if ($menuItem[ 'href' ]) {
35
+            return strpos($menuItem[ 'href' ], 'http') === 0 ? $menuItem[ 'href' ] : '/' . $menuItem[ 'href' ];
36 36
         }
37
-        elseif($menuItem['page_slug']) {
38
-            return $this->url->__invoke('page', ['url_slug' => $menuItem['page_slug']]);
37
+        elseif ($menuItem[ 'page_slug' ]) {
38
+            return $this->url->__invoke('page', [ 'url_slug' => $menuItem[ 'page_slug' ] ]);
39 39
         }
40
-        elseif($menuItem['category_slug']) {
41
-            return $this->url->__invoke('category', ['category' => $menuItem['category_slug']]);
40
+        elseif ($menuItem[ 'category_slug' ]) {
41
+            return $this->url->__invoke('category', [ 'category' => $menuItem[ 'category_slug' ] ]);
42 42
         }
43 43
         else {
44 44
             return '#';
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,14 +33,11 @@
 block discarded – undo
33 33
     {
34 34
         if($menuItem['href']) {
35 35
             return strpos($menuItem['href'], 'http') === 0 ? $menuItem['href'] : '/' . $menuItem['href'];
36
-        }
37
-        elseif($menuItem['page_slug']) {
36
+        } elseif($menuItem['page_slug']) {
38 37
             return $this->url->__invoke('page', ['url_slug' => $menuItem['page_slug']]);
39
-        }
40
-        elseif($menuItem['category_slug']) {
38
+        } elseif($menuItem['category_slug']) {
41 39
             return $this->url->__invoke('category', ['category' => $menuItem['category_slug']]);
42
-        }
43
-        else {
40
+        } else {
44 41
             return '#';
45 42
         }
46 43
     }
Please login to merge, or discard this patch.
packages/Menu/src/Filter/MenuFilter.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function getInputFilter()
22 22
     {
23
-        if(!$this->inputFilter) {
23
+        if (!$this->inputFilter) {
24 24
             $inputFilter = new InputFilter();
25 25
 
26 26
             $inputFilter->add(
27 27
                 [
28 28
                 'name'       => 'title',
29 29
                 'required'   => true,
30
-                'filters'    => [['name' => 'StripTags'], ['name' => 'StringTrim']],
30
+                'filters'    => [ [ 'name' => 'StripTags' ], [ 'name' => 'StringTrim' ] ],
31 31
                 'validators' => [
32
-                    ['name' => 'NotEmpty'],
33
-                    ['name' => 'StringLength', 'options' => ['max' => '255']],
32
+                    [ 'name' => 'NotEmpty' ],
33
+                    [ 'name' => 'StringLength', 'options' => [ 'max' => '255' ] ],
34 34
                 ],
35 35
                 ]
36 36
             );
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 [
40 40
                 'name'     => 'href',
41 41
                 'required' => false,
42
-                'filters'  => [['name' => 'StripTags'], ['name' => 'StringTrim']]
42
+                'filters'  => [ [ 'name' => 'StripTags' ], [ 'name' => 'StringTrim' ] ]
43 43
                 ]
44 44
             );
45 45
 
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
                 [
48 48
                 'name'       => 'page_id',
49 49
                 'required'   => false,
50
-                'filters'    => [['name' => 'Null']],
50
+                'filters'    => [ [ 'name' => 'Null' ] ],
51 51
                 'validators' => [
52
-                    ['name' => RecordExists::class, 'options' => ['table' => 'page', 'field' => 'page_id', 'adapter' => $this->db]]
52
+                    [ 'name' => RecordExists::class, 'options' => [ 'table' => 'page', 'field' => 'page_id', 'adapter' => $this->db ] ]
53 53
                 ]
54 54
                 ]
55 55
             );
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
                 [
59 59
                 'name'       => 'category_id',
60 60
                 'required'   => false,
61
-                'filters'    => [['name' => 'Null']],
61
+                'filters'    => [ [ 'name' => 'Null' ] ],
62 62
                 'validators' => [
63
-                    ['name' => RecordExists::class, 'options' => ['table' => 'category', 'field' => 'category_id', 'adapter' => $this->db]]
63
+                    [ 'name' => RecordExists::class, 'options' => [ 'table' => 'category', 'field' => 'category_id', 'adapter' => $this->db ] ]
64 64
                 ]
65 65
                 ]
66 66
             );
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 [
70 70
                 'name'     => 'is_active',
71 71
                 'required' => false,
72
-                'filters'  => [['name' => 'Boolean']]
72
+                'filters'  => [ [ 'name' => 'Boolean' ] ]
73 73
                 ]
74 74
             );
75 75
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 [
78 78
                 'name'     => 'is_in_header',
79 79
                 'required' => false,
80
-                'filters'  => [['name' => 'Boolean']]
80
+                'filters'  => [ [ 'name' => 'Boolean' ] ]
81 81
                 ]
82 82
             );
83 83
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 [
86 86
                 'name'     => 'is_in_footer',
87 87
                 'required' => false,
88
-                'filters'  => [['name' => 'Boolean']]
88
+                'filters'  => [ [ 'name' => 'Boolean' ] ]
89 89
                 ]
90 90
             );
91 91
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 [
94 94
                 'name'     => 'is_in_side',
95 95
                 'required' => false,
96
-                'filters'  => [['name' => 'Boolean']]
96
+                'filters'  => [ [ 'name' => 'Boolean' ] ]
97 97
                 ]
98 98
             );
99 99
 
Please login to merge, or discard this patch.
data/phinx/migrations/20161003183351_page.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
6 6
 {
7 7
     public function change()
8 8
     {
9
-        $this->table('page', ['id' => false, 'primary_key' => 'page_uuid'])
10
-            ->addColumn('page_uuid', 'binary', ['limit' => 16])
9
+        $this->table('page', [ 'id' => false, 'primary_key' => 'page_uuid' ])
10
+            ->addColumn('page_uuid', 'binary', [ 'limit' => 16 ])
11 11
             ->addColumn('page_id', 'text')
12 12
             ->addColumn('title', 'text')
13 13
             ->addColumn('body', 'text')
14 14
             ->addColumn('description', 'text')
15 15
             ->addColumn('slug', 'text')
16
-            ->addColumn('main_img', 'text', ['null' => true])
17
-            ->addColumn('has_layout', 'boolean', ['default' => true])
18
-            ->addColumn('is_homepage', 'boolean', ['default' => false])
19
-            ->addColumn('is_active', 'boolean', ['default' => false])
20
-            ->addColumn('is_wysiwyg_editor', 'boolean', ['default' => false])
21
-            ->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP'])
16
+            ->addColumn('main_img', 'text', [ 'null' => true ])
17
+            ->addColumn('has_layout', 'boolean', [ 'default' => true ])
18
+            ->addColumn('is_homepage', 'boolean', [ 'default' => false ])
19
+            ->addColumn('is_active', 'boolean', [ 'default' => false ])
20
+            ->addColumn('is_wysiwyg_editor', 'boolean', [ 'default' => false ])
21
+            ->addColumn('created_at', 'timestamp', [ 'default' => 'CURRENT_TIMESTAMP' ])
22 22
             ->create();
23 23
     }
24 24
 }
Please login to merge, or discard this patch.