Completed
Pull Request — master (#69)
by Aleksandar
29:52
created
src/Web/ConfigProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Menu/src/View/Helper/MenuUrlHelper.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,24 +33,24 @@
 block discarded – undo
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 '#';
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,24 +35,20 @@
 block discarded – undo
35 35
     {
36 36
         if($menuItem['href']) {
37 37
             return strpos($menuItem['href'], 'http') === 0 ? $menuItem['href'] : '/' . $menuItem['href'];
38
-        }
39
-        elseif($menuItem['article_slug']) {
38
+        } elseif($menuItem['article_slug']) {
40 39
             // @todo refactor - break categories into single category per article...
41 40
             $category = $this->postService->getCategories($menuItem['article_id'])->current();
42 41
 
43 42
             if($category){
44 43
                 $params = ['segment_1' => $category->slug, 'segment_2' => $menuItem['article_slug']];
45
-            }
46
-            else{
44
+            } else{
47 45
                 $params = ['segment_1' => $menuItem['article_slug']];
48 46
             }
49 47
 
50 48
             return $this->url->__invoke('post', $params);
51
-        }
52
-        elseif($menuItem['category_slug']) {
49
+        } elseif($menuItem['category_slug']) {
53 50
             return $this->url->__invoke('category', ['category' => $menuItem['category_slug']]);
54
-        }
55
-        else {
51
+        } else {
56 52
             return '#';
57 53
         }
58 54
     }
Please login to merge, or discard this patch.
src/Web/Action/VideosAction.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/Action/VideoAction.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/Action/EventAction.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/Article/src/Filter/ArticleFilter.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,36 +12,36 @@
 block discarded – undo
12 12
 
13 13
     public function getInputFilter()
14 14
     {
15
-        if(!$this->inputFilter) {
15
+        if (!$this->inputFilter) {
16 16
             $inputFilter = new InputFilter();
17 17
 
18 18
             $inputFilter->add([
19 19
                 'name'       => 'slug',
20 20
                 'required'   => true,
21
-                'filters'    => [['name' => 'StringTrim', 'options' => ['charlist' => '/']]],
21
+                'filters'    => [ [ 'name' => 'StringTrim', 'options' => [ 'charlist' => '/' ] ] ],
22 22
                 'validators' => [
23
-                    ['name' => 'NotEmpty'],
24
-                    ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100]],
23
+                    [ 'name' => 'NotEmpty' ],
24
+                    [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100 ] ],
25 25
                 ],
26 26
             ]);
27 27
 
28 28
             $inputFilter->add([
29 29
                 'name'       => 'published_at',
30 30
                 'required'   => true,
31
-                'filters'    => [['name' => 'StringTrim']],
32
-                'validators' => [['name' => 'NotEmpty'], ['name' => 'Date', 'options' => ['format' => 'Y-m-d H:i:s']]]
31
+                'filters'    => [ [ 'name' => 'StringTrim' ] ],
32
+                'validators' => [ [ 'name' => 'NotEmpty' ], [ 'name' => 'Date', 'options' => [ 'format' => 'Y-m-d H:i:s' ] ] ]
33 33
             ]);
34 34
 
35 35
             $inputFilter->add([
36 36
                 'name'     => 'status',
37 37
                 'required' => false,
38
-                'filters'  => [['name' => 'Boolean']],
38
+                'filters'  => [ [ 'name' => 'Boolean' ] ],
39 39
             ]);
40 40
 
41 41
             $inputFilter->add([
42 42
                 'name'     => 'is_wysiwyg_editor',
43 43
                 'required' => false,
44
-                'filters'  => [['name' => 'Boolean']],
44
+                'filters'  => [ [ 'name' => 'Boolean' ] ],
45 45
             ]);
46 46
 
47 47
             $this->inputFilter = $inputFilter;
Please login to merge, or discard this patch.
data/phinx/migrations/20161003183353_create_articles_table.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
6 6
 {
7 7
     public function up()
8 8
     {
9
-        $this->table('articles', ['id' => false, 'primary_key' => 'article_uuid'])
10
-            ->addColumn('article_uuid', 'binary', ['limit' => 16])
9
+        $this->table('articles', [ 'id' => false, 'primary_key' => 'article_uuid' ])
10
+            ->addColumn('article_uuid', 'binary', [ 'limit' => 16 ])
11 11
             ->addColumn('article_id', 'text')
12
-            ->addColumn('slug', 'text', ['null' => true])
13
-            ->addColumn('created_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
14
-            ->addColumn('published_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
12
+            ->addColumn('slug', 'text', [ 'null' => true ])
13
+            ->addColumn('created_at', 'datetime', [ 'default' => 'CURRENT_TIMESTAMP' ])
14
+            ->addColumn('published_at', 'datetime', [ 'default' => 'CURRENT_TIMESTAMP' ])
15 15
             ->addColumn('type', 'integer')// see Core\Entity\ArticleType
16 16
             ->addColumn('status', 'integer')// active, not active, ...
17
-            ->addColumn('admin_user_uuid', 'binary', ['limit' => 16])
18
-            ->addColumn('is_wysiwyg_editor', 'boolean', ['default' => false])
19
-            ->addForeignKey('admin_user_uuid', 'admin_users', 'admin_user_uuid', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])
20
-            ->addIndex('type', ['name' => 'type_INDEX'])
21
-            ->addIndex('published_at', ['name' => 'published_at_INDEX'])
17
+            ->addColumn('admin_user_uuid', 'binary', [ 'limit' => 16 ])
18
+            ->addColumn('is_wysiwyg_editor', 'boolean', [ 'default' => false ])
19
+            ->addForeignKey('admin_user_uuid', 'admin_users', 'admin_user_uuid', [ 'delete' => 'NO_ACTION', 'update' => 'NO_ACTION' ])
20
+            ->addIndex('type', [ 'name' => 'type_INDEX' ])
21
+            ->addIndex('published_at', [ 'name' => 'published_at_INDEX' ])
22 22
             ->create();
23 23
     }
24 24
 
Please login to merge, or discard this patch.