Skip to content

Commit

Permalink
fix: assets config should not be called via class
Browse files Browse the repository at this point in the history
  • Loading branch information
jozefrebjak committed Sep 11, 2023
1 parent 3193e14 commit b5075f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class Asset
public static function config(): AssetsConfig
{
if (self::$config === null) {
self::$config = config(AssetsConfig::class);
self::$config = config('Assets');

// Standardize formats
self::$config->uri = rtrim(self::$config->uri, '/\\') . '/';

Check warning on line 57 in src/Asset.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "UnwrapRtrim": --- Original +++ New @@ @@ if (self::$config === null) { self::$config = config('Assets'); // Standardize formats - self::$config->uri = rtrim(self::$config->uri, '/\\') . '/'; + self::$config->uri = self::$config->uri . '/'; self::$config->directory = rtrim(self::$config->directory, '/\\') . DIRECTORY_SEPARATOR; self::$config->vendor = rtrim(self::$config->vendor, '/\\') . DIRECTORY_SEPARATOR; }

Check warning on line 57 in src/Asset.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ if (self::$config === null) { self::$config = config('Assets'); // Standardize formats - self::$config->uri = rtrim(self::$config->uri, '/\\') . '/'; + self::$config->uri = '/' . rtrim(self::$config->uri, '/\\'); self::$config->directory = rtrim(self::$config->directory, '/\\') . DIRECTORY_SEPARATOR; self::$config->vendor = rtrim(self::$config->vendor, '/\\') . DIRECTORY_SEPARATOR; }

Check warning on line 57 in src/Asset.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ if (self::$config === null) { self::$config = config('Assets'); // Standardize formats - self::$config->uri = rtrim(self::$config->uri, '/\\') . '/'; + self::$config->uri = '/'; self::$config->directory = rtrim(self::$config->directory, '/\\') . DIRECTORY_SEPARATOR; self::$config->vendor = rtrim(self::$config->vendor, '/\\') . DIRECTORY_SEPARATOR; }

Check warning on line 57 in src/Asset.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ if (self::$config === null) { self::$config = config('Assets'); // Standardize formats - self::$config->uri = rtrim(self::$config->uri, '/\\') . '/'; + self::$config->uri = rtrim(self::$config->uri, '/\\'); self::$config->directory = rtrim(self::$config->directory, '/\\') . DIRECTORY_SEPARATOR; self::$config->vendor = rtrim(self::$config->vendor, '/\\') . DIRECTORY_SEPARATOR; }
Expand Down

0 comments on commit b5075f1

Please sign in to comment.