Passed
Push — master ( f43cbb...9db35c )
by Reza
03:37
created
src/Parsers/HTMLInputs/InputList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     public static function get($name)
25 25
     {
26
-        if (!key_exists($name, static::inputClassMap)){
26
+        if (!key_exists($name, static::inputClassMap)) {
27 27
             throw new \Exception("The [$name] input type doesn't exist in input list!");
28 28
         }
29 29
 
Please login to merge, or discard this patch.
src/Parsers/HTMLInputs/Select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
 
15 15
         [$class, $method] = $array;
16 16
 
17
-        if (! class_exists($class)){
17
+        if (!class_exists($class)) {
18 18
             throw new Exception("Class {$class} doesn't exist.");
19 19
         }
20 20
 
21 21
         $method = $method ?: 'handle';
22 22
 
23
-        if (! method_exists($class, $method)){
23
+        if (!method_exists($class, $method)) {
24 24
             throw new Exception("Method {$method} doesn't exist on {$class} class.");
25 25
         }
26 26
 
Please login to merge, or discard this patch.
src/Parsers/StubParser.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
         $this->store = $store;
38 38
     }
39 39
 
40
-    public function setAuthType(bool $hasAuth){
40
+    public function setAuthType(bool $hasAuth) {
41 41
         $this->hasAuth = $hasAuth;
42 42
     }
43 43
 
44
-    public function setFields(array $fields){
44
+    public function setFields(array $fields) {
45 45
         $this->fields = $fields;
46 46
     }
47 47
 
48
-    public function setInputs(array $inputs){
48
+    public function setInputs(array $inputs) {
49 49
         $this->inputs = $inputs;
50 50
     }
51 51
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $decodedFile = json_decode(File::get($file), 1);
82 82
             $texts = $this->texts;
83 83
             foreach ($texts as $key => $text) {
84
-                if (array_key_exists($key, $decodedFile)){
84
+                if (array_key_exists($key, $decodedFile)) {
85 85
                     unset($texts[$text]);
86 86
                 }
87 87
             }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $fields = array_keys($this->inputs);
109 109
         $str = '';
110 110
 
111
-        if(in_array($this->inputName, $fields)){
111
+        if (in_array($this->inputName, $fields)) {
112 112
             $this->error("Model name must not equal to column names, fix it and rerun command with -f flag");
113 113
             die;
114 114
         }
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
 
182 182
         foreach ($this->inputs as $key => $field) {
183 183
             $newLine = ($field != end($this->inputs) or $this->hasAuth);
184
-            $str .=  "'$key' => " . '$this' . "->$key,".$this->makeTab(3, $newLine);
184
+            $str .= "'$key' => ".'$this'."->$key,".$this->makeTab(3, $newLine);
185 185
         }
186 186
 
187
-        if($this->hasAuth){
187
+        if ($this->hasAuth) {
188 188
             $str .= "'user_id' => auth()->id(),";
189 189
         }
190 190
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     /**
195 195
      * Create Blade from stub
196 196
      */
197
-    public function parseBlade($stub){
197
+    public function parseBlade($stub) {
198 198
         $modelName = $this->getModelName($this->parsedModel);
199 199
 
200 200
         $array = [
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             $str .= $inputObject->setKey($key)->setAction($this->inputName)->render();
271 271
 
272 272
             $this->texts[$inputObject->getTitle()] = $inputObject->getTitle();
273
-            if ($placeholder = $inputObject->getPlaceholder()){
273
+            if ($placeholder = $inputObject->getPlaceholder()) {
274 274
                 $this->texts[$placeholder] = $placeholder;
275 275
             }
276 276
         }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     /**
282 282
      * Tab Maker (Each tabs mean 4 space)
283 283
      */
284
-    public function makeTab($count, $newLine = true){
284
+    public function makeTab($count, $newLine = true) {
285 285
         $count = $count * 4;
286 286
         $tabs = str_repeat(' ', $count);
287 287
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 
298 298
     public function normalizeField($field)
299 299
     {
300
-        if($field instanceof Field){
300
+        if ($field instanceof Field) {
301 301
             return $field;
302 302
         }
303 303
 
@@ -306,8 +306,8 @@  discard block
 block discarded – undo
306 306
         return Field::title($title);
307 307
     }
308 308
 
309
-    public function normalizeInput($key, $input){
310
-        if ($input instanceof BaseInput){
309
+    public function normalizeInput($key, $input) {
310
+        if ($input instanceof BaseInput) {
311 311
             return $input;
312 312
         }
313 313
 
Please login to merge, or discard this patch.
src/Parsers/Fields/Field.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function asImage()
39 39
     {
40
-        if($this->dataStub != 'linked-image.stub'){
40
+        if ($this->dataStub != 'linked-image.stub') {
41 41
             $this->dataStub = 'image.stub';
42 42
         }
43 43
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
     private function getTitleStubContent()
166 166
     {
167
-        if ($this->isRelational()){
167
+        if ($this->isRelational()) {
168 168
             return file_get_contents(__DIR__.'/stubs/titles/not-sortable.stub');
169 169
         }
170 170
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         return \Str::contains($this->key, '.');
177 177
     }
178 178
 
179
-    private function parseRelationalKey($key){
179
+    private function parseRelationalKey($key) {
180 180
         return str_replace('.', '->', $key);
181 181
     }
182 182
 
Please login to merge, or discard this patch.