Completed
Pull Request — master (#69)
by Aleksandar
29:52
created
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.