Completed
Push — master ( 113db7...3cc6f9 )
by Joao
02:23
created
src/Commands/SetupCommand.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,6 @@
 block discarded – undo
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 5
 
8 6
 class SetupCommand extends Command {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $mainFile = $path . '/jlourenco.php';
56 56
         $fileExists = file_exists($mainFile);
57 57
 
58
-        $files = array_filter(scandir($path), function ($var) {
58
+        $files = array_filter(scandir($path), function($var) {
59 59
             return (!(stripos($var, 'jlourenco.') === false) && $var != 'jlourenco.php');
60 60
         });
61 61
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,8 +59,9 @@  discard block
 block discarded – undo
59 59
             return (!(stripos($var, 'jlourenco.') === false) && $var != 'jlourenco.php');
60 60
         });
61 61
 
62
-        if ($fileExists)
63
-            unlink($mainFile);
62
+        if ($fileExists) {
63
+                    unlink($mainFile);
64
+        }
64 65
 
65 66
         touch($mainFile);
66 67
 
@@ -73,8 +74,9 @@  discard block
 block discarded – undo
73 74
 
74 75
             while ($line = fgets($in))
75 76
             {
76
-                if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false))
77
-                    $content .= $line;
77
+                if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false)) {
78
+                                    $content .= $line;
79
+                }
78 80
             }
79 81
 
80 82
             fclose($in);
@@ -85,8 +87,9 @@  discard block
 block discarded – undo
85 87
         $content .= "];\n";
86 88
 
87 89
         $bytesWritten = File::append($mainFile, $content);
88
-        if ($bytesWritten === false)
89
-            die("Couldn't write to config file.");
90
+        if ($bytesWritten === false) {
91
+                    die("Couldn't write to config file.");
92
+        }
90 93
 
91 94
         $this->info('Config files compiled');
92 95
     }
Please login to merge, or discard this patch.