Skip to content

Commit

Permalink
Remove unused variable (#179)
Browse files Browse the repository at this point in the history
* remove unused variable

* cleanup
  • Loading branch information
tillkruss authored May 3, 2022
1 parent 326ae4f commit caf923e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RewriteAssetUrls.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class RewriteAssetUrls
public static function inCssString($css, $baseUrl)
{
return preg_replace_callback('/url\([\'"]?(?<url>[^)]+?)[\'"]?\)/', function ($matches) use ($baseUrl) {
return Str::startsWith($url = $matches[1], ['/'])
? Str::replaceFirst('/', $baseUrl.'/', $matches[0])
return Str::startsWith($matches[1], '/')
? Str::replaceFirst('/', "{$baseUrl}/", $matches[0])
: $matches[0];
}, $css);
}
Expand Down

0 comments on commit caf923e

Please sign in to comment.