@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | /** |
| 24 | 24 | * @var Collection | array |
| 25 | 25 | */ |
| 26 | - public $posts = []; |
|
| 26 | + public $posts = [ ]; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * @var integer The current page |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | { |
| 276 | 276 | $this->currentPage = (int)$this->property('page', 1) ?: (int)post('page'); |
| 277 | 277 | $this->resultsPerPage = (int)$this->property('resultsPerPage') |
| 278 | - ?: $this->defineProperties()['resultsPerPage']['default']; |
|
| 278 | + ?: $this->defineProperties()[ 'resultsPerPage' ][ 'default' ]; |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | /** |
@@ -341,16 +341,16 @@ discard block |
||
| 341 | 341 | private function separateParameters(array $parameters): array |
| 342 | 342 | { |
| 343 | 343 | $slugs = $parameters; |
| 344 | - $ids = []; |
|
| 344 | + $ids = [ ]; |
|
| 345 | 345 | |
| 346 | 346 | foreach ($slugs as $index => $potentialId) { |
| 347 | 347 | if (is_numeric($potentialId)) { |
| 348 | - $ids[] = $potentialId; |
|
| 349 | - unset($slugs[$index]); |
|
| 348 | + $ids[ ] = $potentialId; |
|
| 349 | + unset($slugs[ $index ]); |
|
| 350 | 350 | } |
| 351 | 351 | } |
| 352 | 352 | |
| 353 | - return [$ids, $slugs]; |
|
| 353 | + return [ $ids, $slugs ]; |
|
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | /** |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | if (!empty($this->exceptCategories)) { |
| 363 | 363 | list($ids, $slugs) = $this->separateParameters($this->exceptCategories); |
| 364 | 364 | |
| 365 | - $query->whereDoesntHave('categories', static function ($innerQuery) use ($ids, $slugs) { |
|
| 365 | + $query->whereDoesntHave('categories', static function($innerQuery) use ($ids, $slugs) { |
|
| 366 | 366 | if (!empty($ids)) { |
| 367 | 367 | $innerQuery->whereIn('id', $ids); |
| 368 | 368 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | * @var array |
| 42 | 42 | */ |
| 43 | - public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel']; |
|
| 43 | + public $implement = [ '@RainLab.Translate.Behaviors.TranslatableModel' ]; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Translatable properties, indexed property will be available in queries |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | /** |
| 142 | 142 | * @var array |
| 143 | 143 | */ |
| 144 | - protected $slugs = ['slug' => 'title']; |
|
| 144 | + protected $slugs = [ 'slug' => 'title' ]; |
|
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | 147 | * @param Builder $query |
@@ -49,12 +49,12 @@ |
||
| 49 | 49 | { |
| 50 | 50 | Schema::create( |
| 51 | 51 | Series::RELATED_SERIES_TABLE_NAME, |
| 52 | - function ($table) { |
|
| 52 | + function($table) { |
|
| 53 | 53 | $table->engine = 'InnoDB'; |
| 54 | 54 | |
| 55 | 55 | $table->integer('series_id')->unsigned(); |
| 56 | 56 | $table->integer('related_series_id')->unsigned(); |
| 57 | - $table->index(['series_id', 'related_series_id']); |
|
| 57 | + $table->index([ 'series_id', 'related_series_id' ]); |
|
| 58 | 58 | $table->foreign('series_id', 'Series reference')->references('id')->on(Series::TABLE_NAME)->onDelete('cascade'); |
| 59 | 59 | $table->foreign('related_series_id', 'Related series reference')->references('id')->on(Series::TABLE_NAME)->onDelete('cascade'); |
| 60 | 60 | } |