Skip to content

Commit

Permalink
Update src/Cache/Region/FileLockRegion.php
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander M. Turek <[email protected]>
  • Loading branch information
greg0ire and derrabus authored Feb 21, 2024
1 parent 555cf62 commit 3373aca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cache/Region/FileLockRegion.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function evictAll(): bool
{
// The check below is necessary because on some platforms glob returns false
// when nothing matched (even though no errors occurred)
$filenames = glob(sprintf('%s/*.%s', $this->directory, self::LOCK_EXTENSION));
$filenames = glob(sprintf('%s/*.%s', $this->directory, self::LOCK_EXTENSION)) ?: [];

if ($filenames !== false) {

Check failure on line 161 in src/Cache/Region/FileLockRegion.php

View workflow job for this annotation

GitHub Actions / Static Analysis with Psalm (default)

RedundantConditionGivenDocblockType

src/Cache/Region/FileLockRegion.php:161:13: RedundantConditionGivenDocblockType: Docblock-defined type list<string> can never contain false (see https://psalm.dev/156)

Check failure on line 161 in src/Cache/Region/FileLockRegion.php

View workflow job for this annotation

GitHub Actions / Static Analysis with Psalm (3.8.2)

RedundantConditionGivenDocblockType

src/Cache/Region/FileLockRegion.php:161:13: RedundantConditionGivenDocblockType: Docblock-defined type list<string> can never contain false (see https://psalm.dev/156)
foreach ($filenames as $filename) {
Expand Down

0 comments on commit 3373aca

Please sign in to comment.