Skip to content

Commit 6610d14

Browse files
Claudio-Emmologithub-actions[bot]
authored andcommitted
Fix styling
1 parent 1f0a9ee commit 6610d14

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Shortcodes/PhotoShortcode.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class PhotoShortcode
66
{
77
public function register($shortcode): string
88
{
9-
if (!class_exists('\Outl1ne\NovaMediaHub\Models\Media')) {
9+
if (! class_exists('\Outl1ne\NovaMediaHub\Models\Media')) {
1010
return '';
1111
}
1212

@@ -23,7 +23,7 @@ public function register($shortcode): string
2323
});
2424

2525
foreach ($images as $key => $image) {
26-
$images[$key]['src'] = $image->path . $image->file_name;
26+
$images[$key]['src'] = $image->path.$image->file_name;
2727
$images[$key]['title'] = $image['data']['title'][0] ?? null;
2828
$images[$key]['alt'] = $image['data']['alt'][0] ?? null;
2929
}
@@ -46,11 +46,11 @@ public function register($shortcode): string
4646

4747
// Single image
4848
$media = \Outl1ne\NovaMediaHub\Models\Media::find($shortcode->id);
49-
if (!$media) {
49+
if (! $media) {
5050
return '';
5151
}
5252

53-
$path = $media->path . $media->file_name;
53+
$path = $media->path.$media->file_name;
5454
$align = $shortcode->align ?? null;
5555
$link = $shortcode->link ? str_replace("'", '%27', $shortcode->link) : null;
5656
$shape = $shortcode->shape ?? null;
@@ -67,7 +67,7 @@ public function register($shortcode): string
6767
if (is_array($credits)) {
6868
$credits = $credits[0];
6969
}
70-
$alt = $media->data['alt'] ?? 'Immagine id ' . $shortcode->id;
70+
$alt = $media->data['alt'] ?? 'Immagine id '.$shortcode->id;
7171
if (is_array($alt)) {
7272
$alt = $alt[0];
7373
}
@@ -96,10 +96,10 @@ public function register($shortcode): string
9696
public static function getImageHeight(string $path, int $width = 0): float|int
9797
{
9898

99-
$localPath = storage_path('app/public/' . $path);
99+
$localPath = storage_path('app/public/'.$path);
100100

101101
// Check if file exists
102-
if (!file_exists($localPath)) {
102+
if (! file_exists($localPath)) {
103103
return 0;
104104
}
105105

0 commit comments

Comments
 (0)