Passed
Push — master ( b43194...ce05c1 )
by Ferry
04:20
created
src/types/checkbox/filter.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
     /** @var \crocodicstudio\crudbooster\types\checkbox\CheckboxModel $column */
3
-    $filterName = "filter_".slug($column->getFilterColumn(),"_");
3
+    $filterName = "filter_".slug($column->getFilterColumn(), "_");
4 4
     $filterValue = sanitizeXSS(request($filterName));
5 5
 ?>
6 6
 <select name="filter_{{ slug($column->getFilterColumn(),"_") }}" style="width: 100%" id="filter_{{ $column->getName()  }}" class="form-control select2">
Please login to merge, or discard this patch.
src/types/radio/filter.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
     /** @var \crocodicstudio\crudbooster\types\radio\RadioModel $column */
3
-    $filterName = "filter_".slug($column->getFilterColumn(),"_");
3
+    $filterName = "filter_".slug($column->getFilterColumn(), "_");
4 4
     $filterValue = sanitizeXSS(request($filterName));
5 5
 ?>
6 6
 <select name="filter_{{ slug($column->getFilterColumn(),"_") }}" style="width: 100%" id="filter_{{ $column->getName()  }}" class="form-control select2">
Please login to merge, or discard this patch.
src/types/datetime/Hook.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function indexRender($row, $column)
22 22
     {
23
-        if($column->getFormat()) {
23
+        if ($column->getFormat()) {
24 24
             return date($column->getFormat(), strtotime($row->{$column->getField()}));
25
-        }else{
25
+        } else {
26 26
             return $row->{$column->getField()};
27 27
         }
28 28
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $start = sanitizeXSS($value['start']);
38 38
         $end = sanitizeXSS($value['end']);
39
-        if($start && $end) {
39
+        if ($start && $end) {
40 40
             $start = date("Y-m-d H:i:s", strtotime($start));
41 41
             $end = date("Y-m-d H:i:s", strtotime($end));
42 42
             $query->whereBetween($column->getFilterColumn(), [$start, $end]);
Please login to merge, or discard this patch.
src/types/date/Hook.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function indexRender($row, $column)
21 21
     {
22
-        if($column->getFormat()) {
22
+        if ($column->getFormat()) {
23 23
             return date($column->getFormat(), strtotime($row->{$column->getField()}));
24
-        }else{
24
+        } else {
25 25
             return $row->{$column->getField()};
26 26
         }
27 27
     }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $start = sanitizeXSS($value['start']);
37 37
         $end = sanitizeXSS($value['end']);
38
-        if($start && $end) {
38
+        if ($start && $end) {
39 39
             $start = date("Y-m-d", strtotime($start));
40 40
             $end = date("Y-m-d", strtotime($end));
41 41
             $query->whereBetween($column->getFilterColumn(), [$start, $end]);
Please login to merge, or discard this patch.
src/types/money/Hook.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,23 +21,23 @@
 block discarded – undo
21 21
      */
22 22
     public function assignment($value, $column)
23 23
     {
24
-        $value = str_replace($column->getThousands()?:",","", $value);
25
-        $value = str_replace($column->getDecimal()?:".",".",$value);
24
+        $value = str_replace($column->getThousands() ?: ",", "", $value);
25
+        $value = str_replace($column->getDecimal() ?: ".", ".", $value);
26 26
         return $value;
27 27
     }
28 28
 
29 29
     public function indexRender($row, $column)
30 30
     {
31 31
         $value = $row->{$column->getField()};
32
-        $prefix = ($column->getPrefix())?:"";
33
-        return $prefix.number_format($value, $column->getPrecision()?:0, $column->getDecimal()?:".", $column->getThousands()?:",");
32
+        $prefix = ($column->getPrefix()) ?: "";
33
+        return $prefix.number_format($value, $column->getPrecision() ?: 0, $column->getDecimal() ?: ".", $column->getThousands() ?: ",");
34 34
     }
35 35
 
36 36
     public function filterQuery($query, $column, $value)
37 37
     {
38 38
         $start = sanitizeXSS($value['start']);
39 39
         $end = sanitizeXSS($value['end']);
40
-        if($start && $end) {
40
+        if ($start && $end) {
41 41
             $query->whereBetween($column->getFilterColumn(), [$start, $end]);
42 42
         }
43 43
         return $query;
Please login to merge, or discard this patch.
src/types/select_table/SelectTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function optionsFromTable($table, $value_option, $display_option, $sql_condition = null) {
44 44
 
45
-        if(strpos($table,"App\Models")!==false) {
45
+        if (strpos($table, "App\Models") !== false) {
46 46
             $table = new $table();
47 47
             $table = $table::$tableName;
48 48
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         $options = [];
55 55
         foreach ($data as $d) {
56
-            $options[ $d->$value_option ] = $d->$display_option;
56
+            $options[$d->$value_option] = $d->$display_option;
57 57
         }
58 58
         $data = columnSingleton()->getColumn($this->index);
59 59
         /** @var $data SelectTableModel */
Please login to merge, or discard this patch.
src/types/select_table/Hook.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function query($query, $column)
21 21
     {
22
-        if($option = $column->getOptionsFromTable()) {
23
-            $query->leftjoin($option["table"],$option["table"].'.'.$option["primary_key"],"=", $column->getField());
22
+        if ($option = $column->getOptionsFromTable()) {
23
+            $query->leftjoin($option["table"], $option["table"].'.'.$option["primary_key"], "=", $column->getField());
24 24
             $query->addSelect($option['table'].'.'.$option['display_field'].' as '.$option['table'].'_'.$option['display_field']);
25 25
         }
26 26
         return $query;
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function indexRender($row, $column)
34 34
     {
35
-        if($column->getOptionsFromTable()) {
35
+        if ($column->getOptionsFromTable()) {
36 36
             $option = $column->getOptionsFromTable();
37 37
             return $row->{ $option['table'].'_'.$option['display_field'] };
38
-        }else{
38
+        } else {
39 39
             $option = $column->getOptions();
40 40
             $key = $row->{ $column->getField() };
41
-            return @$option[ $key ];
41
+            return @$option[$key];
42 42
         }
43 43
     }
44 44
 
Please login to merge, or discard this patch.
src/types/text_area/Hook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function indexRender($row, $column)
23 23
     {
24 24
         $value = trim(strip_tags($row->{ $column->getField() }));
25
-        if($column->getLimit()) {
25
+        if ($column->getLimit()) {
26 26
             $value = Str::limit($value, $column->getLimit());
27 27
         }
28 28
         return $value;
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function filterQuery($query, $column, $value)
32 32
     {
33
-        $query->where($column->getFilterColumn(),"like","%".$value."%");
33
+        $query->where($column->getFilterColumn(), "like", "%".$value."%");
34 34
         return $query;
35 35
     }
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
src/controllers/scaffolding/traits/DefaultOption.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $data = ColumnSingleton()->getColumn($this->index);
25 25
         $data->setFilterable($boolean);
26 26
         $data->setFilterHelp($help_info);
27
-        $data->setFilterPlaceholder($placeholder?:"Filter by ".$data->getLabel());
27
+        $data->setFilterPlaceholder($placeholder ?: "Filter by ".$data->getLabel());
28 28
         // Save back
29 29
         columnSingleton()->setColumn($this->index, $data);
30 30
 
Please login to merge, or discard this patch.