@@ -91,16 +91,16 @@ discard block |
||
91 | 91 | private static function separateParameters(array $parameters): array |
92 | 92 | { |
93 | 93 | $slugs = $parameters; |
94 | - $ids = []; |
|
94 | + $ids = [ ]; |
|
95 | 95 | |
96 | 96 | foreach ($slugs as $index => $potentialId) { |
97 | 97 | if (is_numeric($potentialId)) { |
98 | - $ids[] = $potentialId; |
|
99 | - unset($slugs[$index]); |
|
98 | + $ids[ ] = $potentialId; |
|
99 | + unset($slugs[ $index ]); |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | - return [$ids, $slugs]; |
|
103 | + return [ $ids, $slugs ]; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | if (!empty($exceptCategories)) { |
113 | 113 | list($ids, $slugs) = self::separateParameters($exceptCategories); |
114 | 114 | |
115 | - $query->whereDoesntHave('categories', static function (Builder $innerQuery) use ($ids, $slugs) { |
|
115 | + $query->whereDoesntHave('categories', static function(Builder $innerQuery) use ($ids, $slugs) { |
|
116 | 116 | if (!empty($ids)) { |
117 | 117 | $innerQuery->whereIn('id', $ids); |
118 | 118 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * @var Collection | array |
26 | 26 | */ |
27 | - public $posts = []; |
|
27 | + public $posts = [ ]; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @var integer The current page |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | { |
236 | 236 | $this->currentPage = (int)$this->property('page', 1) ?: (int)post('page'); |
237 | 237 | $this->resultsPerPage = (int)$this->property('resultsPerPage') |
238 | - ?: $this->defineProperties()['resultsPerPage']['default']; |
|
238 | + ?: $this->defineProperties()[ 'resultsPerPage' ][ 'default' ]; |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | /** |
@@ -148,8 +148,8 @@ |
||
148 | 148 | { |
149 | 149 | $this->seriesPage = $this->getProperty('seriesPage'); |
150 | 150 | $this->orderBy = $this->getProperty('orderBy'); |
151 | - $this->displayEmpty = (bool) $this->getProperty('displayEmpty'); |
|
152 | - $this->fetchPosts = (bool) $this->getProperty('fetchPosts'); |
|
151 | + $this->displayEmpty = (bool)$this->getProperty('displayEmpty'); |
|
152 | + $this->fetchPosts = (bool)$this->getProperty('fetchPosts'); |
|
153 | 153 | $this->limit = $this->getProperty('limit'); |
154 | 154 | |
155 | 155 | // Exceptions |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * @var Collection | array |
27 | 27 | */ |
28 | - public $tags = []; |
|
28 | + public $tags = [ ]; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Reference to the page name for linking to tag page |
@@ -270,16 +270,16 @@ discard block |
||
270 | 270 | */ |
271 | 271 | public function onRun() |
272 | 272 | { |
273 | - $this->tagPage = (string) $this->getProperty('tagPage'); |
|
274 | - $this->tagsPage = (string) $this->getProperty('tagsPage'); |
|
273 | + $this->tagPage = (string)$this->getProperty('tagPage'); |
|
274 | + $this->tagsPage = (string)$this->getProperty('tagsPage'); |
|
275 | 275 | |
276 | 276 | $this->orderBy = $this->getProperty('orderBy'); |
277 | 277 | $this->postSlug = $this->getProperty('postSlug'); |
278 | - $this->fetchPosts = (bool) $this->getProperty('fetchPosts'); |
|
279 | - $this->displayEmpty = (bool) $this->getProperty('displayEmpty'); |
|
280 | - $this->limit = (int) $this->getProperty('limit'); |
|
281 | - $this->exposeTotalCount = (bool) $this->getProperty('exposeTotalCount'); |
|
282 | - $this->enableTagFilter = (string) $this->getProperty('enableTagFilter'); |
|
278 | + $this->fetchPosts = (bool)$this->getProperty('fetchPosts'); |
|
279 | + $this->displayEmpty = (bool)$this->getProperty('displayEmpty'); |
|
280 | + $this->limit = (int)$this->getProperty('limit'); |
|
281 | + $this->exposeTotalCount = (bool)$this->getProperty('exposeTotalCount'); |
|
282 | + $this->enableTagFilter = (string)$this->getProperty('enableTagFilter'); |
|
283 | 283 | |
284 | 284 | // Exceptions |
285 | 285 | $this->populateExceptions(); |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | $this->tagsPageUrl = $this->controller->pageUrl($this->tagsPage); |
320 | 320 | |
321 | - $this->setUrls($tags, $this->tagPage, $this->controller, ['tag' => $this->urlProperty($tagComponent, 'tag')]); |
|
321 | + $this->setUrls($tags, $this->tagPage, $this->controller, [ 'tag' => $this->urlProperty($tagComponent, 'tag') ]); |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | /** |