diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9d4a5342..32fc4f3e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -120,6 +120,10 @@ parameters: count: 1 path: src/Support/DataConfig.php + - + message: "#^Call to method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),string\\|null\\>\\:\\:isEmpty\\(\\) will always evaluate to false\\.$#" + count: 1 + path: src/Support/Validation/RuleDenormalizer.php - message: "#^Call to an undefined method DateTimeInterface\\:\\:setTimezone\\(\\)\\.$#" diff --git a/src/Support/Caching/DataStructureCache.php b/src/Support/Caching/DataStructureCache.php index 13d8c772..0968cdc1 100644 --- a/src/Support/Caching/DataStructureCache.php +++ b/src/Support/Caching/DataStructureCache.php @@ -17,7 +17,7 @@ class DataStructureCache public function __construct( protected array $cacheConfig, ) { - $this->store = cache()->store(($this->cacheConfig['store'] ?? null))?->getStore(); + $this->store = cache()->store(($this->cacheConfig['store'] ?? null))->getStore(); $this->prefix = ($this->cacheConfig['prefix'] ?? '') ? "{$this->cacheConfig['prefix']}." : ''; $this->duration = $this->cacheConfig['duration'] ?? null; } diff --git a/src/Support/Validation/RuleDenormalizer.php b/src/Support/Validation/RuleDenormalizer.php index 9d3f61bc..cce8eb13 100644 --- a/src/Support/Validation/RuleDenormalizer.php +++ b/src/Support/Validation/RuleDenormalizer.php @@ -62,7 +62,6 @@ protected function normalizeStringValidationAttribute( ->map(fn (mixed $value) => $this->normalizeRuleParameter($value, $path)) ->reject(fn (mixed $value) => $value === null); - if ($parameters->isEmpty()) { return [$rule->keyword()]; }