Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche committed Jul 25, 2024
1 parent 301858e commit f568cb7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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\\(\\)\\.$#"
Expand Down
2 changes: 1 addition & 1 deletion src/Support/Caching/DataStructureCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion src/Support/Validation/RuleDenormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()];
}
Expand Down

0 comments on commit f568cb7

Please sign in to comment.