@@ -1,12 +1,8 @@ |
||
1 | 1 | <?php namespace jlourenco\support\Commands; |
2 | 2 | |
3 | 3 | use Illuminate\Console\Command; |
4 | -use Symfony\Component\Console\Input\InputOption; |
|
5 | -use Symfony\Component\Console\Input\InputArgument; |
|
6 | 4 | use File; |
7 | -use jlourenco\support\Helpers\FileLoader; |
|
8 | 5 | use Setting; |
9 | -use Schema; |
|
10 | 6 | |
11 | 7 | class ConfigCommand extends Command { |
12 | 8 |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | private function compileConfigFiles() |
55 | 55 | { |
56 | 56 | $path = base_path('/config'); |
57 | - $mainFile = $path . '/jlourenco.php'; |
|
57 | + $mainFile = $path.'/jlourenco.php'; |
|
58 | 58 | $fileExists = file_exists($mainFile); |
59 | 59 | |
60 | - $files = array_filter(scandir($path), function ($var) { |
|
60 | + $files = array_filter(scandir($path), function($var) { |
|
61 | 61 | return (!(stripos($var, 'jlourenco.') === false) && $var != 'jlourenco.php'); |
62 | 62 | }); |
63 | 63 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | foreach ($files as $file) |
73 | 73 | { |
74 | - $in = fopen($path . '/' . $file, "r"); |
|
74 | + $in = fopen($path.'/'.$file, "r"); |
|
75 | 75 | |
76 | 76 | while ($line = fgets($in)) |
77 | 77 | { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | fclose($in); |
83 | 83 | |
84 | - unlink($path . '/' . $file); |
|
84 | + unlink($path.'/'.$file); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | $content .= "];\n"; |
@@ -57,8 +57,9 @@ discard block |
||
57 | 57 | return (!(stripos($var, 'jlourenco.') === false) && $var != 'jlourenco.php'); |
58 | 58 | }); |
59 | 59 | |
60 | - if ($fileExists) |
|
61 | - unlink($mainFile); |
|
60 | + if ($fileExists) { |
|
61 | + unlink($mainFile); |
|
62 | + } |
|
62 | 63 | |
63 | 64 | touch($mainFile); |
64 | 65 | |
@@ -71,8 +72,9 @@ discard block |
||
71 | 72 | |
72 | 73 | while ($line = fgets($in)) |
73 | 74 | { |
74 | - if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false)) |
|
75 | - $content .= $line; |
|
75 | + if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false)) { |
|
76 | + $content .= $line; |
|
77 | + } |
|
76 | 78 | } |
77 | 79 | |
78 | 80 | fclose($in); |
@@ -84,8 +86,9 @@ discard block |
||
84 | 86 | |
85 | 87 | $bytesWritten = File::append($mainFile, $content); |
86 | 88 | |
87 | - if ($bytesWritten === false) |
|
88 | - $this->info('Couldn\'t write to config file.'); |
|
89 | + if ($bytesWritten === false) { |
|
90 | + $this->info('Couldn\'t write to config file.'); |
|
91 | + } |
|
89 | 92 | |
90 | 93 | $this->info('Config files compiled'); |
91 | 94 | } |
@@ -1,11 +1,6 @@ |
||
1 | 1 | <?php namespace jlourenco\support\Commands; |
2 | 2 | |
3 | 3 | use Illuminate\Console\Command; |
4 | -use Symfony\Component\Console\Input\InputOption; |
|
5 | -use Symfony\Component\Console\Input\InputArgument; |
|
6 | -use File; |
|
7 | -use jlourenco\support\Helpers\FileLoader; |
|
8 | -use Setting; |
|
9 | 4 | use Schema; |
10 | 5 | |
11 | 6 | class MigrateCommand extends Command { |