@@ -7,7 +7,7 @@ |
||
| 7 | 7 | <?= $grid->header() ? $grid->header()->render() : '' ?> |
| 8 | 8 | <?php # ========== TABLE BODY ========== ?> |
| 9 | 9 | <tbody> |
| 10 | -<?php while($row = $data->getRow()): ?> |
|
| 10 | +<?php while ($row = $data->getRow()): ?> |
|
| 11 | 11 | <?= $grid->getConfig()->getRowComponent()->setDataRow($row)->render() ?> |
| 12 | 12 | <?php endwhile; ?> |
| 13 | 13 | </tbody> |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function getSectionComponents($sectionName) |
| 51 | 51 | { |
| 52 | 52 | return $this->getComponents()->filter( |
| 53 | - function (ComponentInterface $component) use ($sectionName) { |
|
| 53 | + function(ComponentInterface $component) use ($sectionName) { |
|
| 54 | 54 | return $component instanceof RenderableComponentInterface |
| 55 | 55 | && $component->getRenderSection() === $sectionName; |
| 56 | 56 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | public function getTagged($tagNames) |
| 78 | 78 | { |
| 79 | 79 | return $this->getComponents()->filter( |
| 80 | - function (ComponentInterface $component) use ($tagNames) { |
|
| 80 | + function(ComponentInterface $component) use ($tagNames) { |
|
| 81 | 81 | return is_array($tagNames) ? $component->hasTags($tagNames) : $component->hasTag($tagNames); |
| 82 | 82 | } |
| 83 | 83 | ); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | public function initialize(Grid $grid) |
| 60 | 60 | { |
| 61 | 61 | parent::initialize($grid); |
| 62 | - Event::listen(Grid::EVENT_PREPARE, function (Grid $grid) { |
|
| 62 | + Event::listen(Grid::EVENT_PREPARE, function(Grid $grid) { |
|
| 63 | 63 | if ($this->grid !== $grid) { |
| 64 | 64 | return; |
| 65 | 65 | } |
@@ -184,10 +184,10 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | protected function renderExcel() |
| 186 | 186 | { |
| 187 | - $onSheetCreate = function (LaravelExcelWorksheet $sheet) { |
|
| 187 | + $onSheetCreate = function(LaravelExcelWorksheet $sheet) { |
|
| 188 | 188 | $sheet->fromArray($this->getData(), null, 'A1', false, false); |
| 189 | 189 | }; |
| 190 | - $onFileCreate = function (LaravelExcelWriter $excel) use ($onSheetCreate) { |
|
| 190 | + $onFileCreate = function(LaravelExcelWriter $excel) use ($onSheetCreate) { |
|
| 191 | 191 | $excel->sheet($this->getSheetName(), $onSheetCreate); |
| 192 | 192 | }; |
| 193 | 193 | |
@@ -47,7 +47,7 @@ |
||
| 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 | /** |
@@ -149,7 +149,7 @@ |
||
| 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 | /** |
@@ -125,7 +125,7 @@ |
||
| 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 | } |
@@ -67,7 +67,7 @@ |
||
| 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() |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** @var Nayjest\Grids\Components\Filter $component */ |
| 3 | 3 | ?> |
| 4 | -<?php if($component->getLabel()): ?> |
|
| 4 | +<?php if ($component->getLabel()): ?> |
|
| 5 | 5 | <span><?= $component->getLabel() ?></span> |
| 6 | 6 | <?php endif ?> |
| 7 | 7 | <input |