@@ -3,11 +3,8 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Selami\View\Twig; |
| 5 | 5 | |
| 6 | -use Selami\Stdlib\CaseConverter; |
|
| 7 | 6 | use Selami\View\ExtensionsAbstract; |
| 8 | 7 | use Twig\Environment; |
| 9 | -use InvalidArgumentException; |
|
| 10 | -use BadMethodCallException; |
|
| 11 | 8 | use Twig_SimpleFunction; |
| 12 | 9 | |
| 13 | 10 | /** |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Selami\View\Twig\Functions; |
| 5 | 5 | |
@@ -37,11 +37,11 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function run(): string |
| 39 | 39 | { |
| 40 | - $items = ''; |
|
| 40 | + $items = ''; |
|
| 41 | 41 | $renderedEllipses = 0; |
| 42 | 42 | $useEllipses = ($this->total > 10) ? 1 : 0; |
| 43 | 43 | |
| 44 | - for ($itemIndex=1; $itemIndex <= $this->total; $itemIndex++) { |
|
| 44 | + for ($itemIndex = 1; $itemIndex <= $this->total; $itemIndex++) { |
|
| 45 | 45 | $item = $this->getItem($itemIndex, $renderedEllipses, $useEllipses); |
| 46 | 46 | $items .= $item[0]; |
| 47 | 47 | $renderedEllipses = $item[1]; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | private function useEllipses(int $itemIndex, array $values, int $renderedEllipses) |
| 87 | 87 | { |
| 88 | 88 | $pageGroupLimit = self::PAGE_GROUP_LIMIT; |
| 89 | - $item = ''; |
|
| 89 | + $item = ''; |
|
| 90 | 90 | if (($itemIndex <= $pageGroupLimit) |
| 91 | 91 | || ($itemIndex >= ($this->current-1) && $itemIndex <= ($this->current+1)) |
| 92 | 92 | || ($itemIndex >= ($this->total-2)) |