Test Failed
Push — master ( d78f35...b9bd45 )
by Php Easy Api
04:33
created
Database/Migration/Src/GrammarStructure/Mysql/Wizard/Foreign/Foreign.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function __construct($wizard)
26 26
     {
27
-        $this->wizard=$wizard;
27
+        $this->wizard = $wizard;
28 28
     }
29 29
 
30 30
     /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function constraint($constraint)
35 35
     {
36
-        $this->constraint=$constraint;
36
+        $this->constraint = $constraint;
37 37
         return $this;
38 38
     }
39 39
 
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 
48 48
         $table = $this->wizard->getTable();
49 49
 
50
-        $this->wizard->setReferences($constraint,'key',$key);
50
+        $this->wizard->setReferences($constraint, 'key', $key);
51 51
 
52
-        return new References($this->wizard,$constraint);
52
+        return new References($this->wizard, $constraint);
53 53
     }
54 54
 
55 55
 
Please login to merge, or discard this patch.
Database/Migration/Src/GrammarStructure/Mysql/Wizard/Foreign/References.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
      * @param $wizard
22 22
      * @param $constraint
23 23
      */
24
-    public function __construct($wizard,$constraint)
24
+    public function __construct($wizard, $constraint)
25 25
     {
26
-        $this->wizard=$wizard;
27
-        $this->constraint=$constraint;
26
+        $this->wizard = $wizard;
27
+        $this->constraint = $constraint;
28 28
     }
29 29
 
30 30
     /**
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function references($table, $field = 'id')
36 36
     {
37
-        $this->wizard->setReferences($this->constraint,'references',
37
+        $this->wizard->setReferences($this->constraint, 'references',
38 38
             [
39 39
                 'table'=>$table,
40 40
                 'field'=>$field
41 41
             ]);
42 42
 
43
-        return new Options($this->wizard,$this->constraint);
43
+        return new Options($this->wizard, $this->constraint);
44 44
     }
45 45
 }
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
Migration/Src/GrammarStructure/Mysql/Wizard/Foreign/OptionsProperties.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
      * @param $wizard
22 22
      * @param $constraint
23 23
      */
24
-    public function __construct($wizard,$constraint)
24
+    public function __construct($wizard, $constraint)
25 25
     {
26
-        $this->wizard=$wizard;
27
-        $this->constraint=$constraint;
26
+        $this->wizard = $wizard;
27
+        $this->constraint = $constraint;
28 28
     }
29 29
 
30 30
     /**
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function cascade()
34 34
     {
35
-        $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__);
35
+        $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__);
36 36
     }
37 37
 
38 38
     /**
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function noAction()
42 42
     {
43
-        $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__);
43
+        $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__);
44 44
     }
45 45
 
46 46
     /**
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function restrict()
50 50
     {
51
-        $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__);
51
+        $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__);
52 52
     }
53 53
 
54 54
     /**
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function setDefault()
58 58
     {
59
-        $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__);
59
+        $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__);
60 60
     }
61 61
 
62 62
     /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function setNull()
66 66
     {
67
-        $this->wizard->setReferences($this->constraint,'onOption',__FUNCTION__);
67
+        $this->wizard->setReferences($this->constraint, 'onOption', __FUNCTION__);
68 68
     }
69 69
 
70 70
 
Please login to merge, or discard this patch.
Database/Migration/Src/GrammarStructure/Mysql/Wizard/Foreign/Options.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,10 +21,10 @@  discard block
 block discarded – undo
21 21
      * @param $wizard
22 22
      * @param $constraint
23 23
      */
24
-    public function __construct($wizard,$constraint)
24
+    public function __construct($wizard, $constraint)
25 25
     {
26
-        $this->wizard=$wizard;
27
-        $this->constraint=$constraint;
26
+        $this->wizard = $wizard;
27
+        $this->constraint = $constraint;
28 28
     }
29 29
 
