@@ -14,7 +14,7 @@ |
||
14 | 14 | ->where('slug', $slug) |
15 | 15 | ->first(); |
16 | 16 | |
17 | - if (! $page) { |
|
17 | + if (!$page) { |
|
18 | 18 | return abort(404); |
19 | 19 | } |
20 | 20 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | 'deleted_at', |
39 | 39 | ]; |
40 | 40 | |
41 | - public function __construct(array $attributes = []) |
|
41 | + public function __construct(array $attributes = [ ]) |
|
42 | 42 | { |
43 | 43 | parent::__construct($attributes); |
44 | 44 | |
@@ -78,13 +78,13 @@ discard block |
||
78 | 78 | public function scopePublished($query): Builder |
79 | 79 | { |
80 | 80 | return $query->where('public', true) |
81 | - ->where(function ($query) { |
|
81 | + ->where(function($query) { |
|
82 | 82 | $today = (new Carbon)->toDateString(); |
83 | 83 | |
84 | - $query->where(function ($query) use ($today) { |
|
84 | + $query->where(function($query) use ($today) { |
|
85 | 85 | $query->whereDate('public_from', '<=', $today)->orWhereNull('public_from'); |
86 | 86 | }) |
87 | - ->where(function ($query) use ($today) { |
|
87 | + ->where(function($query) use ($today) { |
|
88 | 88 | $query->whereDate('public_until', '>=', $today)->orWhereNull('public_until'); |
89 | 89 | }); |
90 | 90 | }); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | 'deleted_at', |
36 | 36 | ]; |
37 | 37 | |
38 | - public function __construct(array $attributes = []) |
|
38 | + public function __construct(array $attributes = [ ]) |
|
39 | 39 | { |
40 | 40 | parent::__construct($attributes); |
41 | 41 | |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | public function scopePublished($query): Builder |
70 | 70 | { |
71 | 71 | return $query->where('public', true) |
72 | - ->where(function ($query) { |
|
72 | + ->where(function($query) { |
|
73 | 73 | $today = (new Carbon)->toDateString(); |
74 | 74 | |
75 | - $query->where(function ($query) use ($today) { |
|
75 | + $query->where(function($query) use ($today) { |
|
76 | 76 | $query->whereDate('public_from', '<=', $today)->orWhereNull('public_from'); |
77 | 77 | }) |
78 | - ->where(function ($query) use ($today) { |
|
78 | + ->where(function($query) use ($today) { |
|
79 | 79 | $query->whereDate('public_until', '>=', $today)->orWhereNull('public_until'); |
80 | 80 | }); |
81 | 81 | }); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | __DIR__.'/../config/simple-pages.php' => base_path('config/simple-pages.php'), |
24 | 24 | ], 'config'); |
25 | 25 | |
26 | - if (! class_exists('CreateSimplePagesTable')) { |
|
26 | + if (!class_exists('CreateSimplePagesTable')) { |
|
27 | 27 | $this->publishes([ |
28 | 28 | __DIR__.'/../database/migrations/create_simple_pages_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_simple_pages_table.php'), |
29 | 29 | ], 'migrations'); |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | { |
44 | 44 | $simplePageModel = config('simpel-pages.model') ?? SimplePageModel::class; |
45 | 45 | |
46 | - if (! is_a($simplePageModel, SimplePage::class, true) |
|
47 | - || ! is_a($simplePageModel, Model::class, true) |
|
46 | + if (!is_a($simplePageModel, SimplePage::class, true) |
|
47 | + || !is_a($simplePageModel, Model::class, true) |
|
48 | 48 | ) { |
49 | 49 | throw InvalidConfiguration::modelIsNotValid($simplePageModel); |
50 | 50 | } |