Passed
Pull Request — master (#27)
by Prateek
06:50
created
src/Commands/Generate.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,10 +64,11 @@
 block discarded – undo
64 64
                 $itemGenerator = new $generator($module);
65 65
                 $returnedFiles = $itemGenerator->generate();
66 66
 
67
-                if (!is_array($returnedFiles))
68
-                    $generatedFiles[] = $returnedFiles;
69
-                else
70
-                    $generatedFiles = array_merge($generatedFiles, $returnedFiles);
67
+                if (!is_array($returnedFiles)) {
68
+                                    $generatedFiles[] = $returnedFiles;
69
+                } else {
70
+                                    $generatedFiles = array_merge($generatedFiles, $returnedFiles);
71
+                }
71 72
 
72 73
                 $bar->advance();
73 74
             }
Please login to merge, or discard this patch.
src/Generators/Backend/View.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,14 +51,14 @@
 block discarded – undo
51 51
         $this->insertIntoFile(
52 52
             $mainMenuFile,
53 53
             '{{-- Main Menu --}}',
54
-			"\n".'<li class="nav-item dropdown">
54
+            "\n".'<li class="nav-item dropdown">
55 55
                     <a href="#" class="nav-link has-dropdown" data-toggle="dropdown"><i class="fas fa-columns"></i> <span> '.Str::plural($this->module->getModelName()).' </span></a>
56 56
                     <ul class="dropdown-menu">
57 57
                         <li><a class="nav-link" href="{{ route("backend.'.$this->module->getModuleName().'.create") }}"> Add new '.Str::plural($this->module->getModelName()).'</a></li>
58 58
                         <li><a class="nav-link" href="{{ route("backend.'.$this->module->getModuleName().'.index") }}">All '.Str::plural($this->module->getModelName()).'</a></li>
59 59
                     </ul>
60 60
                 </li>'
61
-		);
61
+        );
62 62
         return $this->generatedFiles;
63 63
     }
64 64
 
Please login to merge, or discard this patch.
src/Generators/Common/Seeder.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -146,7 +146,9 @@  discard block
 block discarded – undo
146 146
         $foreignData = "";
147 147
 
148 148
         foreach ($types as $type) {
149
-            if ($type->hasSelfParent()) continue;
149
+            if ($type->hasSelfParent()) {
150
+                continue;
151
+            }
150 152
             $foreignData .= $this->buildTemplate('common/Factories/fragments/options', [
151 153
                 '{{parent}}'      => $type->getColumnKey(),
152 154
                 '{{parentModel}}' => $type->getRelatedModel()
@@ -159,8 +161,9 @@  discard block
 block discarded – undo
159 161
     protected function updateSeeder() {
160 162
         $laragenSeederFile = $this->getPath("database/seeds/")."LaragenSeeder.php";
161 163
 
162
-        if(self::$initializeFlag++ == 0)
163
-            $this->initializeFile($laragenSeederFile, 'common/Seeder');
164
+        if(self::$initializeFlag++ == 0) {
165
+                    $this->initializeFile($laragenSeederFile, 'common/Seeder');
166
+        }
164 167
 
165 168
         $this->insertIntoFile(
166 169
             $laragenSeederFile,
Please login to merge, or discard this patch.
src/Models/LaragenOptions.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@
 block discarded – undo
47 47
     public function getModule($name) {
48 48
         if(isset($this->modules[$name])){
49 49
             return $this->modules[$name];
50
-        }
51
-        else{
50
+        } else{
52 51
             throw new \Exception("Module '". $name. "' not found");
53 52
         }
54 53
     }
Please login to merge, or discard this patch.
src/Models/Types/LaragenType.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,17 +5,17 @@  discard block
 block discarded – undo
5 5
 use Prateekkarki\Laragen\Models\TypeResolver;
6 6
 
7 7
 /**
8
-  * The LaragenType abstract class. This class cannot be instantiated. It's implementations are used to create new types.
9
-  * Column instances are created from types that are implementations of this class.
10
-  *
11
-  * @method integer getSize()
12
-  * @method integer getDataType()
13
-  * @method array getPivotColumns()
14
-  * @method void setSize()
15
-  * @method void setIsRequired()
16
-  * @method void setIsUnique()
17
-  * @method void setIsDisplay()
18
-  */
8
+ * The LaragenType abstract class. This class cannot be instantiated. It's implementations are used to create new types.
9
+ * Column instances are created from types that are implementations of this class.
10
+ *
11
+ * @method integer getSize()
12
+ * @method integer getDataType()
13
+ * @method array getPivotColumns()
14
+ * @method void setSize()
15
+ * @method void setIsRequired()
16
+ * @method void setIsUnique()
17
+ * @method void setIsDisplay()
18
+ */
19 19
 abstract class LaragenType
20 20
 {
21 21
     /**
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
     public function getTextRows() {
214 214
         if (!$this->size) {
215
-           return 4;
215
+            return 4;
216 216
         }
217 217
 
218 218
         return floor($this->getsize() / 120);
Please login to merge, or discard this patch.
src/Models/Module.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,8 +118,9 @@
 block discarded – undo
118 118
         $this->displayColumns = [];
119 119
 
120 120
         foreach ($this->columnsData as $column) {
121
-            if ($column->isDisplay())
122
-                $this->displayColumns[] = $column;
121
+            if ($column->isDisplay()) {
122
+                            $this->displayColumns[] = $column;
123
+            }
123 124
         }
124 125
 
125 126
         if (sizeof($this->displayColumns) == 0) {
Please login to merge, or discard this patch.