Completed
Push — master ( fee819...8bb95a )
by Prateek
05:46 queued 03:35
created
src/Generators/View.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
11 11
         $viewsToBeGenerated = ['index'];
12 12
         
13 13
         foreach ($viewsToBeGenerated as $view) {
14
-            $viewTemplate = $this->buildTemplate('Views/' . $view, [
14
+            $viewTemplate = $this->buildTemplate('Views/'.$view, [
15 15
                 '{{modelName}}'                  => $this->module->getModelName(),
16 16
                 '{{moduleName}}'                 => $this->module->getModuleName(),
17 17
                 '{{modelNameSingularLowerCase}}' => strtolower($this->module->getModelName())
18 18
             ]);
19 19
 
20
-            file_put_contents(base_path("resources/views/" . $this->module->getModuleName() . "/{$view}.blade.php"), $viewTemplate);            
20
+            file_put_contents(base_path("resources/views/".$this->module->getModuleName()."/{$view}.blade.php"), $viewTemplate);            
21 21
         }
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Generators/BaseGenerator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@  discard block
 block discarded – undo
24 24
 
25 25
     public function getStub($type)
26 26
     {
27
-        return file_get_contents(__DIR__ . "/../resources/stubs/" . $type . ".stub");
27
+        return file_get_contents(__DIR__."/../resources/stubs/".$type.".stub");
28 28
     }
29 29
 
30 30
     public function getPath($path)
31 31
     {
32 32
         $dir = base_path($path);
33 33
 
34
-        if(!is_dir($dir))
34
+        if (!is_dir($dir))
35 35
             mkdir($dir, 0755, true);
36 36
 
37 37
         return $dir;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function getTabs($number)
46 46
     {
47 47
         $schema = "";
48
-        for ($i=0; $i < $number; $i++) { 
48
+        for ($i = 0; $i < $number; $i++) { 
49 49
             $schema .= "    ";
50 50
         }
51 51
         return $schema;
Please login to merge, or discard this 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/Generators/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
             '{{modelNameSingularLowerCase}}' => strtolower($this->module->getModelName())
14 14
         ]);
15 15
 
16
-        file_put_contents($this->getPath("app/Http/Controllers/") . $this->module->getModelName() . "Controller" . ".php", $controllerTemplate);
16
+        file_put_contents($this->getPath("app/Http/Controllers/").$this->module->getModelName()."Controller".".php", $controllerTemplate);
17 17
     }
18 18
 }
Please login to merge, or discard this patch.