Completed
Push — master ( d127e1...fbccd8 )
by Aleksandar
26:32
created
packages/Admin/src/Filter/AdminUserFilter.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -19,17 +19,17 @@  discard block
 block discarded – undo
19 19
 
20 20
     public function getInputFilter()
21 21
     {
22
-        if(!$this->inputFilter) {
22
+        if (!$this->inputFilter) {
23 23
             $inputFilter = new InputFilter();
24 24
 
25 25
             $inputFilter->add(
26 26
                 [
27 27
                 'name'       => 'first_name',
28 28
                 'required'   => true,
29
-                'filters'    => [['name' => 'StringTrim']],
29
+                'filters'    => [ [ 'name' => 'StringTrim' ] ],
30 30
                 'validators' => [
31
-                    ['name' => 'NotEmpty'],
32
-                    ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 255]]
31
+                    [ 'name' => 'NotEmpty' ],
32
+                    [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 255 ] ]
33 33
                 ],
34 34
                 ]
35 35
             );
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
                 [
39 39
                 'name'       => 'last_name',
40 40
                 'required'   => true,
41
-                'filters'    => [['name' => 'StringTrim']],
41
+                'filters'    => [ [ 'name' => 'StringTrim' ] ],
42 42
                 'validators' => [
43
-                    ['name' => 'NotEmpty'],
44
-                    ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 255]]
43
+                    [ 'name' => 'NotEmpty' ],
44
+                    [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 255 ] ]
45 45
                 ],
46 46
                 ]
47 47
             );
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
                 [
51 51
                 'name'       => 'email',
52 52
                 'required'   => true,
53
-                'filters'    => [['name' => 'StringTrim']],
53
+                'filters'    => [ [ 'name' => 'StringTrim' ] ],
54 54
                 'validators' => [
55
-                    ['name' => 'NotEmpty'],
56
-                    ['name' => 'EmailAddress'],
57
-                    ['name' => 'dbnorecordexists', 'options' => ['adapter' => $this->adapter, 'table' => 'admin_users', 'field' => 'email']],
55
+                    [ 'name' => 'NotEmpty' ],
56
+                    [ 'name' => 'EmailAddress' ],
57
+                    [ 'name' => 'dbnorecordexists', 'options' => [ 'adapter' => $this->adapter, 'table' => 'admin_users', 'field' => 'email' ] ],
58 58
 
59 59
                 ],
60 60
                 ]
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 [
65 65
                 'name'     => 'introduction',
66 66
                 'required' => false,
67
-                'filters'  => [['name' => 'StringTrim']]
67
+                'filters'  => [ [ 'name' => 'StringTrim' ] ]
68 68
                 ]
69 69
             );
70 70
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 [
73 73
                 'name'     => 'biography',
74 74
                 'required' => false,
75
-                'filters'  => [['name' => 'StringTrim']]
75
+                'filters'  => [ [ 'name' => 'StringTrim' ] ]
76 76
                 ]
77 77
             );
78 78
 
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
                 'name'       => 'password',
82 82
                 'required'   => true,
83 83
                 'validators' => [
84
-                    ['name' => 'NotEmpty'],
85
-                    ['name' => 'StringLength', 'options' => ['min' => 7, 'max' => 255]]
84
+                    [ 'name' => 'NotEmpty' ],
85
+                    [ 'name' => 'StringLength', 'options' => [ 'min' => 7, 'max' => 255 ] ]
86 86
                 ],
87 87
                 ]
88 88
             );
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
                 'name'       => 'confirm_password',
93 93
                 'required'   => true,
94 94
                 'validators' => [
95
-                    ['name' => 'NotEmpty'],
96
-                    ['name' => 'Identical', 'options' => ['token' => 'password']],
95
+                    [ 'name' => 'NotEmpty' ],
96
+                    [ 'name' => 'Identical', 'options' => [ 'token' => 'password' ] ],
97 97
                 ],
98 98
                 ]
99 99
             );
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 [
103 103
                 'name'       => 'status',
104 104
                 'required'   => true,
105
-                'validators' => [['name' => 'NotEmpty'], ['name' => 'Digits']]
105
+                'validators' => [ [ 'name' => 'NotEmpty' ], [ 'name' => 'Digits' ] ]
106 106
                 ]
107 107
             );
108 108
 
