noverify icon indicating copy to clipboard operation
noverify copied to clipboard

Resolve types for foreach over RecursiveIteratorIterator

Open quasilyte opened this issue 4 years ago • 0 comments

Code Example

foreach (new \RecursiveIteratorIterator($directoryIt, \RecursiveIteratorIterator::CHILD_FIRST) as $file) {
  echo $file->getPathname();
}

Actual Behavior

Warning about the undefined method getPathname(), $file type is not resolved (mixed is implied).

Expected Behavior

No warnings. RecursiveIteratorIterator should be handled in a same way as we handle Iterator class.

quasilyte avatar Mar 20 '20 20:03 quasilyte