mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
fix: resolve PHPStan warnings
This commit is contained in:
@ -48,6 +48,7 @@ final class BootFiles
|
|||||||
if (is_dir($filename)) {
|
if (is_dir($filename)) {
|
||||||
$directory = new RecursiveDirectoryIterator($filename);
|
$directory = new RecursiveDirectoryIterator($filename);
|
||||||
$iterator = new RecursiveIteratorIterator($directory);
|
$iterator = new RecursiveIteratorIterator($directory);
|
||||||
|
/** @var \DirectoryIterator $file */
|
||||||
foreach ($iterator as $file) {
|
foreach ($iterator as $file) {
|
||||||
$this->load($file->__toString());
|
$this->load($file->__toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,7 +151,6 @@ final class Expectation
|
|||||||
throw new BadMethodCallException('Expectation value is not iterable.');
|
throw new BadMethodCallException('Expectation value is not iterable.');
|
||||||
}
|
}
|
||||||
|
|
||||||
//@phpstan-ignore-next-line
|
|
||||||
$value = is_array($this->value) ? $this->value : iterator_to_array($this->value);
|
$value = is_array($this->value) ? $this->value : iterator_to_array($this->value);
|
||||||
$keys = array_keys($value);
|
$keys = array_keys($value);
|
||||||
$values = array_values($value);
|
$values = array_values($value);
|
||||||
|
|||||||
Reference in New Issue
Block a user