Skip to content

Commit

Permalink
fix: Reduce amount of local variables thanks to PHPStan fix.
Browse files Browse the repository at this point in the history
This issue will be fixed in PHPStan > 1.8.1.
See phpstan/phpstan-src#1519 for more info.
  • Loading branch information
drupol committed Jul 18, 2022
1 parent 95da1a1 commit 4ad921f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Expand Up @@ -17,8 +17,6 @@ infection.json export-ignore
LICENSE export-ignore
Makefile export-ignore
phpbench.json export-ignore
phpstan.neon.dist export-ignore
phpunit.xml export-ignore
psalm-baseline.xml export-ignore
psalm.xml export-ignore
README.md export-ignore
6 changes: 0 additions & 6 deletions phpstan.neon.dist

This file was deleted.

8 changes: 0 additions & 8 deletions psalm-baseline.xml

This file was deleted.

1 change: 0 additions & 1 deletion psalm.xml
Expand Up @@ -3,7 +3,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="./src" />
Expand Down
5 changes: 1 addition & 4 deletions src/CachingIteratorAggregate.php
Expand Up @@ -48,10 +48,7 @@ public function __construct(Iterator $iterator)
*/
public function getIterator(): Generator
{
/** @var array<int, array{0:TKey, 1:T}> $cache */
$cache = $this->iterator->getCache();

foreach ($cache as [$key, $current]) {
foreach ($this->iterator->getCache() as [$key, $current]) {
yield $key => $current;
}

Expand Down

0 comments on commit 4ad921f

Please sign in to comment.