Passed
Push — master ( d88b3b...8c1d75 )
by Prateek
09:11 queued 10s
created
src/Generators/Common/Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 class Model extends BaseGenerator implements GeneratorInterface
9 9
 {
10 10
     private static $destination = "laragen/app/Models";
11
-    private static $namespace  = "Laragen\App\Models";
11
+    private static $namespace = "Laragen\App\Models";
12 12
     private static $template = "common/Models/Model";
13 13
     private static $pivotTemplate = "common/Models/Pivot";
14 14
 
Please login to merge, or discard this patch.
src/Generators/Backend/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 class Request extends BaseGenerator implements GeneratorInterface
10 10
 {
11 11
     private static $destination = "laragen/app/Http/Requests/Backend";
12
-    private static $namespace  = "Laragen\App\Http\Requests\Backend";
13
-    private static $template  = "backend/Request";
12
+    private static $namespace = "Laragen\App\Http\Requests\Backend";
13
+    private static $template = "backend/Request";
14 14
 
15 15
     public function generate()
16 16
     {
Please login to merge, or discard this patch.
src/Generators/Backend/Controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 class Controller extends BaseGenerator implements GeneratorInterface
8 8
 {
9 9
     private static $destination = "laragen/app/Http/Controllers/Backend";
10
-    private static $namespace  = "Laragen\App\Http\Controllers\Backend";
11
-    private static $template  = "backend/Controller";
10
+    private static $namespace = "Laragen\App\Http\Controllers\Backend";
11
+    private static $template = "backend/Controller";
12 12
 
13 13
     public function generate()
14 14
     {
Please login to merge, or discard this patch.
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/Models/Types/LaragenType.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 use Illuminate\Support\Str;
5 5
 use Prateekkarki\Laragen\Models\TypeResolver;
6 6
 
7
- /**
8
-  * @method integer getSize()
9
-  */
7
+    /**
8
+     * @method integer getSize()
9
+     */
10 10
 abstract class LaragenType
11 11
 {
12 12
     protected $uniqueFlag;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $filteredTypes = [];
79 79
         $options = is_array($options) ? $options : [$options];
80
-        foreach($this->getPivotColumns() as $type){
80
+        foreach ($this->getPivotColumns() as $type) {
81 81
             foreach ($options as $option) {
82
-                if($type->$option()){
82
+                if ($type->$option()) {
83 83
                     $filteredTypes[] = $columnsOnly ? $type->getColumn() : $type;
84 84
                     break;
85 85
                 }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     
117 117
     public function getForeignKey()
118 118
     {
119
-        return $this->columnName . "_id";
119
+        return $this->columnName."_id";
120 120
     }
121 121
 
122 122
     public function getRelatedModel()
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
     public function getChildModel()
138 138
     {
139
-        return ucfirst(Str::camel(Str::singular($this->typeOption ?? $this->columnName )));
139
+        return ucfirst(Str::camel(Str::singular($this->typeOption ?? $this->columnName)));
140 140
     }
141 141
     
142 142
     public function getParentModel()
Please login to merge, or discard this patch.