30 30
     /**
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function onDelete()
34 34
     {
35
-        $this->wizard->setReferences($this->constraint,'on','ON DELETE');
36
-        return new OptionsProperties($this->wizard,$this->constraint);
35
+        $this->wizard->setReferences($this->constraint, 'on', 'ON DELETE');
36
+        return new OptionsProperties($this->wizard, $this->constraint);
37 37
     }
38 38
 
39 39
     /**
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function onUpdate()
43 43
     {
44
-        $this->wizard->setReferences($this->constraint,'on','ON UPDATE');
45
-        return new OptionsProperties($this->wizard,$this->constraint);
44
+        $this->wizard->setReferences($this->constraint, 'on', 'ON UPDATE');
45
+        return new OptionsProperties($this->wizard, $this->constraint);
46 46
     }
47 47
 
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
resta/Database/Migration/Src/GrammarStructure/Mysql/Wizard/WizardHelper.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function setError($message)
120 120
     {
121
-        $this->error[]=$message;
121
+        $this->error[] = $message;
122 122
     }
123 123
 
124 124
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function setEngine($engine)
128 128
     {
129
-        $this->engine=$engine;
129
+        $this->engine = $engine;
130 130
     }
131 131
 
132 132
     /**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function setName($name)
136 136
     {
137
-        $this->name[]=$name;
137
+        $this->name[] = $name;
138 138
     }
139 139
 
140 140
     /**
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
      * @param $key
150 150
      * @param $value
151 151
      */
152
-    public function setAlterType($key,$value)
152
+    public function setAlterType($key, $value)
153 153
     {
154
-        $this->alterType[$key]=$value;
154
+        $this->alterType[$key] = $value;
155 155
     }
156 156
 
157 157
     /**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function setTable($table)
161 161
     {
162
-        $this->table=$table;
162
+        $this->table = $table;
163 163
     }
164 164
 
165 165
     /**
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      */
168 168
     public function schemaType($schemaType)
169 169
     {
170
-        $this->schemaType=$schemaType;
170
+        $this->schemaType = $schemaType;
171 171
     }
172 172
 
173 173
     /**
@@ -175,18 +175,18 @@  discard block
 block discarded – undo
175 175
      * @param null $value
176 176
      * @param null $cond
177 177
      */
