@@ -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)); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | if (isset($image_size_details['crop']) && $image_size_details['crop']) { |
| 201 | 201 | $resizedImage = $resizedImage->fit($w, $h); |
| 202 | 202 | } else { |
| 203 | - $resizedImage = $resizedImage->resize($w, $h, function ($constraint) { |
|
| 203 | + $resizedImage = $resizedImage->resize($w, $h, function($constraint) { |
|
| 204 | 204 | $constraint->aspectRatio(); |
| 205 | 205 | }); |
| 206 | 206 | } |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | if (isset($imageSizeDetails['crop']) && $imageSizeDetails['crop']) { |
| 411 | 411 | $resizedImage = $resizedImage->fit($w, $h); |
| 412 | 412 | } else { |
| 413 | - $resizedImage = $resizedImage->resize($w, $h, static function (Constraint $constraint) { |
|
| 413 | + $resizedImage = $resizedImage->resize($w, $h, static function(Constraint $constraint) { |
|
| 414 | 414 | $constraint->aspectRatio(); |
| 415 | 415 | }); |
| 416 | 416 | } |
@@ -24,14 +24,14 @@ |
||
| 24 | 24 | // } |
| 25 | 25 | // }; |
| 26 | 26 | |
| 27 | - $show_error_if_has_value = function ($attribute, $value, $fail) { |
|
| 27 | + $show_error_if_has_value = function($attribute, $value, $fail) { |
|
| 28 | 28 | if ($value) { |
| 29 | 29 | // return $fail if this had a value... |
| 30 | 30 | return $fail($attribute.' must be empty'); |
| 31 | 31 | } |
| 32 | 32 | }; |
| 33 | 33 | |
| 34 | - $disabled_use_view_file = function ($attribute, $value, $fail) { |
|
| 34 | + $disabled_use_view_file = function($attribute, $value, $fail) { |
|
| 35 | 35 | if ($value) { |
| 36 | 36 | // return $fail if this had a value |
| 37 | 37 | return $fail('The use of custom view files is not enabled for this site, so you cannot submit a value for it'); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | |
| 53 | 53 | <?php |
| 54 | 54 | |
| 55 | - $viewfile = resource_path('views/custom_blog_posts/' . $post->use_view_file . '.blade.php'); |
|
| 55 | + $viewfile = resource_path('views/custom_blog_posts/'.$post->use_view_file.'.blade.php'); |
|
| 56 | 56 | |
| 57 | 57 | ?> |
| 58 | 58 | <br> |
@@ -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 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $smallest = null; |
| 37 | 37 | $smallest_size = -1; |
| 38 | 38 | foreach ($uploadedPhoto->uploaded_images as $file_key => $file) { |
| 39 | - $id = 'uploaded_' . ($uploadedPhoto->id) . '_' . $file_key; ?> |
|
| 39 | + $id = 'uploaded_'.($uploadedPhoto->id).'_'.$file_key; ?> |
|
| 40 | 40 | |
| 41 | 41 | |
| 42 | 42 | <div class='col-md-12 '> |
@@ -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 | |