@@ -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)); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | // However it will NOT delete the .jpg file on your file server. |
67 | 67 | // I recommend that you only change the enabled field before any images have been uploaded! |
68 | 68 | |
69 | - 'image_large' => [ // this key must start with 'image_'. This is what the DB column must be named |
|
69 | + 'image_large' => [// this key must start with 'image_'. This is what the DB column must be named |
|
70 | 70 | // width in pixels |
71 | 71 | 'w' => 1000, |
72 | 72 | //height |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | // if true then we will crop and resize to exactly w/h. If false then it will maintain proportions, with a max width of 'w' and max height of 'h' |
81 | 81 | 'crop' => true, |
82 | 82 | ], |
83 | - 'image_medium' => [ // this key must start with 'image_'. This is what the DB column must be named |
|
83 | + 'image_medium' => [// this key must start with 'image_'. This is what the DB column must be named |
|
84 | 84 | // width in pixels |
85 | 85 | 'w' => 600, |
86 | 86 | //height |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | // if true then we will crop and resize to exactly w/h. If false then it will maintain proportions, with a max width of 'w' and max height of 'h'. If you use these images as part of your website template then you should probably have this to true. |
95 | 95 | 'crop' => true, |
96 | 96 | ], |
97 | - 'image_thumbnail' => [ // this key must start with 'image_'. This is what the DB column must be named |
|
97 | + 'image_thumbnail' => [// this key must start with 'image_'. This is what the DB column must be named |
|
98 | 98 | 'w' => 150, // width in pixels |
99 | 99 | 'h' => 150, //height |
100 | 100 | 'basic_key' => 'thumbnail', // same as the main key, but WITHOUT 'image_'. |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | 'rssfeed' => [ |
143 | 143 | 'should_shorten_text' => true, // boolean. Default: true. Should we shorten the text in rss feed? |
144 | 144 | 'text_limit' => 100, // max length of description text in the rss feed |
145 | - 'posts_to_show_in_rss_feed' => 10, // how many posts should we show in the rss feed |
|
145 | + 'posts_to_show_in_rss_feed' => 10, // how many posts should we show in the rss feed |
|
146 | 146 | 'cache_in_minutes' => 60, // how long (in minutes) to cache the RSS blog feed for. |
147 | 147 | 'description' => 'Our blog post RSS feed', //description for the RSS feed |
148 | 148 | 'language' => 'en', // see https://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes |
@@ -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 '> |