178
-    public function setTypes($type,$value=null,$cond=null)
178
+    public function setTypes($type, $value = null, $cond = null)
179 179
     {
180
-        if(!is_array($value) && $value!==null){
181
-            $this->types[]=''.$type.'('.$value.')';
180
+        if (!is_array($value) && $value!==null) {
181
+            $this->types[] = ''.$type.'('.$value.')';
182 182
         }
183
-        else{
183
+        else {
184 184
 
185
-            if($cond=='enum'){
186
-                $this->types[]="".$type."('".implode("','",$value)."')";
185
+            if ($cond=='enum') {
186
+                $this->types[] = "".$type."('".implode("','", $value)."')";
187 187
             }
188
-            else{
189
-                $this->types[]=''.$type.'';
188
+            else {
189
+                $this->types[] = ''.$type.'';
190 190
             }
191 191
 
192 192
         }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     /**
197 197
      * @return mixed
198 198
      */
199
-    protected function getLastName(){
199
+    protected function getLastName() {
200 200
 
201 201
         return end($this->name);
202 202
     }
@@ -222,14 +222,14 @@  discard block
 block discarded – undo
222 222
      * @param $data
223 223
      * @param string $specialist
224 224
      */
225
-    public function updateIndexesForSpecialist($name,$data,$specialist='type')
225
+    public function updateIndexesForSpecialist($name, $data, $specialist = 'type')
226 226
     {
227 227
         $indexes = $this->getIndex();
228 228
 
229
-        foreach ($indexes['indexes'] as $key=>$index){
229
+        foreach ($indexes['indexes'] as $key=>$index) {
230 230
 
231
-            if($index['name']==$name){
232
-                $this->index['indexes'][$key][$specialist]=$data;
231
+            if ($index['name']==$name) {
232
+                $this->index['indexes'][$key][$specialist] = $data;
233 233
             }
234 234
         }
235 235
     }
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
      * @param $key
240 240
      * @param $value
241 241
      */
242
-    public function setReferences($constraint,$key,$value)
242
+    public function setReferences($constraint, $key, $value)
243 243
     {
244
-        $this->references[$constraint][$key]=$value;
244
+        $this->references[$constraint][$key] = $value;
245 245
     }
246 246
 
247 247
     /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -179,13 +179,11 @@
 block discarded – undo
179 179
     {
180 180
         if(!is_array($value) && $value!==null){
181 181
             $this->types[]=''.$type.'('.$value.')';
182
-        }
183
-        else{
182
+        } else{
184 183
 
185 184
             if($cond=='enum'){
186 185
                 $this->types[]="".$type."('".implode("','",$value)."')";
187
-            }
188
-            else{
186
+            } else{
189 187
                 $this->types[]=''.$type.'';
190 188
             }
191 189
 
Please login to merge, or discard this patch.
Database/Migration/Src/GrammarStructure/Mysql/Wizard/TableProperties.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __construct($wizard)
23 23
     {
24
-        $this->wizard=$wizard;
24
+        $this->wizard = $wizard;
25 25
     }
26 26
 
27 27
     /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function collation($value = 'utf8')
32 32
     {
33
-        $this->wizard->collation($value,'true');
33
+        $this->wizard->collation($value, 'true');
34 34
     }
35 35
 
36 36
     /**
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
      * @param null $comment
56 56
      * @return IndexPropertiesContract
57 57
      */
58
-    public function indexes($index_name, $fields = array(),$comment=null)
58
+    public function indexes($index_name, $fields = array(), $comment = null)
59 59
     {
60
-        $this->wizard->index($index_name,$fields,true);
60
+        $this->wizard->index($index_name, $fields, true);
61 61
 
62
-        if($comment!==null) $this->wizard->updateIndexesForSpecialist($index_name,$comment,'comment');
62
+        if ($comment!==null) $this->wizard->updateIndexesForSpecialist($index_name, $comment, 'comment');
63 63
 
64
-        return new IndexProperties($index_name,$this->wizard);
64
+        return new IndexProperties($index_name, $this->wizard);
65 65
     }
66 66
 
67 67
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,9 @@
 block discarded – undo
59 59
     {
60 60
         $this->wizard->index($index_name,$fields,true);
61 61
 
62
-        if($comment!==null) $this->wizard->updateIndexesForSpecialist($index_name,$comment,'comment');
62
+        if($comment!==null) {
63
+            $this->wizard->updateIndexesForSpecialist($index_name,$comment,'comment');
64
+        }
63 65
 
64 66
         return new IndexProperties($index_name,$this->wizard);
65 67
     }
Please login to merge, or discard this patch.
Database/Migration/Src/GrammarStructure/Mysql/Traits/ColumnsProcess.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@  discard block
 block discarded – undo
12 12
     /**
13 13
      * @var string
14 14
      */
15
-    private $fieldKey='Field';
15
+    private $fieldKey = 'Field';
16 16
 
17 17
     /**
18 18
      * @param $columns
19 19
      */
20 20
     public function columnsProcess($columns)
21 21
     {
22
-        $this->columns=$columns;
22
+        $this->columns = $columns;
23 23
     }
24 24
 
25 25
     /**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param array $tables
35 35
      * @return array
36 36
      */
37
-    public function fields($tables=array())
37
+    public function fields($tables = array())
38 38
     {
39 39
         $list = [];
40 40
 
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
         {
43 43
             foreach ($columns as $columnData)
44 44
             {
45
-                if(count($tables)){
45
+                if (count($tables)) {
46 46
 
47
-                    if(in_array($table,$tables)){
47
+                    if (in_array($table, $tables)) {
48 48
                         $list[$table][] = $columnData[$this->fieldKey];
49 49
                     }
50 50
                 }
51
-                else{
51
+                else {
52 52
                     $list[$table][] = $columnData[$this->fieldKey];
53 53
                 }
54 54
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@
 block discarded – undo
47 47
                     if(in_array($table,$tables)){
48 48
                         $list[$table][] = $columnData[$this->fieldKey];
49 49
                     }
50
-                }
51
-                else{
50
+                } else{
52 51
                     $list[$table][] = $columnData[$this->fieldKey];
53 52
                 }
54 53
             }
Please login to merge, or discard this patch.
src/resta/Database/Migration/Src/GrammarStructure/Mysql/QueryBase.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class QueryBase implements QueryBaseContract
11 11
 {
12
-    use QueryStack,ColumnsProcess;
12
+    use QueryStack, ColumnsProcess;
13 13
 
14 14
     /**
15 15
      * @return mixed
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
         $list = [];
30 30
 
31
-        foreach ($tables as $key=>$resource){
31
+        foreach ($tables as $key=>$resource) {
32 32
 
33 33
             $list[$key] = $resource[0];
34 34
         }
@@ -40,15 +40,15 @@  discard block
 block discarded – undo
40 40
      * @param array $tables
41 41
      * @return ColumnsProcessContract
42 42
      */
43
-    public function getColumns($tables=array())
43
+    public function getColumns($tables = array())
44 44
     {
45 45
         $tableList = (count($tables)) ? $tables : $this->getTables();
46 46
 
47 47
         $list = [];
48 48
 
49
-        foreach ($tableList as $table){
49
+        foreach ($tableList as $table) {
50 50
 
51
-            if(in_array($table,$this->getTables())){
51
+            if (in_array($table, $this->getTables())) {
52 52
                 $list[$table] = $this->showColumnsFrom($table);
53 53
             }
54 54
         }
Please login to merge, or discard this patch.
src/resta/Database/Migration/Src/Resource/Request/BaseRequestProcess.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
                 //get path and set mkdir
94 94
                 $path = $mainPath.'/'.ucfirst($table);
95 95
                 if(!file_exists($path)){
96
-                   $mkdirResults[] = mkdir($path, 0777);
96
+                    $mkdirResults[] = mkdir($path, 0777);
97 97
                 }
98 98
             }
99 99
         }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
 
36 36
         $paths = self::$paths;
37 37
 
38
-        foreach ($paths as $path){
38
+        foreach ($paths as $path) {
39 39
             $globPaths = array_filter(glob($path.'/*'), 'is_dir');
40
-            foreach ($globPaths as $reelPath){
41
-                $list[]=$reelPath;
40
+            foreach ($globPaths as $reelPath) {
41
+                $list[] = $reelPath;
42 42
             }
43 43
         }
44 44
 
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
 
55 55
         $list = [];
56 56
 
57
-        foreach ($directories as $directory){
57
+        foreach ($directories as $directory) {
58 58
 
59 59
             foreach (glob($directory."/*.php") as $file) {
60 60
 
61
-                $list[self::getFileName($directory)][]=$file;
61
+                $list[self::getFileName($directory)][] = $file;
62 62
             }
63 63
         }
64 64
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public static function getFileName($path)
73 73
     {
74
-        $pathParse = explode ("/",$path);
74
+        $pathParse = explode("/", $path);
75 75
 
76 76
         return end($pathParse);
77 77
     }
@@ -87,18 +87,18 @@  discard block
 block discarded – undo
87 87
 
88 88
         $mkdirResults = [];
89 89
 
90
-        foreach ($tables as $table){
91
-            if(!isset($directories[$table])){
90
+        foreach ($tables as $table) {
91
+            if (!isset($directories[$table])) {
92 92
 
93 93
                 //get path and set mkdir
94 94
                 $path = $mainPath.'/'.ucfirst($table);
95
-                if(!file_exists($path)){
95
+                if (!file_exists($path)) {
96 96
                    $mkdirResults[] = mkdir($path, 0777);
97 97
                 }
98 98
             }
99 99
         }
100 100
 
101
-        dd(self::getAllDirectories(),$tables,$mkdirResults);
101
+        dd(self::getAllDirectories(), $tables, $mkdirResults);
102 102
     }
103 103
 }
104 104
 
Please login to merge, or discard this patch.