Skip to content

Commit

Permalink
refactor: use double quotes for image location
Browse files Browse the repository at this point in the history
  • Loading branch information
JaZo committed Nov 24, 2023
1 parent 554ad59 commit c40799b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class MyImageProvider implements ProvidesImages
public function getImage(): Image
{
return new Image(
"url('[link to photo]')",
'url("[link to photo]")',
'Photo by ...'
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ImageProviders/CuratedBySwis.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public function getImage(): Image
$image = self::IMAGES[now()->format('j') - 1];

return new Image(
"url('" . asset('images/swisnl/filament-backgrounds/curated-by-swis/' . $image['url']) . "')",
'url("' . asset('images/swisnl/filament-backgrounds/curated-by-swis/' . $image['url']) . '")',
array_key_exists('author', $image) ? __('Photo by :author', ['author' => $image['author']]) : null
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ImageProviders/CuratedBySwisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
$provider = CuratedBySwis::make();
$image = $provider->getImage();

expect($image->image)->toEqual("url('http://localhost/images/swisnl/filament-backgrounds/curated-by-swis/24.jpg')");
expect($image->image)->toEqual('url("http://localhost/images/swisnl/filament-backgrounds/curated-by-swis/24.jpg")');
});

0 comments on commit c40799b

Please sign in to comment.