From 51ec80f11f1072d45f9820894d74f22afb81ef5b Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Thu, 3 Mar 2022 18:20:24 +0000 Subject: [PATCH] fix: resolve PHPStan warnings --- src/Bootstrappers/BootFiles.php | 1 + src/Expectation.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bootstrappers/BootFiles.php b/src/Bootstrappers/BootFiles.php index 51781ff2..5817c3a8 100644 --- a/src/Bootstrappers/BootFiles.php +++ b/src/Bootstrappers/BootFiles.php @@ -48,6 +48,7 @@ final class BootFiles if (is_dir($filename)) { $directory = new RecursiveDirectoryIterator($filename); $iterator = new RecursiveIteratorIterator($directory); + /** @var \DirectoryIterator $file */ foreach ($iterator as $file) { $this->load($file->__toString()); } diff --git a/src/Expectation.php b/src/Expectation.php index 191d762e..7703ebb8 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -151,7 +151,6 @@ final class Expectation throw new BadMethodCallException('Expectation value is not iterable.'); } - //@phpstan-ignore-next-line $value = is_array($this->value) ? $this->value : iterator_to_array($this->value); $keys = array_keys($value); $values = array_values($value);