Skip to content

Commit

Permalink
Enable cache directory assertion
Browse files Browse the repository at this point in the history
Re-enable the assertion to ensure the cache directory is a non-empty string. This change helps prevent potential errors related to invalid cache directory configurations. Adjustments improve code reliability and enforce stricter input validation.
  • Loading branch information
Dropelikeit committed Dec 6, 2024
1 parent 66f1f37 commit 4bf5884
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private function __construct(
array $customHandlers,
) {
$cacheDir = sprintf('%s%s', $cacheDir, self::CACHE_DIR);
#Assert::stringNotEmpty($cacheDir);
Assert::stringNotEmpty($cacheDir);

Check warning on line 48 in src/Config/Config.php

View workflow job for this annotation

GitHub Actions / PHP 8.1

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ ) { $cacheDir = sprintf('%s%s', $cacheDir, self::CACHE_DIR); - Assert::stringNotEmpty($cacheDir); + $this->cacheDir = $cacheDir; $this->customHandlers = $customHandlers; }

Check warning on line 48 in src/Config/Config.php

View workflow job for this annotation

GitHub Actions / PHP 8.3

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ ) { $cacheDir = sprintf('%s%s', $cacheDir, self::CACHE_DIR); - Assert::stringNotEmpty($cacheDir); + $this->cacheDir = $cacheDir; $this->customHandlers = $customHandlers; }

Check warning on line 48 in src/Config/Config.php

View workflow job for this annotation

GitHub Actions / PHP 8.2

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ ) { $cacheDir = sprintf('%s%s', $cacheDir, self::CACHE_DIR); - Assert::stringNotEmpty($cacheDir); + $this->cacheDir = $cacheDir; $this->customHandlers = $customHandlers; }

$this->cacheDir = $cacheDir;
$this->customHandlers = $customHandlers;
Expand Down

0 comments on commit 4bf5884

Please sign in to comment.