@@ -1,6 +1,6 @@ |
||
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 |
@@ -12,8 +12,8 @@ |
||
12 | 12 | 'layout/web' => 'templates/layout/web.phtml', |
13 | 13 | ], |
14 | 14 | 'paths' => [ |
15 | - 'templates' => ['templates'], |
|
16 | - 'web' => ['templates/web'], |
|
15 | + 'templates' => [ 'templates' ], |
|
16 | + 'web' => [ 'templates/web' ], |
|
17 | 17 | ], |
18 | 18 | ], |
19 | 19 |
@@ -33,24 +33,24 @@ |
||
33 | 33 | */ |
34 | 34 | public function __invoke($menuItem) |
35 | 35 | { |
36 | - if($menuItem['href']) { |
|
37 | - return strpos($menuItem['href'], 'http') === 0 ? $menuItem['href'] : '/' . $menuItem['href']; |
|
36 | + if ($menuItem[ 'href' ]) { |
|
37 | + return strpos($menuItem[ 'href' ], 'http') === 0 ? $menuItem[ 'href' ] : '/' . $menuItem[ 'href' ]; |
|
38 | 38 | } |
39 | - elseif($menuItem['article_slug']) { |
|
39 | + elseif ($menuItem[ 'article_slug' ]) { |
|
40 | 40 | // @todo refactor - break categories into single category per article... |
41 | - $category = $this->postService->getCategories($menuItem['article_id'])->current(); |
|
41 | + $category = $this->postService->getCategories($menuItem[ 'article_id' ])->current(); |
|
42 | 42 | |
43 | - if($category){ |
|
44 | - $params = ['segment_1' => $category->slug, 'segment_2' => $menuItem['article_slug']]; |
|
43 | + if ($category) { |
|
44 | + $params = [ 'segment_1' => $category->slug, 'segment_2' => $menuItem[ 'article_slug' ] ]; |
|
45 | 45 | } |
46 | - else{ |
|
47 | - $params = ['segment_1' => $menuItem['article_slug']]; |
|
46 | + else { |
|
47 | + $params = [ 'segment_1' => $menuItem[ 'article_slug' ] ]; |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return $this->url->__invoke('post', $params); |
51 | 51 | } |
52 | - elseif($menuItem['category_slug']) { |
|
53 | - return $this->url->__invoke('category', ['category' => $menuItem['category_slug']]); |
|
52 | + elseif ($menuItem[ 'category_slug' ]) { |
|
53 | + return $this->url->__invoke('category', [ 'category' => $menuItem[ 'category_slug' ] ]); |
|
54 | 54 | } |
55 | 55 | else { |
56 | 56 | return '#'; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Web\Action; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Web\Action; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Web\Action; |
6 | 6 |