@@ -54,7 +54,7 @@ |
||
| 54 | 54 | /** |
| 55 | 55 | * Returns filters value. |
| 56 | 56 | * |
| 57 | - * @return mixed |
|
| 57 | + * @return string |
|
| 58 | 58 | */ |
| 59 | 59 | public function getValue() |
| 60 | 60 | { |
@@ -1,7 +1,9 @@ |
||
| 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"> |
@@ -83,7 +83,9 @@ |
||
| 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 | } |
@@ -21,7 +21,9 @@ |
||
| 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 | /** |
@@ -77,7 +77,9 @@ |
||
| 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(); |