Skip to content

Commit 1f27526

Browse files
ralphjsmitgithub-actions[bot]
authored andcommitted
Fix styling
1 parent 38f5727 commit 1f27526

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/Commands/ClearCacheCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public function handle(): int
1515
glide()->getCachePath()
1616
);
1717

18-
$this->info("Cleared Glide cache");
18+
$this->info('Cleared Glide cache');
1919

2020
return static::SUCCESS;
2121
}
22-
}
22+
}

src/GlideImageGenerator.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public function src(string $path, int $maxWidth = null, string $sizes = null): C
2121
return $attributes;
2222
}
2323

24-
protected function getSrcAttribute(string $path, int | null $maxWidth): string
24+
protected function getSrcAttribute(string $path, ?int $maxWidth): string
2525
{
26-
if ( $maxWidth === null ) {
26+
if ($maxWidth === null) {
2727
return asset($path);
2828
}
2929

@@ -37,7 +37,7 @@ protected function getSrcAttribute(string $path, int | null $maxWidth): string
3737
]);
3838
}
3939

40-
protected function getSrcsetAttribute(string $path, int | null $maxWidth): string
40+
protected function getSrcsetAttribute(string $path, ?int $maxWidth): string
4141
{
4242
$scale = collect([
4343
400,
@@ -62,11 +62,11 @@ protected function getSrcsetAttribute(string $path, int | null $maxWidth): strin
6262
$scale = $scale
6363
->when($maxWidth)->reject(fn (int $width) => $width > $maxWidth)
6464
// We will up-scale an image up to 2x it's original size. Above that it has no use anymore.
65-
->when($imageWidth)->reject(fn (int $width) => $width > ( $imageWidth * 2 ));
65+
->when($imageWidth)->reject(fn (int $width) => $width > ($imageWidth * 2));
6666

6767
// Push a final version with exactly the correct max-width if the difference with the last item
6868
// in the scale is bigger than 50px. Otherwise, the additional provided type is not so useful.
69-
if ( $maxWidth && ( $maxWidth - $scale->last() ) > 50 ) {
69+
if ($maxWidth && ($maxWidth - $scale->last()) > 50) {
7070
$scale->push($maxWidth);
7171
}
7272

@@ -99,4 +99,4 @@ public function getCachePath(): string
9999
{
100100
return storage_path('framework/cache/glide');
101101
}
102-
}
102+
}

src/Http/Controllers/GlideController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ public function __invoke(Request $request, Application $application, Filesystem
3232
abort(404);
3333
}
3434
}
35-
}
35+
}

src/helpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
use RalphJSmit\Laravel\Glide\GlideImageGenerator;
44

5-
if ( ! function_exists('glide') ) {
5+
if (! function_exists('glide')) {
66
function glide(): GlideImageGenerator
77
{
88
return app(GlideImageGenerator::class);
99
}
10-
}
10+
}

0 commit comments

Comments
 (0)