@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Folk\Entities; |
4 | 4 | |
5 | 5 | use Folk\SearchQuery; |
6 | -use SimpleCrud\Row; |
|
7 | 6 | use FilesystemIterator; |
8 | 7 | use RecursiveDirectoryIterator; |
9 | 8 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | $sort = $search->getSort(); |
53 | 53 | |
54 | 54 | if ($sort) { |
55 | - uasort($result, function ($a, $b) use ($sort) { |
|
55 | + uasort($result, function($a, $b) use ($sort) { |
|
56 | 56 | if ($a[$sort] === $b[$sort]) { |
57 | 57 | return 0; |
58 | 58 | } |
@@ -29,6 +29,6 @@ |
||
29 | 29 | */ |
30 | 30 | protected function parse($source) |
31 | 31 | { |
32 | - return (array) SymfonyYaml::parse($source); |
|
32 | + return (array)SymfonyYaml::parse($source); |
|
33 | 33 | } |
34 | 34 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | if (!empty($query['page'])) { |
27 | - $this->page = (int) $query['page']; |
|
27 | + $this->page = (int)$query['page']; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | if (!empty($query['sort'])) { |
@@ -12,10 +12,10 @@ |
||
12 | 12 | <?php foreach (reset($rows) as $name => $column): ?> |
13 | 13 | <th class="format <?= $column->get('class').($search->getSort() === $name ? ' is-sorted' : '') ?>"> |
14 | 14 | <a href="<?= $app->getRouteUrl('list', ['entity' => $entity->getName()], [ |
15 | - 'query' => isset($search) ? $search->getQuery() : null, |
|
16 | - 'sort' => $name, |
|
17 | - 'direction' => ($search->getSort() === $name) ? ($search->getDirection() === 'ASC' ? 'DESC' : 'ASC') : 'ASC' |
|
18 | - ]) ?>"> |
|
15 | + 'query' => isset($search) ? $search->getQuery() : null, |
|
16 | + 'sort' => $name, |
|
17 | + 'direction' => ($search->getSort() === $name) ? ($search->getDirection() === 'ASC' ? 'DESC' : 'ASC') : 'ASC' |
|
18 | + ]) ?>"> |
|
19 | 19 | <?= $column->label(); ?> |
20 | 20 | </a> |
21 | 21 | </th> |