@@ -62,7 +62,9 @@ discard block |
||
62 | 62 | { |
63 | 63 | $file = preg_split( " (/|\\\\) ", (string)$this->argument('name')) ?? []; |
64 | 64 | |
65 | - if(!$file) return "Something wrong with the inputs !"; |
|
65 | + if(!$file) { |
|
66 | + return "Something wrong with the inputs !"; |
|
67 | + } |
|
66 | 68 | |
67 | 69 | $this->repoName = $file[count($file) - 1]; |
68 | 70 | |
@@ -107,8 +109,7 @@ discard block |
||
107 | 109 | { |
108 | 110 | $createHtml = $this->FormGenerator->generateForm($entity); |
109 | 111 | $editHtml = $this->FormGenerator->generateForm($entity,'put'); |
110 | - } |
|
111 | - else |
|
112 | + } else |
|
112 | 113 | { |
113 | 114 | if(!$this->confirm('There is no entity for '.$this->repoName.", do you want to continue (this will disable form generator) ?")) |
114 | 115 | { |
@@ -135,8 +136,9 @@ discard block |
||
135 | 136 | function getEntity($path) |
136 | 137 | { |
137 | 138 | $myClass = 'App\Entities\\'.$path."\\".$this->repoName; |
138 | - if(!class_exists($myClass)) |
|
139 | - return false; |
|
139 | + if(!class_exists($myClass)) { |
|
140 | + return false; |
|
141 | + } |
|
140 | 142 | |
141 | 143 | $refl = new ReflectionClass($myClass); |
142 | 144 |