Completed
Pull Request — master (#4)
by
unknown
02:16
created
src/Console/Traits/ModuleCreator.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         if ($directories->isEmpty()) {
105 105
             $this->warn("[Module {$module->name()}] No explicit directories created");
106 106
         } else {
107
-            $directories->each(function ($directory) use ($module) {
107
+            $directories->each(function($directory) use ($module) {
108 108
                 $this->createDirectory($module, $directory);
109 109
             });
110 110
         }
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
      */
122 122
     protected function createDirectory(Module $module, $directory)
123 123
     {
124
-        if( file_exists(base_path().DIRECTORY_SEPARATOR.$directory)){
124
+        if (file_exists(base_path() . DIRECTORY_SEPARATOR . $directory)) {
125 125
             return true;
126
-        }else{
126
+        } else {
127 127
             $result =
128 128
                 $this->laravel['files']->makeDirectory($module->directory() .
129 129
                     DIRECTORY_SEPARATOR . $directory, 0755, true);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         $replacements = $subModule ? ['class' => $subModule] : [];
166 166
 
167
-        $files->each(function ($stubFile, $moduleFile) use ($module, $stubGroup, $replacements) {
167
+        $files->each(function($stubFile, $moduleFile) use ($module, $stubGroup, $replacements) {
168 168
             $this->copyStubFileIntoModule($module, $stubFile, $stubGroup,
169 169
                 $moduleFile, $replacements);
170 170
         });
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
         $destinationFile,
236 236
         array $replacements = []
237 237
     ) {
238
-        if(file_exists(base_path().DIRECTORY_SEPARATOR.dirname($destinationFile))){
238
+        if (file_exists(base_path() . DIRECTORY_SEPARATOR . dirname($destinationFile))) {
239 239
             $result = $this->laravel['files']->put($destinationFile,
240 240
                 $this->replace($this->laravel['files']->get($sourceFile), $module,
241 241
                     $replacements)
242 242
             );
243
-        }else{
243
+        } else {
244 244
             $result = $this->laravel['files']->put($module->directory() .
245 245
                 DIRECTORY_SEPARATOR . $destinationFile,
246 246
                 $this->replace($this->laravel['files']->get($sourceFile), $module,
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     {
124 124
         if( file_exists(base_path().DIRECTORY_SEPARATOR.$directory)){
125 125
             return true;
126
-        }else{
126
+        } else{
127 127
             $result =
128 128
                 $this->laravel['files']->makeDirectory($module->directory() .
129 129
                     DIRECTORY_SEPARATOR . $directory, 0755, true);
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                 $this->replace($this->laravel['files']->get($sourceFile), $module,
241 241
                     $replacements)
242 242
             );
243
-        }else{
243
+        } else{
244 244
             $result = $this->laravel['files']->put($module->directory() .
245 245
                 DIRECTORY_SEPARATOR . $destinationFile,
246 246
                 $this->replace($this->laravel['files']->get($sourceFile), $module,
Please login to merge, or discard this patch.