@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | $categoryCount = \WebDevEtc\BlogEtc\Models\Post::count(); |
| 13 | 13 | |
| 14 | - echo $categoryCount . ' ' . str_plural('Post', $categoryCount); |
|
| 14 | + echo $categoryCount.' '.str_plural('Post', $categoryCount); |
|
| 15 | 15 | |
| 16 | 16 | ?>)</span> |
| 17 | 17 | </h6> |
@@ -3,6 +3,6 @@ |
||
| 3 | 3 | use Illuminate\Database\Eloquent\Model; |
| 4 | 4 | use WebDevEtc\BlogEtc\Services\CommentsService; |
| 5 | 5 | |
| 6 | -return static function (/* @scrutinizer ignore-unused */ ?Model $user) { |
|
| 6 | +return static function(/* @scrutinizer ignore-unused */ ?Model $user) { |
|
| 7 | 7 | return CommentsService::COMMENT_TYPE_BUILT_IN === config('blogetc.comments.type_of_comments_to_show'); |
| 8 | 8 | }; |
@@ -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_'. |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | 'rssfeed' => [ |
| 141 | 141 | 'should_shorten_text' => true, // boolean. Default: true. Should we shorten the text in rss feed? |
| 142 | 142 | 'text_limit' => 100, // max length of description text in the rss feed |
| 143 | - 'posts_to_show_in_rss_feed' => 10, // how many posts should we show in the rss feed |
|
| 143 | + 'posts_to_show_in_rss_feed' => 10, // how many posts should we show in the rss feed |
|
| 144 | 144 | 'cache_in_minutes' => 60, // how long (in minutes) to cache the RSS blog feed for. |
| 145 | 145 | 'description' => 'Our blog post RSS feed', //description for the RSS feed |
| 146 | 146 | 'language' => 'en', // see https://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes |
@@ -24,14 +24,14 @@ |
||
| 24 | 24 | // } |
| 25 | 25 | // }; |
| 26 | 26 | |
| 27 | - $show_error_if_has_value = static function ($attribute, $value, $fail) { |
|
| 27 | + $show_error_if_has_value = static 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 = static function ($attribute, $value, $fail) { |
|
| 34 | + $disabled_use_view_file = static 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'); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $smallest = null; |
| 36 | 36 | $smallest_size = -1; |
| 37 | 37 | foreach ($uploadedPhoto->uploaded_images as $file_key => $file) { |
| 38 | - $id = 'uploaded_' . ($uploadedPhoto->id) . '_' . $file_key; ?> |
|
| 38 | + $id = 'uploaded_'.($uploadedPhoto->id).'_'.$file_key; ?> |
|
| 39 | 39 | |
| 40 | 40 | <div class="col-md-12"> |
| 41 | 41 | <h6 class="text-center mt-3"> |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Illuminate\Database\Eloquent\Model; |
| 4 | 4 | use WebDevEtc\BlogEtc\Exceptions\BlogEtcAuthGateNotImplementedException; |
| 5 | 5 | |
| 6 | -return static function (/** @scrutinizer ignore-unused */ ?Model $user) { |
|
| 6 | +return static function(/** @scrutinizer ignore-unused */ ?Model $user) { |
|
| 7 | 7 | // Do not copy the internals for this gate, as it provides backwards compatibility. |
| 8 | 8 | if (!$user) { |
| 9 | 9 | return false; |
@@ -9,9 +9,9 @@ |
||
| 9 | 9 | use WebDevEtc\BlogEtc\Models\Comment; |
| 10 | 10 | use WebDevEtc\BlogEtc\Models\Post; |
| 11 | 11 | |
| 12 | -$factory->define(Comment::class, static function (Faker $faker) { |
|
| 12 | +$factory->define(Comment::class, static function(Faker $faker) { |
|
| 13 | 13 | return [ |
| 14 | - 'blog_etc_post_id' => static function () { |
|
| 14 | + 'blog_etc_post_id' => static function() { |
|
| 15 | 15 | return factory(Post::class)->create()->id; |
| 16 | 16 | }, |
| 17 | 17 | 'user_id' => null, |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | public function search(SearchRequest $request): \Illuminate\Contracts\View\View |
| 47 | 47 | { |
| 48 | - $searchResults = collect((new Search())->run($request->searchQuery()))->filter(static function ($result) { |
|
| 48 | + $searchResults = collect((new Search())->run($request->searchQuery()))->filter(static function($result) { |
|
| 49 | 49 | return $result->indexable && is_a($result->indexable, Post::class) && $result->indexable->isPublic(); |
| 50 | 50 | }); |
| 51 | 51 | |
@@ -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, static function ($constraint) { |
|
| 203 | + $resizedImage = $resizedImage->resize($w, $h, static 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 | } |