@@ -235,10 +235,10 @@ discard block |
||
235 | 235 | * |
236 | 236 | * @param array $data |
237 | 237 | */ |
238 | - public function exchangeArray($data = []) |
|
238 | + public function exchangeArray($data = [ ]) |
|
239 | 239 | { |
240 | 240 | foreach (array_keys(get_object_vars($this)) as $property) { |
241 | - $this->{$property} = isset($data[$property]) ? $data[$property] |
|
241 | + $this->{$property} = isset($data[ $property ]) ? $data[ $property ] |
|
242 | 242 | : null; |
243 | 243 | } |
244 | 244 | } |
@@ -249,18 +249,18 @@ discard block |
||
249 | 249 | public function getArrayCopy() |
250 | 250 | { |
251 | 251 | return [ |
252 | - 'page_uuid' => (binary)$this->page_uuid, |
|
253 | - 'page_id' => (string)$this->page_id, |
|
254 | - 'title' => (string)$this->title, |
|
255 | - 'body' => (string)$this->body, |
|
256 | - 'description' => (string)$this->description, |
|
257 | - 'main_img' => (string)$this->main_img, |
|
258 | - 'has_layout' => (boolean)$this->has_layout, |
|
259 | - 'is_homepage' => (boolean)$this->is_homepage, |
|
260 | - 'is_active' => (boolean)$this->is_active, |
|
261 | - 'is_wysiwyg_editor' => (boolean)$this->is_wysiwyg_editor, |
|
262 | - 'created_at' => (string)$this->created_at, |
|
263 | - 'slug' => (string)$this->slug |
|
252 | + 'page_uuid' => (binary) $this->page_uuid, |
|
253 | + 'page_id' => (string) $this->page_id, |
|
254 | + 'title' => (string) $this->title, |
|
255 | + 'body' => (string) $this->body, |
|
256 | + 'description' => (string) $this->description, |
|
257 | + 'main_img' => (string) $this->main_img, |
|
258 | + 'has_layout' => (boolean) $this->has_layout, |
|
259 | + 'is_homepage' => (boolean) $this->is_homepage, |
|
260 | + 'is_active' => (boolean) $this->is_active, |
|
261 | + 'is_wysiwyg_editor' => (boolean) $this->is_wysiwyg_editor, |
|
262 | + 'created_at' => (string) $this->created_at, |
|
263 | + 'slug' => (string) $this->slug |
|
264 | 264 | ]; |
265 | 265 | } |
266 | 266 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | ->disableOriginalConstructor() |
11 | 11 | ->getMockForAbstractClass(); |
12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
13 | - ->setMethods(['get']) |
|
13 | + ->setMethods([ 'get' ]) |
|
14 | 14 | ->getMockForAbstractClass(); |
15 | 15 | $container->expects(static::at(0)) |
16 | 16 | ->method('get') |
@@ -16,13 +16,13 @@ |
||
16 | 16 | public function testForSelectShouldReturnArray() |
17 | 17 | { |
18 | 18 | $pageService = $this->getMockBuilder(\Page\Service\PageService::class) |
19 | - ->setMethods(['getForSelect']) |
|
19 | + ->setMethods([ 'getForSelect' ]) |
|
20 | 20 | ->disableOriginalConstructor() |
21 | 21 | ->getMockForAbstractClass(); |
22 | 22 | $pageService->expects(static::once()) |
23 | 23 | ->method('getForSelect') |
24 | - ->willReturn([]); |
|
24 | + ->willReturn([ ]); |
|
25 | 25 | $pageHelper = new \Page\View\Helper\PageHelper($pageService); |
26 | - static::assertSame([], $pageHelper->forSelect()); |
|
26 | + static::assertSame([ ], $pageHelper->forSelect()); |
|
27 | 27 | } |
28 | 28 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | ->disableOriginalConstructor() |
11 | 11 | ->getMockForAbstractClass(); |
12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
13 | - ->setMethods(['get']) |
|
13 | + ->setMethods([ 'get' ]) |
|
14 | 14 | ->getMockForAbstractClass(); |
15 | 15 | $container->expects(static::at(0)) |
16 | 16 | ->method('get') |
@@ -46,7 +46,7 @@ |
||
46 | 46 | ->method('createStatement') |
47 | 47 | ->willReturn($statementMock); |
48 | 48 | $adapterMock = $this->getMockBuilder(\Zend\Db\Adapter\Adapter::class) |
49 | - ->setConstructorArgs([$driverMock]) |
|
49 | + ->setConstructorArgs([ $driverMock ]) |
|
50 | 50 | ->getMockForAbstractClass(); |
51 | 51 | $resultSetMock = $this->getMockBuilder(\Zend\Db\ResultSet\HydratingResultSet::class) |
52 | 52 | ->getMockForAbstractClass(); |
@@ -16,52 +16,52 @@ |
||
16 | 16 | public function testForMenuShouldReturnArray() |
17 | 17 | { |
18 | 18 | $menuService = $this->getMockBuilder(\Menu\Service\MenuService::class) |
19 | - ->setMethods(['getNestedAll']) |
|
19 | + ->setMethods([ 'getNestedAll' ]) |
|
20 | 20 | ->disableOriginalConstructor() |
21 | 21 | ->getMockForAbstractClass(); |
22 | 22 | $menuService->expects(static::once()) |
23 | 23 | ->method('getNestedAll') |
24 | - ->willReturn([]); |
|
24 | + ->willReturn([ ]); |
|
25 | 25 | $menuHelper = new \Menu\View\Helper\MenuItems($menuService); |
26 | - static::assertSame([], $menuHelper->forMenu()); |
|
26 | + static::assertSame([ ], $menuHelper->forMenu()); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function testGetHeaderMenuShouldReturnArray() |
30 | 30 | { |
31 | 31 | $menuService = $this->getMockBuilder(\Menu\Service\MenuService::class) |
32 | - ->setMethods(['getNestedAll']) |
|
32 | + ->setMethods([ 'getNestedAll' ]) |
|
33 | 33 | ->disableOriginalConstructor() |
34 | 34 | ->getMockForAbstractClass(); |
35 | 35 | $menuService->expects(static::once()) |
36 | 36 | ->method('getNestedAll') |
37 | - ->willReturn([]); |
|
37 | + ->willReturn([ ]); |
|
38 | 38 | $menuHelper = new \Menu\View\Helper\MenuItems($menuService); |
39 | - static::assertSame([], $menuHelper->getHeaderMenu()); |
|
39 | + static::assertSame([ ], $menuHelper->getHeaderMenu()); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function testGetFooterShouldReturnArray() |
43 | 43 | { |
44 | 44 | $menuService = $this->getMockBuilder(\Menu\Service\MenuService::class) |
45 | - ->setMethods(['getNestedAll']) |
|
45 | + ->setMethods([ 'getNestedAll' ]) |
|
46 | 46 | ->disableOriginalConstructor() |
47 | 47 | ->getMockForAbstractClass(); |
48 | 48 | $menuService->expects(static::once()) |
49 | 49 | ->method('getNestedAll') |
50 | - ->willReturn([]); |
|
50 | + ->willReturn([ ]); |
|
51 | 51 | $menuHelper = new \Menu\View\Helper\MenuItems($menuService); |
52 | - static::assertSame([], $menuHelper->getFooterMenu()); |
|
52 | + static::assertSame([ ], $menuHelper->getFooterMenu()); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | public function testGetSideMenuShouldReturnArray() |
56 | 56 | { |
57 | 57 | $menuService = $this->getMockBuilder(\Menu\Service\MenuService::class) |
58 | - ->setMethods(['getNestedAll']) |
|
58 | + ->setMethods([ 'getNestedAll' ]) |
|
59 | 59 | ->disableOriginalConstructor() |
60 | 60 | ->getMockForAbstractClass(); |
61 | 61 | $menuService->expects(static::once()) |
62 | 62 | ->method('getNestedAll') |
63 | - ->willReturn([]); |
|
63 | + ->willReturn([ ]); |
|
64 | 64 | $menuHelper = new \Menu\View\Helper\MenuItems($menuService); |
65 | - static::assertSame([], $menuHelper->getSideMenu()); |
|
65 | + static::assertSame([ ], $menuHelper->getSideMenu()); |
|
66 | 66 | } |
67 | 67 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | ->disableOriginalConstructor() |
11 | 11 | ->getMockForAbstractClass(); |
12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
13 | - ->setMethods(['get']) |
|
13 | + ->setMethods([ 'get' ]) |
|
14 | 14 | ->getMockForAbstractClass(); |
15 | 15 | $container->expects(static::at(0)) |
16 | 16 | ->method('get') |
@@ -10,7 +10,7 @@ |
||
10 | 10 | ->disableOriginalConstructor() |
11 | 11 | ->getMockForAbstractClass(); |
12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
13 | - ->setMethods(['get']) |
|
13 | + ->setMethods([ 'get' ]) |
|
14 | 14 | ->getMockForAbstractClass(); |
15 | 15 | $container->expects(static::at(0)) |
16 | 16 | ->method('get') |
@@ -10,33 +10,33 @@ discard block |
||
10 | 10 | ->disableOriginalConstructor() |
11 | 11 | ->getMockForAbstractClass(); |
12 | 12 | $menuHelper = new \Menu\View\Helper\MenuUrlHelper($urlHelper); |
13 | - static::assertSame('http://test.example.com', $menuHelper(['href' => 'http://test.example.com'])); |
|
13 | + static::assertSame('http://test.example.com', $menuHelper([ 'href' => 'http://test.example.com' ])); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | public function testInvokingUrlHelperWithPageSlugShouldReturnString() |
17 | 17 | { |
18 | 18 | $urlHelper = $this->getMockBuilder(\Zend\Expressive\Helper\UrlHelper::class) |
19 | - ->setMethods(['__invoke']) |
|
19 | + ->setMethods([ '__invoke' ]) |
|
20 | 20 | ->disableOriginalConstructor() |
21 | 21 | ->getMockForAbstractClass(); |
22 | 22 | $urlHelper->expects(static::once()) |
23 | 23 | ->method('__invoke') |
24 | 24 | ->willReturn('test'); |
25 | 25 | $menuHelper = new \Menu\View\Helper\MenuUrlHelper($urlHelper); |
26 | - static::assertSame('test', $menuHelper(['page_slug' => 'test-slug', 'href' => false])); |
|
26 | + static::assertSame('test', $menuHelper([ 'page_slug' => 'test-slug', 'href' => false ])); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function testInvokingUrlHelperWithCategorySlugShouldReturnString() |
30 | 30 | { |
31 | 31 | $urlHelper = $this->getMockBuilder(\Zend\Expressive\Helper\UrlHelper::class) |
32 | - ->setMethods(['__invoke']) |
|
32 | + ->setMethods([ '__invoke' ]) |
|
33 | 33 | ->disableOriginalConstructor() |
34 | 34 | ->getMockForAbstractClass(); |
35 | 35 | $urlHelper->expects(static::once()) |
36 | 36 | ->method('__invoke') |
37 | 37 | ->willReturn('test'); |
38 | 38 | $menuHelper = new \Menu\View\Helper\MenuUrlHelper($urlHelper); |
39 | - static::assertSame('test', $menuHelper(['category_slug' => 'test-slug', 'href' => false, 'page_slug' => false])); |
|
39 | + static::assertSame('test', $menuHelper([ 'category_slug' => 'test-slug', 'href' => false, 'page_slug' => false ])); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function testInvokingUrlHelperWithAllParamsFalseShouldReturnString() |
@@ -45,6 +45,6 @@ discard block |
||
45 | 45 | ->disableOriginalConstructor() |
46 | 46 | ->getMockForAbstractClass(); |
47 | 47 | $menuHelper = new \Menu\View\Helper\MenuUrlHelper($urlHelper); |
48 | - static::assertSame('#', $menuHelper(['category_slug' => false, 'href' => false, 'page_slug' => false])); |
|
48 | + static::assertSame('#', $menuHelper([ 'category_slug' => false, 'href' => false, 'page_slug' => false ])); |
|
49 | 49 | } |
50 | 50 | } |