Please login to merge, or discard this patch.
packages/Admin/src/Factory/Service/AdminUserServiceFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Admin\Factory\Service;
6 6
 
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __invoke(ContainerInterface $container): AdminUserService
23 23
     {
24
-        $config = $container->get('config')['upload'];
25
-        $upload = new Upload($config['public_path'], $config['non_public_path']);
24
+        $config = $container->get('config')[ 'upload' ];
25
+        $upload = new Upload($config[ 'public_path' ], $config[ 'non_public_path' ]);
26 26
 
27 27
         return new AdminUserService(
28 28
             new Bcrypt(),
Please login to merge, or discard this patch.
packages/Category/tests/View/Helper/CategoryHelperFactoryTest.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/Category/tests/View/Helper/CategoryHelperTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,26 +16,26 @@
 block discarded – undo
16 16
     public function testForSelectShouldReturnArray()
17 17
     {
18 18
         $categoryService = $this->getMockBuilder(\Category\Service\CategoryService::class)
19
-            ->setMethods(['getAll'])
19
+            ->setMethods([ 'getAll' ])
20 20
             ->disableOriginalConstructor()
21 21
             ->getMockForAbstractClass();
22 22
         $categoryService->expects(static::once())
23 23
             ->method('getAll')
24
-            ->willReturn([]);
24
+            ->willReturn([ ]);
25 25
         $categoryHelper = new \Category\View\Helper\CategoryHelper($categoryService);
26
-        static::assertSame([], $categoryHelper->forSelect());
26
+        static::assertSame([ ], $categoryHelper->forSelect());
27 27
     }
28 28
 
29 29
     public function testForHomepageShouldReturnArray()
30 30
     {
31 31
         $categoryService = $this->getMockBuilder(\Category\Service\CategoryService::class)
32
-            ->setMethods(['getCategoriesWithPosts'])
32
+            ->setMethods([ 'getCategoriesWithPosts' ])
33 33
             ->disableOriginalConstructor()
34 34
             ->getMockForAbstractClass();
35 35
         $categoryService->expects(static::once())
36 36
             ->method('getCategoriesWithPosts')
37
-            ->willReturn([]);
37
+            ->willReturn([ ]);
38 38
         $categoryHelper = new \Category\View\Helper\CategoryHelper($categoryService);
39
-        static::assertSame([], $categoryHelper->forHomepage());
39
+        static::assertSame([ ], $categoryHelper->forHomepage());
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
packages/Category/tests/Factory/Controller/IndexFactoryTest.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/Category/tests/Factory/Service/CategoryServiceFactoryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
     $categoryMapper = $this->getMockBuilder(\Category\Mapper\CategoryMapper::class)
12 12
         ->getMockForAbstractClass();
13 13
     $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class)
14
-        ->setMethods(['get'])
14
+        ->setMethods([ 'get' ])
15 15
         ->getMockForAbstractClass();
16 16
     $container->expects(static::at(0))
17 17
         ->method('get')
18
-        ->will(static::returnValue(['upload' => ['public_path' => 'test', 'non_public_path' => 'test']]));
18
+        ->will(static::returnValue([ 'upload' => [ 'public_path' => 'test', 'non_public_path' => 'test' ] ]));
19 19
     $container->expects(static::at(1))
20 20
         ->method('get')
21 21
         ->will(static::returnValue($categoryMapper));
Please login to merge, or discard this patch.
packages/Meetup/src/MeetupApiService.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
     public function getMeetupAttendees($eventUrl)
35 35
     {
36 36
         if (strpos($eventUrl, 'meetup.com') === false) {
37
-            return [];
37
+            return [ ];
38 38
         }
39 39
 
40 40
         try {
41 41
             $parts     = explode('/', $eventUrl);
42
-            $meetupId  = $parts[count($parts) - 2];
42
+            $meetupId  = $parts[ count($parts) - 2 ];
43 43
             $uri       = sprintf(self::API_URL, $meetupId, $this->key);
44 44
             $request   = new Request('GET', $uri);
45 45
             $response  = $this->httpClient->send($request);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             return $attendees;
51 51
         }
52 52
         catch (\Exception $e) {
53
-            return [];
53
+            return [ ];
54 54
         }
55 55
     }
56 56
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@
 block discarded – undo
48 48
             shuffle($attendees);
49 49
 
50 50
             return $attendees;
51
-        }
52
-        catch (\Exception $e) {
51
+        } catch (\Exception $e) {
53 52
             return [];
54 53
         }
55 54
     }
Please login to merge, or discard this patch.
packages/Meetup/src/MeetupApiServiceFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace Meetup;
5 5
 
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function __invoke(ContainerInterface $container): MeetupApiService
17 17
     {
18
-        $config = $container->get('config')['meetupApi'];
18
+        $config = $container->get('config')[ 'meetupApi' ];
19 19
 
20
-        return new MeetupApiService($config['key']);
20
+        return new MeetupApiService($config[ 'key' ]);
21 21
     }
22 22
 }
Please login to merge, or discard this patch.
packages/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.