Completed
Pull Request — master (#114)
by
unknown
30:05
created
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.
data/phinx/migrations/20170214131105_menu.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@
 block discarded – undo
7 7
 
8 8
     public function up()
9 9
     {
10
-        $this->table('menu', ['id' => false, 'primary_key' => 'menu_uuid'])
11
-            ->addColumn('menu_uuid', 'binary', ['limit' => 16])
10
+        $this->table('menu', [ 'id' => false, 'primary_key' => 'menu_uuid' ])
11
+            ->addColumn('menu_uuid', 'binary', [ 'limit' => 16 ])
12 12
             ->addColumn('menu_id', 'text')
13
-            ->addColumn('parent_id', 'text', ['null' => true])
13
+            ->addColumn('parent_id', 'text', [ 'null' => true ])
14 14
             ->addColumn('title', 'text')
15
-            ->addColumn('href', 'text', ['null' => true])
16
-            ->addColumn('is_active', 'boolean', ['default' => false])
17
-            ->addColumn('is_in_header', 'boolean', ['default' => true])
18
-            ->addColumn('is_in_footer', 'boolean', ['default' => true])
19
-            ->addColumn('is_in_side', 'boolean', ['default' => true])
20
-            ->addColumn('order_no', 'integer', ['default' => 0])
21
-            ->addColumn('created_at', 'datetime', ['null' => true])
15
+            ->addColumn('href', 'text', [ 'null' => true ])
16
+            ->addColumn('is_active', 'boolean', [ 'default' => false ])
17
+            ->addColumn('is_in_header', 'boolean', [ 'default' => true ])
18
+            ->addColumn('is_in_footer', 'boolean', [ 'default' => true ])
19
+            ->addColumn('is_in_side', 'boolean', [ 'default' => true ])
20
+            ->addColumn('order_no', 'integer', [ 'default' => 0 ])
21
+            ->addColumn('created_at', 'datetime', [ 'null' => true ])
22 22
             //->addForeignKey('parent_id', 'menu', 'id', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION']) # we can not add constraints
23
-            ->addColumn('page_uuid', 'binary', ['limit' => 16, 'null' => true])
24
-            ->addColumn('category_uuid', 'binary', ['limit' => 16, 'null' => true])
25
-            ->addForeignKey('page_uuid', 'page', 'page_uuid', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])
26
-            ->addForeignKey('category_uuid', 'category', 'category_uuid', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])
23
+            ->addColumn('page_uuid', 'binary', [ 'limit' => 16, 'null' => true ])
24
+            ->addColumn('category_uuid', 'binary', [ 'limit' => 16, 'null' => true ])
25
+            ->addForeignKey('page_uuid', 'page', 'page_uuid', [ 'delete' => 'NO_ACTION', 'update' => 'NO_ACTION' ])
26
+            ->addForeignKey('category_uuid', 'category', 'category_uuid', [ 'delete' => 'NO_ACTION', 'update' => 'NO_ACTION' ])
27 27
             ->create();
28 28
     }
29 29
 
Please login to merge, or discard this patch.
data/phinx/seeds/Menu.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             'is_in_side'    => false,
41 41
             'order_no'      => 2,
42 42
             'page_uuid'     => null,
43
-            'category_uuid' => $categoryVideo['category_uuid']
43
+            'category_uuid' => $categoryVideo[ 'category_uuid' ]
44 44
         ])->save();
45 45
 
46 46
         // Insert events category in Menu
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             'is_in_side'    => false,
58 58
             'order_no'      => 3,
59 59
             'page_uuid'     => null,
60
-            'category_uuid' => $categoryEvent['category_uuid']
60
+            'category_uuid' => $categoryEvent[ 'category_uuid' ]
61 61
         ])->save();
62 62
 
63 63
         // Insert link to external web site
Please login to merge, or discard this patch.
packages/Page/src/Entity/Page.php 2 patches
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     }
31 31
 
32 32
     /**
33
-     * @param mixed $is_wysiwyg_editor
33
+     * @param integer $is_wysiwyg_editor
34 34
      */
35 35
     public function setIsWysiwygEditor($is_wysiwyg_editor)
36 36
     {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     }
47 47
 
48 48
     /**
49
-     * @param mixed $slug
49
+     * @param string $slug
50 50
      */
51 51
     public function setSlug($slug)
52 52
     {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     }
70 70
 
