@@ -47,10 +47,11 @@ |
||
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 | } |
@@ -52,8 +52,12 @@ |
||
52 | 52 | $schema = $this->processSpecialSchema(); |
53 | 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}'"; |
@@ -55,10 +55,11 @@ |
||
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) { |
@@ -31,8 +31,9 @@ |
||
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 | } |