@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | use WebDevEtc\BlogEtc\Models\Post; |
10 | 10 | |
11 | 11 | // Basic post factory, following happy path where everything is set up so posts can be seen. |
12 | -$factory->define(Post::class, static function (Faker $faker) { |
|
12 | +$factory->define(Post::class, static function(Faker $faker) { |
|
13 | 13 | return [ |
14 | 14 | 'title' => $faker->sentence, |
15 | 15 | 'slug' => $faker->uuid, |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | ]); |
31 | 31 | |
32 | 32 | // Post in future. |
33 | -$factory->state(Post::class, 'in_future', static function (Faker $faker) { |
|
33 | +$factory->state(Post::class, 'in_future', static function(Faker $faker) { |
|
34 | 34 | return [ |
35 | 35 | 'posted_at' => $faker->dateTimeBetween('now', '+2 years'), |
36 | 36 | ]; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | use Illuminate\Support\Str; |
9 | 9 | use WebDevEtc\BlogEtc\Models\Category; |
10 | 10 | |
11 | -$factory->define(Category::class, static function (Faker $faker) { |
|
11 | +$factory->define(Category::class, static function(Faker $faker) { |
|
12 | 12 | return [ |
13 | 13 | 'category_name' => $faker->sentence, |
14 | 14 | 'slug' => Str::slug($faker->sentence), |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function rules(): array |
37 | 37 | { |
38 | - $checkAnswer = static function ($attribute, $value, $fail) { |
|
38 | + $checkAnswer = static function($attribute, $value, $fail) { |
|
39 | 39 | $answers = config('blogetc.captcha.basic_answers'); |
40 | 40 | |
41 | 41 | $value = strtolower(trim($value)); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | <?php |
7 | 7 | $images_to_delete = []; |
8 | - foreach ((array)config('blogetc.image_sizes') as $image_size => $image_size_info) { |
|
8 | + foreach ((array) config('blogetc.image_sizes') as $image_size => $image_size_info) { |
|
9 | 9 | if (!$deletedPost->$image_size) { |
10 | 10 | continue; |
11 | 11 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | @case("disabled") |
18 | 18 | <?php |
19 | - return; // not required, as we already filter for this |
|
19 | + return; // not required, as we already filter for this |
|
20 | 20 | ?> |
21 | 21 | @break |
22 | 22 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | ->orderBy('posted_at', 'desc'); |
40 | 40 | |
41 | 41 | if ($categoryID > 0) { |
42 | - $query->whereHas('categories', static function (Builder $query) use ($categoryID) { |
|
42 | + $query->whereHas('categories', static function(Builder $query) use ($categoryID) { |
|
43 | 43 | $query->where('blog_etc_post_categories.blog_etc_category_id', $categoryID); |
44 | 44 | })->get(); |
45 | 45 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function up(): void |
16 | 16 | { |
17 | - Schema::table('blog_etc_comments', static function (Blueprint $table) { |
|
17 | + Schema::table('blog_etc_comments', static function(Blueprint $table) { |
|
18 | 18 | $table->string('author_email')->nullable(); |
19 | 19 | $table->string('author_website')->nullable(); |
20 | 20 | }); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down(): void |
27 | 27 | { |
28 | - Schema::table('blog_etc_comments', static function (Blueprint $table) { |
|
28 | + Schema::table('blog_etc_comments', static function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('author_email'); |
30 | 30 | $table->dropColumn('author_website'); |
31 | 31 | }); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function up(): void |
18 | 18 | { |
19 | - Schema::table('blog_etc_posts', static function (Blueprint $table) { |
|
19 | + Schema::table('blog_etc_posts', static function(Blueprint $table) { |
|
20 | 20 | $table->text('short_description')->nullable(); |
21 | 21 | }); |
22 | 22 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function down(): void |
28 | 28 | { |
29 | - Schema::table('blog_etc_posts', static function (Blueprint $table) { |
|
29 | + Schema::table('blog_etc_posts', static function(Blueprint $table) { |
|
30 | 30 | $table->dropColumn('short_description'); |
31 | 31 | }); |
32 | 32 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function up(): void |
16 | 16 | { |
17 | - Schema::create('blog_etc_uploaded_photos', static function (Blueprint $table) { |
|
17 | + Schema::create('blog_etc_uploaded_photos', static function(Blueprint $table) { |
|
18 | 18 | $table->increments('id'); |
19 | 19 | $table->text('uploaded_images')->nullable(); |
20 | 20 | $table->string('image_title')->nullable(); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | $table->timestamps(); |
25 | 25 | }); |
26 | - Schema::table('blog_etc_posts', static function (Blueprint $table) { |
|
26 | + Schema::table('blog_etc_posts', static function(Blueprint $table) { |
|
27 | 27 | $table->string('seo_title')->nullable(); |
28 | 28 | }); |
29 | 29 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | { |
36 | 36 | Schema::dropIfExists('blog_etc_uploaded_photos'); |
37 | 37 | |
38 | - Schema::table('blog_etc_posts', static function (Blueprint $table) { |
|
38 | + Schema::table('blog_etc_posts', static function(Blueprint $table) { |
|
39 | 39 | $table->dropColumn('seo_title'); |
40 | 40 | }); |
41 | 41 | } |