| @@ -22,7 +22,7 @@ | ||
| 22 | 22 | <b>Show/Hide all</b> | 
| 23 | 23 | </label> | 
| 24 | 24 | </li> | 
| 25 | - <?php foreach($columns as $column): | |
| 25 | + <?php foreach ($columns as $column): | |
| 26 | 26 | /** @var Nayjest\Grids\FieldConfig $column */ | 
| 27 | 27 | ?> | 
| 28 | 28 | <li> | 
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | /** @var Nayjest\Grids\Components\Filter $component */ | 
| 3 | 3 | $id = uniqid(); | 
| 4 | 4 | ?> | 
| 5 | -<?php if($component->getLabel()): ?> | |
| 5 | +<?php if ($component->getLabel()): ?> | |
| 6 | 6 | <span><?= $component->getLabel() ?></span> | 
| 7 | 7 | <?php endif ?> | 
| 8 | 8 | <input | 
| @@ -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 | 
| @@ -1,7 +1,7 @@ discard block | ||
| 1 | 1 | <small style="white-space: nowrap"> | 
| 2 | 2 | <a | 
| 3 | 3 | title="Sort ascending" | 
| 4 | - <?php if($column->isSortedAsc()): ?> | |
| 4 | + <?php if ($column->isSortedAsc()): ?> | |
| 5 | 5 | |
| 6 | 6 | class="text-success" | 
| 7 | 7 | <?php else: ?> | 
| @@ -12,7 +12,7 @@ discard block | ||
| 12 | 12 | </a> | 
| 13 | 13 | <a | 
| 14 | 14 | title="Sort descending" | 
| 15 | - <?php if($column->isSortedDesc()): ?> | |
| 15 | + <?php if ($column->isSortedDesc()): ?> | |
| 16 | 16 | class="text-success" | 
| 17 | 17 | <?php else: ?> | 
| 18 | 18 | href="<?= $grid->getSorter()->link($column, 'DESC') ?>" | 
| @@ -3,15 +3,15 @@ | ||
| 3 | 3 | /** @var TotalsRow $component */ | 
| 4 | 4 | ?> | 
| 5 | 5 | <tr> | 
| 6 | - <?php foreach($columns as $column): ?> | |
| 6 | + <?php foreach ($columns as $column): ?> | |
| 7 | 7 | <td | 
| 8 | 8 | class="column-<?= $column->getName() ?>" | 
| 9 | - <?= $column->isHidden()?'style="display:none"':'' ?> | |
| 9 | + <?= $column->isHidden() ? 'style="display:none"' : '' ?> | |
| 10 | 10 | > | 
| 11 | 11 | <?php | 
| 12 | 12 | if ($component->uses($column)): | 
| 13 | 13 | $label = ''; | 
| 14 | -                switch($component->getFieldOperation($column->getName())) { | |
| 14 | +                switch ($component->getFieldOperation($column->getName())) { | |
| 15 | 15 | case \Nayjest\Grids\Components\TotalsRow::OPERATION_SUM: | 
| 16 | 16 | $label = '∑'; | 
| 17 | 17 | break; | 
| @@ -7,6 +7,6 @@ | ||
| 7 | 7 | name="<?= $filter->getInputName() ?>" | 
| 8 | 8 | value="<?= $filter->getValue() ?>" | 
| 9 | 9 | /> | 
| 10 | -<?php if($label): ?> | |
| 10 | +<?php if ($label): ?> | |
| 11 | 11 | <span><?= $label ?></span> | 
| 12 | 12 | <?php endif ?> | 
| @@ -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 | } | 
| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | public function getTemplate() | 
| 30 | 30 |      { | 
| 31 | 31 | $grid_tpl = $this->grid->getConfig()->getTemplate(); | 
| 32 | -        return str_replace('*.',"$grid_tpl.", $this->template); | |
| 32 | +        return str_replace('*.', "$grid_tpl.", $this->template); | |
| 33 | 33 | } | 
| 34 | 34 | |
| 35 | 35 | /** |