Passed
Push — master ( 6bec44...1af33d )
by Ferry
03:02
created
src/controllers/scaffolding/singletons/ColumnSingleton.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -42,17 +42,17 @@  discard block
 block discarded – undo
42 42
     public function valueAssignment($data_row = null) {
43 43
         foreach ($this->getColumns() as $index=>$column) {
44 44
 
45
-            if (! $column->getName()) {
45
+            if (!$column->getName()) {
46 46
                 continue;
47 47
             }
48 48
 
49 49
             /** @var ColumnModel $column */
50
-            if($data_row) {
51
-                $value = (isset($data_row->{$column->getField()}))?$data_row->{ $column->getField() }:null;
52
-            }else{
50
+            if ($data_row) {
51
+                $value = (isset($data_row->{$column->getField()})) ? $data_row->{ $column->getField() }:null;
52
+            } else {
53 53
                 $value = request($column->getName());
54 54
 
55
-                if(!$value && $column->getDefaultValue()) {
55
+                if (!$value && $column->getDefaultValue()) {
56 56
                     $value = $column->getDefaultValue();
57 57
                 }
58 58
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $data = $this->columns;
70 70
         $newData = [];
71
-        foreach($data as $i=>$item) {
71
+        foreach ($data as $i=>$item) {
72 72
             /** @var ColumnModel $item */
73
-            if($item->getShowIndex()) {
73
+            if ($item->getShowIndex()) {
74 74
                 $newData[] = $item;
75 75
             }
76 76
         }
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $data = $this->columns;
83 83
         $newData = [];
84
-        foreach($data as $i=>$item) {
84
+        foreach ($data as $i=>$item) {
85 85
             /** @var ColumnModel $item */
86
-            if($item->getShowAdd() || $item->getShowEdit()) {
86
+            if ($item->getShowAdd() || $item->getShowEdit()) {
87 87
                 $newData[] = $item;
88 88
             }
89 89
         }
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
     {
95 95
         $data = $this->columns;
96 96
         $newData = [];
97
-        foreach($data as $i=>$item) {
97
+        foreach ($data as $i=>$item) {
98 98
             /** @var ColumnModel $item */
99
-            if($item->getShowEdit()) {
99
+            if ($item->getShowEdit()) {
100 100
                 $newData[] = $item;
101 101
             }
102 102
         }
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $data = $this->columns;
109 109
         $newData = [];
110
-        foreach($data as $i=>$item) {
110
+        foreach ($data as $i=>$item) {
111 111
             /** @var ColumnModel $item */
112
-            if($item->getShowAdd()) {
112
+            if ($item->getShowAdd()) {
113 113
                 $newData[] = $item;
114 114
             }
115 115
         }
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $data = $this->columns;
122 122
         $newData = [];
123
-        foreach($data as $i=>$item) {
123
+        foreach ($data as $i=>$item) {
124 124
             /** @var ColumnModel $item */
125
-            if($item->getShowDetail()) {
125
+            if ($item->getShowDetail()) {
126 126
                 $newData[] = $item;
127 127
             }
128 128
         }
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
     public function getAssignmentData()
133 133
     {
134 134
         $data = [];
135
-        foreach($this->columns as $column) {
135
+        foreach ($this->columns as $column) {
136 136
             /** @var ColumnModel $column */
137 137
 
138
-            if(is_array($column->getValue())) {
139
-                foreach($column->getValue() as $key=>$val) {
138
+            if (is_array($column->getValue())) {
139
+                foreach ($column->getValue() as $key=>$val) {
140 140
                     $data[$key] = $val;
141 141
                 }
142
-            }else{
142
+            } else {
143 143
                 $data[$column->getField()] = $column->getValue();
144 144
             }
145 145
         }
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
     public function removeColumn($label_or_name)
150 150
     {
151 151
         $data = $this->getColumns();
152
-        foreach($data as $i=>$d)
152
+        foreach ($data as $i=>$d)
153 153
         {
154 154
             /** @var ColumnModel $d */
155
-            if($d->getLabel() == $label_or_name || $d->getName() == $label_or_name) {
155
+            if ($d->getLabel() == $label_or_name || $d->getName() == $label_or_name) {
156 156
                 unset($data[$i]);
157 157
             }
158 158
         }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     public function getColumnNameOnly()
163 163
     {
164 164
         $result = [];
165
-        foreach($this->columns as $column) {
165
+        foreach ($this->columns as $column) {
166 166
             /** @var ColumnModel $column */
167 167
             $result[] = $column->getName();
168 168
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             /** @var ColumnModel $column */
50 50
             if($data_row) {
51 51
                 $value = (isset($data_row->{$column->getField()}))?$data_row->{ $column->getField() }:null;
52
-            }else{
52
+            } else{
53 53
                 $value = request($column->getName());
54 54
 
55 55
                 if(!$value && $column->getDefaultValue()) {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 foreach($column->getValue() as $key=>$val) {
140 140
                     $data[$key] = $val;
141 141
                 }
142
-            }else{
142
+            } else{
143 143
                 $data[$column->getField()] = $column->getValue();
144 144
             }
145 145
         }
Please login to merge, or discard this patch.
src/controllers/scaffolding/traits/ColumnsBasic.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     private function name($label, $name = null)
20 20
     {
21
-        return (!$name)?strtolower(slug($label,"_")):$name;
21
+        return (!$name) ?strtolower(slug($label, "_")) : $name;
22 22
     }
23 23
 
24 24
     /**
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         $model->setShowAdd(true);
40 40
         $model->setShowEdit(true);
41 41
         $model->setShowDetail(true);
42
-        $model->setIndexDisplayTransform(function ($value, $row) { return $value; });
43
-        $model->setDetailDisplayTransform(function ($value, $row) { return $value; });
42
+        $model->setIndexDisplayTransform(function($value, $row) { return $value; });
43
+        $model->setDetailDisplayTransform(function($value, $row) { return $value; });
44 44
         return $model;
45 45
     }
46 46
 
Please login to merge, or discard this patch.
src/types/TypesHook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
 
27 27
     public function indexRender($row, $column)
28 28
     {
29
-        return (isset($row->{$column->getField()}))?$row->{ $column->getField() }:null;
29
+        return (isset($row->{$column->getField()})) ? $row->{ $column->getField() }:null;
30 30
     }
31 31
 
32 32
     public function detailRender($row, $column)
33 33
     {
34
-        return (isset($row->{$column->getField()}))?$row->{ $column->getField() }:null;
34
+        return (isset($row->{$column->getField()})) ? $row->{ $column->getField() }:null;
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
src/commands/Install.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         if ($this->confirm('Do you have setting the database configuration at .env ?')) {
41 41
 
42
-            if (! file_exists(public_path('vendor')) ) {
42
+            if (!file_exists(public_path('vendor'))) {
43 43
                 mkdir(public_path('vendor'), 0777);
44 44
             }
45 45
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     {
172 172
 
173 173
         $password = Str::random(16);
174
-        cache()->forever("developer_password",$password);
174
+        cache()->forever("developer_password", $password);
175 175
 
176 176
         $this->info('--');
177 177
         $this->info("DEVELOPER AREA");
Please login to merge, or discard this patch.
src/helpers/ModuleGenerator.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
     }
42 42
 
43 43
     public function make() {
44
-        $name = ($this->name)?:ucwords(str_replace("_"," ",$this->table));
44
+        $name = ($this->name) ?: ucwords(str_replace("_", " ", $this->table));
45 45
 
46 46
         $template = file_get_contents(__DIR__."/../templates/FooBarController.stub");
47 47
 
48 48
         //Replace table
49
-        $template = str_replace("{table}",'"'.$this->table.'"', $template);
49
+        $template = str_replace("{table}", '"'.$this->table.'"', $template);
50 50
 
51 51
         //Replace permalink
52 52
         $template = str_replace("{permalink}", '"'.$this->table.'"', $template);
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
         //Replace scaffolding
58 58
         $fields = DB::getSchemaBuilder()->getColumnListing($this->table);
59 59
         $primaryKey = cb()->findPrimaryKey($this->table);
60
-        $exceptions = [$primaryKey,'created_at','updated_at'];
60
+        $exceptions = [$primaryKey, 'created_at', 'updated_at'];
61 61
         $scaffold = "";
62
-        foreach($fields as $field) {
62
+        foreach ($fields as $field) {
63 63
 
64
-            if(in_array($field, $exceptions)) continue;
64
+            if (in_array($field, $exceptions)) continue;
65 65
 
66
-            $fielLabel = ucwords(str_replace("_"," ",$field));
66
+            $fielLabel = ucwords(str_replace("_", " ", $field));
67 67
             $scaffold .= '$this->addText("'.$fielLabel.'");'."\n\t\t";
68 68
         }
69 69
         $template = str_replace("{scaffolding}", $scaffold, $template);
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@
 block discarded – undo
61 61
         $scaffold = "";
62 62
         foreach($fields as $field) {
63 63
 
64
-            if(in_array($field, $exceptions)) continue;
64
+            if(in_array($field, $exceptions)) {
65
+                continue;
66
+            }
65 67
 
66 68
             $fielLabel = ucwords(str_replace("_"," ",$field));
67 69
             $scaffold .= '$this->addText("'.$fielLabel.'");'."\n\t\t";
Please login to merge, or discard this patch.
src/views/dev_layouts/modules/menus/form.blade.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -149,21 +149,21 @@
 block discarded – undo
149 149
                     <?php
150 150
                     $font = new \crocodicstudio\crudbooster\helpers\FontAwesome();
151 151
                     $fontData = [
152
-                        ["data"=>$font->text(),"label"=>"Text"],
153
-                        ["data"=>$font->web(),"label"=>"Web"],
154
-                        ["data"=>$font->video(),"label"=>"Video"],
155
-                        ["data"=>$font->transportation(),"label"=>"Transportation"],
156
-                        ["data"=>$font->payment(),"label"=>"Payment"],
157
-                        ["data"=>$font->medical(),"label"=>"Medical"],
158
-                        ["data"=>$font->hand(),"label"=>"Hand"],
159
-                        ["data"=>$font->fileType(),"label"=>"File Type"],
160
-                        ["data"=>$font->directional(),"label"=>"Directional"],
161
-                        ["data"=>$font->currency(),"label"=>"Currency"],
162
-                        ["data"=>$font->chart(),"label"=>"Chart"],
163
-                        ["data"=>$font->brands(),"label"=>"Brand"],
164
-                        ["data"=>$font->gender(),"label"=>"Gender"],
165
-                        ["data"=>$font->form(),"label"=>"Form"],
166
-                        ["data"=>$font->spinner(),"label"=>"Spinner"]
152
+                        ["data"=>$font->text(), "label"=>"Text"],
153
+                        ["data"=>$font->web(), "label"=>"Web"],
154
+                        ["data"=>$font->video(), "label"=>"Video"],
155
+                        ["data"=>$font->transportation(), "label"=>"Transportation"],
156
+                        ["data"=>$font->payment(), "label"=>"Payment"],
157
+                        ["data"=>$font->medical(), "label"=>"Medical"],
158
+                        ["data"=>$font->hand(), "label"=>"Hand"],
159
+                        ["data"=>$font->fileType(), "label"=>"File Type"],
160
+                        ["data"=>$font->directional(), "label"=>"Directional"],
161
+                        ["data"=>$font->currency(), "label"=>"Currency"],
162
+                        ["data"=>$font->chart(), "label"=>"Chart"],
163
+                        ["data"=>$font->brands(), "label"=>"Brand"],
164
+                        ["data"=>$font->gender(), "label"=>"Gender"],
165
+                        ["data"=>$font->form(), "label"=>"Form"],
166
+                        ["data"=>$font->spinner(), "label"=>"Spinner"]
167 167
                     ];
168 168
                     ?>
169 169
                     @foreach($fontData as $f)
Please login to merge, or discard this patch.
assets/adminlte/bower_components/ckeditor/samples/old/assets/posteddata.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,22 +27,22 @@
 block discarded – undo
27 27
 
28 28
 if (!empty($_POST))
29 29
 {
30
-	foreach ( $_POST as $key => $value )
31
-	{
32
-		if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
33
-			continue;
30
+    foreach ( $_POST as $key => $value )
31
+    {
32
+        if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
33
+            continue;
34 34
 
35
-		if ( get_magic_quotes_gpc() )
36
-			$value = htmlspecialchars( stripslashes((string)$value) );
37
-		else
38
-			$value = htmlspecialchars( (string)$value );
35
+        if ( get_magic_quotes_gpc() )
36
+            $value = htmlspecialchars( stripslashes((string)$value) );
37
+        else
38
+            $value = htmlspecialchars( (string)$value );
39 39
 ?>
40 40
 		<tr>
41 41
 			<th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th>
42 42
 			<td><pre class="samples"><?php echo $value; ?></pre></td>
43 43
 		</tr>
44 44
 	<?php
45
-	}
45
+    }
46 46
 }
47 47
 ?>
48 48
 	</table>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,18 +27,18 @@
 block discarded – undo
27 27
 
28 28
 if (!empty($_POST))
29 29
 {
30
-	foreach ( $_POST as $key => $value )
30
+	foreach ($_POST as $key => $value)
31 31
 	{
32
-		if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
32
+		if ((!is_string($value) && !is_numeric($value)) || !is_string($key))
33 33
 			continue;
34 34
 
35
-		if ( get_magic_quotes_gpc() )
36
-			$value = htmlspecialchars( stripslashes((string)$value) );
35
+		if (get_magic_quotes_gpc())
36
+			$value = htmlspecialchars(stripslashes((string) $value));
37 37
 		else
38
-			$value = htmlspecialchars( (string)$value );
38
+			$value = htmlspecialchars((string) $value);
39 39
 ?>
40 40
 		<tr>
41
-			<th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th>
41
+			<th style="vertical-align: top"><?php echo htmlspecialchars((string) $key); ?></th>
42 42
 			<td><pre class="samples"><?php echo $value; ?></pre></td>
43 43
 		</tr>
44 44
 	<?php
Please login to merge, or discard this patch.
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,14 +29,16 @@
 block discarded – undo
29 29
 {
30 30
 	foreach ( $_POST as $key => $value )
31 31
 	{
32
-		if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
33
-			continue;
32
+		if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) ) {
33
+					continue;
34
+		}
34 35
 
35
-		if ( get_magic_quotes_gpc() )
36
-			$value = htmlspecialchars( stripslashes((string)$value) );
37
-		else
38
-			$value = htmlspecialchars( (string)$value );
39
-?>
36
+		if ( get_magic_quotes_gpc() ) {
37
+					$value = htmlspecialchars( stripslashes((string)$value) );
38
+		} else {
39
+					$value = htmlspecialchars( (string)$value );
40
+		}
41
+		?>
40 42
 		<tr>
41 43
 			<th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th>
42 44
 			<td><pre class="samples"><?php echo $value; ?></pre></td>
Please login to merge, or discard this patch.
src/views/dev_layouts/modules/modules/add.blade.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -149,21 +149,21 @@
 block discarded – undo
149 149
                     <?php
150 150
                     $font = new \crocodicstudio\crudbooster\helpers\FontAwesome();
151 151
                     $fontData = [
152
-                        ["data"=>$font->text(),"label"=>"Text"],
153
-                        ["data"=>$font->web(),"label"=>"Web"],
154
-                        ["data"=>$font->video(),"label"=>"Video"],
155
-                        ["data"=>$font->transportation(),"label"=>"Transportation"],
156
-                        ["data"=>$font->payment(),"label"=>"Payment"],
157
-                        ["data"=>$font->medical(),"label"=>"Medical"],
158
-                        ["data"=>$font->hand(),"label"=>"Hand"],
159
-                        ["data"=>$font->fileType(),"label"=>"File Type"],
160
-                        ["data"=>$font->directional(),"label"=>"Directional"],
161
-                        ["data"=>$font->currency(),"label"=>"Currency"],
162
-                        ["data"=>$font->chart(),"label"=>"Chart"],
163
-                        ["data"=>$font->brands(),"label"=>"Brand"],
164
-                        ["data"=>$font->gender(),"label"=>"Gender"],
165
-                        ["data"=>$font->form(),"label"=>"Form"],
166
-                        ["data"=>$font->spinner(),"label"=>"Spinner"]
152
+                        ["data"=>$font->text(), "label"=>"Text"],
153
+                        ["data"=>$font->web(), "label"=>"Web"],
154
+                        ["data"=>$font->video(), "label"=>"Video"],
155
+                        ["data"=>$font->transportation(), "label"=>"Transportation"],
156
+                        ["data"=>$font->payment(), "label"=>"Payment"],
157
+                        ["data"=>$font->medical(), "label"=>"Medical"],
158
+                        ["data"=>$font->hand(), "label"=>"Hand"],
159
+                        ["data"=>$font->fileType(), "label"=>"File Type"],
160
+                        ["data"=>$font->directional(), "label"=>"Directional"],
161
+                        ["data"=>$font->currency(), "label"=>"Currency"],
162
+                        ["data"=>$font->chart(), "label"=>"Chart"],
163
+                        ["data"=>$font->brands(), "label"=>"Brand"],
164
+                        ["data"=>$font->gender(), "label"=>"Gender"],
165
+                        ["data"=>$font->form(), "label"=>"Form"],
166
+                        ["data"=>$font->spinner(), "label"=>"Spinner"]
167 167
                     ];
168 168
                     ?>
169 169
                     @foreach($fontData as $f)
Please login to merge, or discard this patch.
src/views/dev_layouts/modules/modules/edit.blade.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -149,21 +149,21 @@
 block discarded – undo
149 149
                     <?php
150 150
                     $font = new \crocodicstudio\crudbooster\helpers\FontAwesome();
151 151
                     $fontData = [
152
-                        ["data"=>$font->text(),"label"=>"Text"],
153
-                        ["data"=>$font->web(),"label"=>"Web"],
154
-                        ["data"=>$font->video(),"label"=>"Video"],
155
-                        ["data"=>$font->transportation(),"label"=>"Transportation"],
156
-                        ["data"=>$font->payment(),"label"=>"Payment"],
157
-                        ["data"=>$font->medical(),"label"=>"Medical"],
158
-                        ["data"=>$font->hand(),"label"=>"Hand"],
159
-                        ["data"=>$font->fileType(),"label"=>"File Type"],
160
-                        ["data"=>$font->directional(),"label"=>"Directional"],
161
-                        ["data"=>$font->currency(),"label"=>"Currency"],
162
-                        ["data"=>$font->chart(),"label"=>"Chart"],
163
-                        ["data"=>$font->brands(),"label"=>"Brand"],
164
-                        ["data"=>$font->gender(),"label"=>"Gender"],
165
-                        ["data"=>$font->form(),"label"=>"Form"],
166
-                        ["data"=>$font->spinner(),"label"=>"Spinner"]
152
+                        ["data"=>$font->text(), "label"=>"Text"],
153
+                        ["data"=>$font->web(), "label"=>"Web"],
154
+                        ["data"=>$font->video(), "label"=>"Video"],
155
+                        ["data"=>$font->transportation(), "label"=>"Transportation"],
156
+                        ["data"=>$font->payment(), "label"=>"Payment"],
157
+                        ["data"=>$font->medical(), "label"=>"Medical"],
158
+                        ["data"=>$font->hand(), "label"=>"Hand"],
159
+                        ["data"=>$font->fileType(), "label"=>"File Type"],
160
+                        ["data"=>$font->directional(), "label"=>"Directional"],
161
+                        ["data"=>$font->currency(), "label"=>"Currency"],
162
+                        ["data"=>$font->chart(), "label"=>"Chart"],
163
+                        ["data"=>$font->brands(), "label"=>"Brand"],
164
+                        ["data"=>$font->gender(), "label"=>"Gender"],
165
+                        ["data"=>$font->form(), "label"=>"Form"],
166
+                        ["data"=>$font->spinner(), "label"=>"Spinner"]
167 167
                     ];
168 168
                     ?>
169 169
                     @foreach($fontData as $f)
Please login to merge, or discard this patch.