71 71
     /**
72
-     * @param mixed $is_active
72
+     * @param integer $is_active
73 73
      */
74 74
     public function setIsActive($is_active)
75 75
     {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     }
86 86
 
87 87
     /**
88
-     * @param $page_uuid
88
+     * @param string $page_uuid
89 89
      */
90 90
     public function setPageUuid($page_uuid) 
91 91
     {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     }
102 102
 
103 103
     /**
104
-     * @param $page_id
104
+     * @param integer $page_id
105 105
      */
106 106
     public function setPageId($page_id)
107 107
     {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     }
118 118
 
119 119
     /**
120
-     * @param mixed $title
120
+     * @param string $title
121 121
      */
122 122
     public function setTitle($title)
123 123
     {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     }
134 134
 
135 135
     /**
136
-     * @param mixed $body
136
+     * @param string $body
137 137
      */
138 138
     public function setBody($body)
139 139
     {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     }
156 156
 
157 157
     /**
158
-     * @param mixed $description
158
+     * @param string $description
159 159
      */
160 160
     public function setDescription($description)
161 161
     {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     }
172 172
 
173 173
     /**
174
-     * @param mixed $main_img
174
+     * @param string $main_img
175 175
      */
176 176
     public function setMainImg($main_img)
177 177
     {
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
     }
202 202
 
203 203
     /**
204
-     * @param mixed $is_homepage
204
+     * @param integer $is_homepage
205 205
      */
206 206
     public function setIsHomepage($is_homepage)
207 207
     {
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -235,10 +235,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
packages/Newsletter/tests/Service/NewsletterServiceTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function testRegisterNewShouldReturnTrue()
22 22
     {
23 23
         $newsletterMapper = $this->getMockBuilder(\Newsletter\Mapper\NewsletterMapper::class)
24
-            ->setMethods(['insert', 'select', 'current'])
24
+            ->setMethods([ 'insert', 'select', 'current' ])
25 25
             ->disableOriginalConstructor()
26 26
             ->getMock();
27 27
         $newsletterMapper->expects(static::once())
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function testRegisterNewWithExistingEmailShouldDoNothingAndReturnNull()
42 42
     {
43 43
         $newsletterMapper = $this->getMockBuilder(\Newsletter\Mapper\NewsletterMapper::class)
44
-            ->setMethods(['select', 'current'])
44
+            ->setMethods([ 'select', 'current' ])
45 45
             ->disableOriginalConstructor()
46 46
             ->getMock();
47 47
         $newsletterMapper->expects(static::once())
Please login to merge, or discard this patch.
packages/Newsletter/tests/Service/NewsletterServiceFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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')
Please login to merge, or discard this patch.
packages/Newsletter/tests/Mapper/PageMapperFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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')
Please login to merge, or discard this patch.
packages/Newsletter/tests/Web/Action/HelperPostActionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     {
9 9
         $newsletterService = $this->getMockBuilder(\Newsletter\Service\NewsletterService::class)
10 10
             ->disableOriginalConstructor()
11
-            ->setMethods(['registerNew'])
11
+            ->setMethods([ 'registerNew' ])
12 12
             ->getMockForAbstractClass();
13 13
         $newsletterService->expects(static::once())
14 14
             ->method('registerNew')
@@ -24,14 +24,14 @@  discard block
 block discarded – undo
24 24
     public function testHandlePostActionShouldReturnJsonResponseWithSuccess()
25 25
     {
26 26
         $newsletterService = $this->getMockBuilder(\Newsletter\Service\NewsletterService::class)
27
-            ->setMethods(['registerNew'])
27
+            ->setMethods([ 'registerNew' ])
28 28
             ->disableOriginalConstructor()
29 29
             ->getMockForAbstractClass();
30 30
         $request = $this->getMockBuilder(\Psr\Http\Message\ServerRequestInterface::class)
31 31
             ->getMockForAbstractClass();
32 32
         $request->expects(static::once())
33 33
             ->method('getParsedBody')
34
-            ->willReturn(['email' => '[email protected]']);
34
+            ->willReturn([ 'email' => '[email protected]' ]);
35 35
         $response = $this->getMockBuilder(\Psr\Http\Message\ResponseInterface::class)
36 36
             ->getMockForAbstractClass();
37 37
         $newsletterAction = new \Newsletter\Web\Action\HandlePostAction($newsletterService);
Please login to merge, or discard this patch.