Completed
Pull Request — master (#118)
by
unknown
02:27
created
resources/views/default/components/filters/checkboxes.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 /** @var Nayjest\Grids\Components\SelectFilter $component */
3 3
 $value = $component->getValue();
4
-if (!is_array($value)) $value = [];
4
+if (!is_array($value)) {
5
+    $value = [];
6
+}
5 7
 $id = uniqid();
6 8
 ?>
7 9
 <div class="btn-group">
Please login to merge, or discard this patch.
src/Components/RecordsPerPage.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,9 @@
 block discarded – undo
83 83
     public function prepare()
84 84
     {
85 85
         $value = $this->getValue();
86
-        if (!$value || !is_numeric($value)) return;
86
+        if (!$value || !is_numeric($value)) {
87
+            return;
88
+        }
87 89
         $this->grid->getConfig()->getDataProvider()->setPageSize($value);
88 90
     }
89 91
 }
Please login to merge, or discard this patch.
src/Components/RenderFunc.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
      */
22 22
     public function __construct($func = null)
23 23
     {
24
-        if ($func) $this->setFunc($func);
24
+        if ($func) {
25
+            $this->setFunc($func);
26
+        }
25 27
     }
26 28
 
27 29
     /**
Please login to merge, or discard this patch.
src/Components/TotalsRow.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,9 @@
 block discarded – undo
77 77
         Event::listen(
78 78
             DataProvider::EVENT_FETCH_ROW,
79 79
             function (DataRow $row, DataProvider $currentProvider) use ($provider) {
80
-                if ($currentProvider !== $provider) return;
80
+                if ($currentProvider !== $provider) {
81
+                    return;
82
+                }
81 83
                 $this->rows_processed++;
82 84
                 foreach ($this->fields as $field) {
83 85
                     $name = $field->getName();
Please login to merge, or discard this patch.
src/CollectionDataProvider.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,8 +108,7 @@
 block discarded – undo
108 108
     {
109 109
         if($direction === Grid::SORT_ASC){
110 110
           $this->src->sortBy($fieldName);
111
-        }
112
-        else{
111
+        } else{
113 112
           $this->src->sortByDesc($fieldName);
114 113
         }
115 114
         
Please login to merge, or discard this patch.