Passed
Pull Request — master (#23)
by Prateek
07:40
created
src/Models/Types/General/IntegerType.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,6 +5,6 @@
 block discarded – undo
5 5
 class IntegerType extends GeneralType
6 6
 {
7 7
     protected $dataType = 'integer';
8
-	protected $formType = 'integer';
9
-	protected $size = false;
8
+    protected $formType = 'integer';
9
+    protected $size = false;
10 10
 }
Please login to merge, or discard this patch.
src/Models/Types/General/DateType.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 class DateType extends GeneralType
6 6
 {
7
-	protected $dataType = 'date';
8
-	protected $formType = 'date';
9
-	protected $size = false;
10
-	protected $validationRule = 'date_format:Y-m-d';
7
+    protected $dataType = 'date';
8
+    protected $formType = 'date';
9
+    protected $size = false;
10
+    protected $validationRule = 'date_format:Y-m-d';
11 11
 
12 12
 }
Please login to merge, or discard this patch.
src/Models/Types/File/Single/MixedFileType.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 class MixedFileType extends SingleType
6 6
 {
7
-	protected $hasFile = true;
8
-	protected $extensions = '.zip,.doc,.txt,.pdf,.csv';
9
-	protected $formType = 'file';
7
+    protected $hasFile = true;
8
+    protected $extensions = '.zip,.doc,.txt,.pdf,.csv';
9
+    protected $formType = 'file';
10 10
 }
Please login to merge, or discard this patch.
src/Models/Types/File/Single/ImageType.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 class ImageType extends SingleType
6 6
 {
7
-	protected $hasImage = true;
8
-	protected $formType = 'image';
9
-	protected $extensions = '.png,.jpg,.gif,.bmp,.jpeg';
7
+    protected $hasImage = true;
8
+    protected $formType = 'image';
9
+    protected $extensions = '.png,.jpg,.gif,.bmp,.jpeg';
10 10
 }
Please login to merge, or discard this patch.
src/Models/Types/File/MultipleType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
 
30 30
     public function getPivotTable()
31 31
     {
32
-        return $this->getParentModelLowercase() . "_" . strtolower(Str::plural($this->columnName));
32
+        return $this->getParentModelLowercase()."_".strtolower(Str::plural($this->columnName));
33 33
     }
34 34
 
35 35
     public function getMigrationPivot()
36 36
     {
37
-        return $this->getParentModel() . Str::plural($this->getChildModel());
37
+        return $this->getParentModel().Str::plural($this->getChildModel());
38 38
     }
39 39
 
40 40
     public function getRelatedModel()
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function getPivot()
46 46
     {
47
-        return $this->getParentModel() . $this->getChildModel();
47
+        return $this->getParentModel().$this->getChildModel();
48 48
     }
49 49
     
50 50
     public function getPivotColumns()
Please login to merge, or discard this patch.
src/Models/Types/File/Multiple/AttachmentType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 class AttachmentType extends MultipleType
6 6
 {
7 7
     protected $hasFile = true;
8
-	protected $formType = 'multipleFiles';
8
+    protected $formType = 'multipleFiles';
9 9
 
10 10
     public function getLaragenColumns()
11 11
     {
Please login to merge, or discard this patch.
src/Models/Types/File/Multiple/GalleryType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 class GalleryType extends MultipleType
6 6
 {
7 7
     protected $hasImage = true;
8
-	protected $formType = 'gallery';
8
+    protected $formType = 'gallery';
9 9
 
10 10
     public function getLaragenColumns()
11 11
     {
Please login to merge, or discard this patch.
src/Models/Types/File/SingleType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 class SingleType extends FileType
6 6
 {
7
-	protected $dataType = 'string';
7
+    protected $dataType = 'string';
8 8
 }
Please login to merge, or discard this patch.
src/Models/Types/LaragenType.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,14 +9,14 @@  discard block
 block discarded – undo
9 9
     protected $uniqueFlag;
10 10
     protected $requiredFlag;
11 11
     protected $isDisplay;
12
-	protected $dataType;
13
-	protected $formType;
14
-	protected $stubs = [];
15
-	protected $size = false;
16
-	protected $validationRule = null;
17
-	protected $moduleName;
18
-	protected $columnName;
19
-	protected $optionString;
12
+    protected $dataType;
13
+    protected $formType;
14
+    protected $stubs = [];
15
+    protected $size = false;
16
+    protected $validationRule = null;
17
+    protected $moduleName;
18
+    protected $columnName;
19
+    protected $optionString;
20 20
 	
21 21
     public function __construct($moduleName, $columnName, $optionString)
22 22
     {
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         return property_exists($this, $method) ? $this->$method : "";
55
-   }
55
+    }
56 56
 	
57 57
     public function isRelational()
58 58
     {
59
-       return $this->relationalType;
59
+        return $this->relationalType;
60 60
     }
61 61
 
62 62
     public function getSchema()
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $schema .= ";";
69 69
 
70 70
         return $schema;
71
-	}
71
+    }
72 72
 
73 73
     public function getValidationLine()
74 74
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
         $type = explode(':', $typePieces);
30 30
         $this->typeOption = is_array($type) && count($type) >= 2 ? $type[1] : false;
31 31
 
32
-        if(in_array(TypeResolver::COLUMN_UNIQUE, $this->optionArray)){
32
+        if (in_array(TypeResolver::COLUMN_UNIQUE, $this->optionArray)) {
33 33
             $this->setUnique();
34 34
         }
35
-        if(in_array(TypeResolver::COLUMN_REQUIRED, $this->optionArray)){
35
+        if (in_array(TypeResolver::COLUMN_REQUIRED, $this->optionArray)) {
36 36
             $this->setRequired();
37 37
         }
38
-        if(in_array("*", $this->optionArray)){
38
+        if (in_array("*", $this->optionArray)) {
39 39
             $this->setIsDisplay();
40 40
         }
41 41
     }
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
 
82 82
         if ($this->isUnique()) {
83 83
             $validationLine = '($this->'.$modelname.') ? \'';
84
-            $validationLine .= $rules . '|unique:'.$this->moduleName.','.$this->getColumn().','.'\''.'.$this->'.$modelname.'->id : \'';
85
-            $validationLine .= $rules . '|unique:'.$this->moduleName.'\'';
86
-        } else{
84
+            $validationLine .= $rules.'|unique:'.$this->moduleName.','.$this->getColumn().','.'\''.'.$this->'.$modelname.'->id : \'';
85
+            $validationLine .= $rules.'|unique:'.$this->moduleName.'\'';
86
+        } else {
87 87
             $validationLine = "'{$rules}'";
88 88
         }
89 89
         return $validationLine;
@@ -98,16 +98,16 @@  discard block
 block discarded – undo
98 98
     
99 99
     public function getForeignKey()
100 100
     {
101
-        return $this->columnName . "_id";
101
+        return $this->columnName."_id";
102 102
     }
103 103
 
104 104
     public function getFilteredColumns($options = [], $columnsOnly = false)
105 105
     {
106 106
         $filteredTypes = [];
107 107
         $options = is_array($options) ? $options : [$options];
108
-        foreach($this->getPivotColumns() as $type){
108
+        foreach ($this->getPivotColumns() as $type) {
109 109
             foreach ($options as $option) {
110
-                if($type->$option()){
110
+                if ($type->$option()) {
111 111
                     $filteredTypes[] = $columnsOnly ? $type->getColumn() : $type;
112 112
                     break;
113 113
                 }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
     public function getChildModel()
135 135
     {
136
-        return ucfirst(Str::camel(Str::singular($this->typeOption ?: $this->columnName )));
136
+        return ucfirst(Str::camel(Str::singular($this->typeOption ?: $this->columnName)));
137 137
     }
138 138
     
139 139
     public function getParentModel()
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,8 +158,9 @@
 block discarded – undo
158 158
 
159 159
 
160 160
     public function getTextRows() {
161
-        if (!$this->size)
162
-            return 4;
161
+        if (!$this->size) {
162
+                    return 4;
163
+        }
163 164
         
164 165
         return floor($this->getsize() / 120);
165 166
     }
Please login to merge, or discard this patch.