Completed
Push — master ( f2a787...96d856 )
by Vitaliy
03:16
created
src/Components/TableCell.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      */
48 48
     public function getName()
49 49
     {
50
-        return $this->name ? : 'column_' . $this->column->getName();
50
+        return $this->name ?: 'column_' . $this->column->getName();
51 51
     }
52 52
 
53 53
     /**
Please login to merge, or discard this patch.
src/Components/TotalsRow.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $field_names = $this->field_names;
61 61
         $this->fields = $this->grid->getConfig()->getColumns()->filter(
62
-            function (FieldConfig $field) use ($field_names) {
62
+            function(FieldConfig $field) use ($field_names) {
63 63
                 return in_array($field->getName(), $field_names);
64 64
             }
65 65
         );
@@ -76,13 +76,13 @@  discard block
 block discarded – undo
76 76
     {
77 77
         Event::listen(
78 78
             DataProvider::EVENT_FETCH_ROW,
79
-            function (DataRow $row, DataProvider $currentProvider) use ($provider) {
79
+            function(DataRow $row, DataProvider $currentProvider) use ($provider) {
80 80
                 if ($currentProvider !== $provider) return;
81 81
                 $this->rows_processed++;
82 82
                 foreach ($this->fields as $field) {
83 83
                     $name = $field->getName();
84 84
                     $operation = $this->getFieldOperation($name);
85
-                    switch($operation) {
85
+                    switch ($operation) {
86 86
 
87 87
                         case self::OPERATION_SUM:
88 88
                             $this->src[$name] += $row->getCellValue($field);
@@ -217,6 +217,6 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public function getFieldOperation($fieldName)
219 219
     {
220
-        return isset($this->field_operations[$fieldName])?$this->field_operations[$fieldName]:self::OPERATION_SUM;
220
+        return isset($this->field_operations[$fieldName]) ? $this->field_operations[$fieldName] : self::OPERATION_SUM;
221 221
     }
222 222
 }
Please login to merge, or discard this 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/Components/Tr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     {
47 47
         $row = $this->getDataRow();
48 48
         $out = '';
49
-        foreach($this->grid->getConfig()->getColumns() as $column) {
49
+        foreach ($this->grid->getConfig()->getColumns() as $column) {
50 50
             $component = new TableCell($column);
51 51
             $component->initialize($this->grid);
52 52
             $component->setContent($column->getValue($row));
Please login to merge, or discard this patch.
src/DbalDataProvider.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
     public function filter($fieldName, $operator, $value)
160 160
     {
161
-         switch ($operator) {
161
+            switch ($operator) {
162 162
             case "eq":
163 163
                 $operator = '=';
164 164
                 break;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 break;
168 168
             case "gt":
169 169
                 $operator = '>';    
170
-                 break;
170
+                    break;
171 171
             case "lt":
172 172
                 $operator = '<';    
173 173
                 break;
Please login to merge, or discard this patch.
src/EloquentDataProvider.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
                 break;
130 130
             case "gt":
131 131
                 $operator = '>';    
132
-                 break;
132
+                    break;
133 133
             case "lt":
134 134
                 $operator = '<';    
135 135
                 break;
Please login to merge, or discard this patch.
src/FieldConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
      */
150 150
     public function getLabel()
151 151
     {
152
-        return $this->label ? : ucwords(str_replace(array('-', '_', '.'), ' ', $this->name));
152
+        return $this->label ?: ucwords(str_replace(array('-', '_', '.'), ' ', $this->name));
153 153
     }
154 154
 
155 155
     /**
Please login to merge, or discard this patch.
src/Grid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
      */
126 126
     protected function sortColumns()
127 127
     {
128
-        $this->config->getColumns()->sort(function (FieldConfig $a, FieldConfig $b) {
128
+        $this->config->getColumns()->sort(function(FieldConfig $a, FieldConfig $b) {
129 129
             return $a->getOrder() > $b->getOrder();
130 130
         });
131 131
     }
Please login to merge, or discard this patch.
src/GridInputProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      */
68 68
     public function getSorting()
69 69
     {
70
-        return $_ =& $this->input['sort'];
70
+        return $_ = & $this->input['sort'];
71 71
     }
72 72
 
73 73
     public function getSortingHiddenInputsHtml()
Please login to merge, or discard this patch.
src/ObjectDataRow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         } else {
28 28
             try {
29 29
                 return $this->src->{$fieldName};
30
-            } catch(Exception $e) {
30
+            } catch (Exception $e) {
31 31
                 throw new RuntimeException(
32 32
                     "Can't read '$fieldName' property from DataRow"
33 33
                 );
Please login to merge, or discard this patch.