@@ -10,7 +10,7 @@ |
||
| 10 | 10 | * @param $query |
| 11 | 11 | * @param array $options Available options are "sort", "displayEmpty", "limit" |
| 12 | 12 | */ |
| 13 | - public function scopeListFrontend($query, array $options = []) |
|
| 13 | + public function scopeListFrontend($query, array $options = [ ]) |
|
| 14 | 14 | { |
| 15 | 15 | |
| 16 | 16 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * @var Collection | array |
| 22 | 22 | */ |
| 23 | - public $posts = []; |
|
| 23 | + public $posts = [ ]; |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * @var integer The current page |
@@ -154,14 +154,14 @@ discard block |
||
| 154 | 154 | { |
| 155 | 155 | $this->currentPage = intval($this->property('page', 1)) ?: intval(post('page')); |
| 156 | 156 | $this->resultsPerPage = intval($this->property('resultsPerPage')) |
| 157 | - ?: $this->defineProperties()['resultsPerPage']['default']; |
|
| 157 | + ?: $this->defineProperties()[ 'resultsPerPage' ][ 'default' ]; |
|
| 158 | 158 | |
| 159 | - $this->noPostsMessage = $this->page['noPostsMessage'] = $this->property('noPostsMessage'); |
|
| 160 | - $this->orderBy = $this->page['orderBy'] = $this->property('orderBy'); |
|
| 159 | + $this->noPostsMessage = $this->page[ 'noPostsMessage' ] = $this->property('noPostsMessage'); |
|
| 160 | + $this->orderBy = $this->page[ 'orderBy' ] = $this->property('orderBy'); |
|
| 161 | 161 | |
| 162 | 162 | // Page links |
| 163 | - $this->postPage = $this->page['postPage' ] = $this->property('postPage'); |
|
| 164 | - $this->categoryPage = $this->page['categoryPage'] = $this->property('categoryPage'); |
|
| 163 | + $this->postPage = $this->page[ 'postPage' ] = $this->property('postPage'); |
|
| 164 | + $this->categoryPage = $this->page[ 'categoryPage' ] = $this->property('categoryPage'); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | |
| 186 | 186 | // Add a "url" helper attribute for linking to each post and category |
| 187 | 187 | if ($posts && $posts->count()) { |
| 188 | - $posts->each([$this, 'setPostUrls']); |
|
| 188 | + $posts->each([ $this, 'setPostUrls' ]); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | $this->posts = $posts; |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | */ |
| 65 | 65 | protected function getPostsQuery() |
| 66 | 66 | { |
| 67 | - $query = Post::whereHas('tags', function ($query) { |
|
| 67 | + $query = Post::whereHas('tags', function($query) { |
|
| 68 | 68 | $query->where('slug', $this->tag->slug); |
| 69 | 69 | })->isPublished(); |
| 70 | 70 | |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | */ |
| 63 | 63 | protected function getPostsQuery() |
| 64 | 64 | { |
| 65 | - $query = Post::whereHas('series', function ($query) { |
|
| 65 | + $query = Post::whereHas('series', function($query) { |
|
| 66 | 66 | $query->where('slug', $this->series->slug); |
| 67 | 67 | })->isPublished(); |
| 68 | 68 | |