Completed
Push — master ( 84b26e...499518 )
by Aleksandar
19:20
created
src/Core/Filter/AdminUserFilter.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -19,37 +19,37 @@  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
                 'name'       => 'first_name',
27 27
                 'required'   => true,
28
-                'filters'    => [['name' => 'StringTrim']],
28
+                'filters'    => [ [ 'name' => 'StringTrim' ] ],
29 29
                 'validators' => [
30
-                    ['name' => 'NotEmpty'],
31
-                    ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 255]]
30
+                    [ 'name' => 'NotEmpty' ],
31
+                    [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 255 ] ]
32 32
                 ],
33 33
             ]);
34 34
 
35 35
             $inputFilter->add([
36 36
                 'name'       => 'last_name',
37 37
                 'required'   => true,
38
-                'filters'    => [['name' => 'StringTrim']],
38
+                'filters'    => [ [ 'name' => 'StringTrim' ] ],
39 39
                 'validators' => [
40
-                    ['name' => 'NotEmpty'],
41
-                    ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 255]]
40
+                    [ 'name' => 'NotEmpty' ],
41
+                    [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 255 ] ]
42 42
                 ],
43 43
             ]);
44 44
 
45 45
             $inputFilter->add([
46 46
                 'name'       => 'email',
47 47
                 'required'   => true,
48
-                'filters'    => [['name' => 'StringTrim']],
48
+                'filters'    => [ [ 'name' => 'StringTrim' ] ],
49 49
                 'validators' => [
50
-                    ['name' => 'NotEmpty'],
51
-                    ['name' => 'EmailAddress'],
52
-                    ['name' => 'dbnorecordexists', 'options' => ['adapter' => $this->adapter, 'table' => 'admin_users', 'field' => 'email']],
50
+                    [ 'name' => 'NotEmpty' ],
51
+                    [ 'name' => 'EmailAddress' ],
52
+                    [ 'name' => 'dbnorecordexists', 'options' => [ 'adapter' => $this->adapter, 'table' => 'admin_users', 'field' => 'email' ] ],
53 53
 
54 54
                 ],
55 55
             ]);
@@ -57,21 +57,21 @@  discard block
 block discarded – undo
57 57
             $inputFilter->add([
58 58
                 'name'     => 'introduction',
59 59
                 'required' => false,
60
-                'filters'  => [['name' => 'StringTrim']]
60
+                'filters'  => [ [ 'name' => 'StringTrim' ] ]
61 61
             ]);
62 62
 
63 63
             $inputFilter->add([
64 64
                 'name'     => 'biography',
65 65
                 'required' => false,
66
-                'filters'  => [['name' => 'StringTrim']]
66
+                'filters'  => [ [ 'name' => 'StringTrim' ] ]
67 67
             ]);
68 68
 
69 69
             $inputFilter->add([
70 70
                 'name'       => 'password',
71 71
                 'required'   => true,
72 72
                 'validators' => [
73
-                    ['name' => 'NotEmpty'],
74
-                    ['name' => 'StringLength', 'options' => ['min' => 7, 'max' => 255]]
73
+                    [ 'name' => 'NotEmpty' ],
74
+                    [ 'name' => 'StringLength', 'options' => [ 'min' => 7, 'max' => 255 ] ]
75 75
                 ],
76 76
             ]);
77 77
 
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
                 'name'       => 'confirm_password',
80 80
                 'required'   => true,
81 81
                 'validators' => [
82
-                    ['name' => 'NotEmpty'],
83
-                    ['name' => 'Identical', 'options' => ['token' => 'password']],
82
+                    [ 'name' => 'NotEmpty' ],
83
+                    [ 'name' => 'Identical', 'options' => [ 'token' => 'password' ] ],
84 84
                 ],
85 85
             ]);
86 86
 
87 87
             $inputFilter->add([
88 88
                 'name'       => 'status',
89 89
                 'required'   => true,
90
-                'validators' => [['name' => 'NotEmpty'], ['name' => 'Digits']]
90
+                'validators' => [ [ 'name' => 'NotEmpty' ], [ 'name' => 'Digits' ] ]
91 91
             ]);
92 92
 
93 93
             $this->inputFilter = $inputFilter;
Please login to merge, or discard this patch.
data/phinx/migrations/20160908142829_admin_users.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,21 +8,21 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        $this->table('admin_users', ['id' => false, 'primary_key' => 'admin_user_uuid'])
12
-            ->addColumn('admin_user_uuid', 'binary', ['limit' => 16])
11
+        $this->table('admin_users', [ 'id' => false, 'primary_key' => 'admin_user_uuid' ])
12
+            ->addColumn('admin_user_uuid', 'binary', [ 'limit' => 16 ])
13 13
             ->addColumn('admin_user_id', 'text')
14 14
             ->addColumn('first_name', 'text')
15 15
             ->addColumn('last_name', 'text')
16
-            ->addColumn('introduction', 'text', ['null' => true])
17
-            ->addColumn('biography', 'text', ['null' => true])
18
-            ->addColumn('email', 'string', ['limit' => 128])
19
-            ->addColumn('password', 'char', ['limit' => 60])
20
-            ->addColumn('status', 'integer', ['default' => 0])// 0 => not active, 1 = active
21
-            ->addColumn('face_img', 'text', ['null' => true])
22
-            ->addColumn('profile_img', 'text', ['null' => true])
23
-            ->addColumn('created_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP'])
24
-            ->addColumn('last_login', 'datetime', ['null' => true])
25
-            ->addIndex(['email'], ['name' => 'email_INDEX'])
16
+            ->addColumn('introduction', 'text', [ 'null' => true ])
17
+            ->addColumn('biography', 'text', [ 'null' => true ])
18
+            ->addColumn('email', 'string', [ 'limit' => 128 ])
19
+            ->addColumn('password', 'char', [ 'limit' => 60 ])
20
+            ->addColumn('status', 'integer', [ 'default' => 0 ])// 0 => not active, 1 = active
21
+            ->addColumn('face_img', 'text', [ 'null' => true ])
22
+            ->addColumn('profile_img', 'text', [ 'null' => true ])
23
+            ->addColumn('created_at', 'datetime', [ 'default' => 'CURRENT_TIMESTAMP' ])
24
+            ->addColumn('last_login', 'datetime', [ 'null' => true ])
25
+            ->addIndex([ 'email' ], [ 'name' => 'email_INDEX' ])
26 26
             ->create();
27 27
 
28 28
         $faker = Faker\Factory::create();
Please login to merge, or discard this patch.