Passed
Push — master ( 6a3c94...5b674e )
by Prateek
05:01 queued 02:58
created
src/Models/DataOption.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,10 +50,14 @@
 block discarded – undo
50 50
     {
51 51
         if ($this->hasSpecialSchema()) {
52 52
             $schema = $this->processSpecialSchema();
53
-        }else{
53
+        } else{
54 54
             foreach ($this->optionArray as $option) {
55
-                if ($option == self::COLUMN_UNIQUE)         $this->hasUnique();
56
-                if (is_numeric($option) && $option <= 2048) $this->hasSize((int)$option);
55
+                if ($option == self::COLUMN_UNIQUE) {
56
+                    $this->hasUnique();
57
+                }
58
+                if (is_numeric($option) && $option <= 2048) {
59
+                    $this->hasSize((int)$option);
60
+                }
57 61
             }
58 62
 
59 63
             $schema = '$table->' . $this->getType() . "('{$this->column}'";
Please login to merge, or discard this patch.
src/Generators/BaseGenerator.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@
 block discarded – undo
31 31
     {
32 32
         $dir = base_path($path);
33 33
 
34
-        if(!is_dir($dir))
35
-            mkdir($dir, 0755, true);
34
+        if(!is_dir($dir)) {
35
+                    mkdir($dir, 0755, true);
36
+        }
36 37
 
37 38
         return $dir;
38 39
     }
Please login to merge, or discard this patch.
src/Commands/Generate.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,10 +47,11 @@
 block discarded – undo
47 47
                 $itemGenerator = new $generator($module);
48 48
                 $returnedFiles = $itemGenerator->generate();
49 49
                 
50
-                if(!is_array($returnedFiles)) 
51
-                    $generatedFiles[] = $returnedFiles;
52
-                else
53
-                    $generatedFiles = array_merge($generatedFiles, $returnedFiles);
50
+                if(!is_array($returnedFiles)) {
51
+                                    $generatedFiles[] = $returnedFiles;
52
+                } else {
53
+                                    $generatedFiles = array_merge($generatedFiles, $returnedFiles);
54
+                }
54 55
                 
55 56
                 $bar->advance();
56 57
             }
Please login to merge, or discard this patch.
src/Generators/Seeder.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -84,12 +84,13 @@  discard block
 block discarded – undo
84 84
                 $specialTypes = array_keys($specialTypesToDefinition);
85 85
                 if(in_array($column,$specialTypes)){
86 86
                     $dataDefinition .= $this->getTabs(2) . "'{$column}'" . " => " . '$faker->' . $specialTypesToDefinition[$column];
87
-                }else{
87
+                } else{
88 88
                     $dataDefinition .= $this->getTabs(2) . "'{$column}'" . " => " . '$faker->' . $typeToDefinition[$type];
89 89
                 }
90 90
 
91
-                if($column != last($columns))
92
-                    $dataDefinition .= "," . PHP_EOL;
91
+                if($column != last($columns)) {
92
+                                    $dataDefinition .= "," . PHP_EOL;
93
+                }
93 94
             }
94 95
         }
95 96
         return $dataDefinition;
@@ -107,8 +108,9 @@  discard block
 block discarded – undo
107 108
                     '{{parentModel}}' => ucfirst(camel_case(str_singular($parent)))
108 109
                 ]);
109 110
                 
110
-                if($column != last($columns))
111
-                    $foreignData .= "," . PHP_EOL;
111
+                if($column != last($columns)) {
112
+                                    $foreignData .= "," . PHP_EOL;
113
+                }
112 114
             }
113 115
         }
114 116
 
Please login to merge, or discard this patch.
src/Models/Module.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,10 +55,11 @@
 block discarded – undo
55 55
 
56 56
     public function getForeignColumns($type = 'all')
57 57
     {
58
-        if(is_array($type))
59
-            $types = $type;
60
-        else
61
-            $types = ($type == "all") ? ['parent', 'related'] : [$type];
58
+        if(is_array($type)) {
59
+                    $types = $type;
60
+        } else {
61
+                    $types = ($type == "all") ? ['parent', 'related'] : [$type];
62
+        }
62 63
         
63 64
         $data = [];
64 65
         foreach ($this->data as $column => $optionString) {
Please login to merge, or discard this patch.