src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php
public function generateClassStub(CoreReflectionClass $classReflection) : ?string
    {
        if ($classReflection->isUserDefined()) {
            return null;
        }

        $stub = $this->getStub($classReflection->getExtensionName(), $this->getClassNodeVisitor($classReflection));

        if ($classReflection->getName() === Traversable::class) {
            // See https://github.com/JetBrains/phpstorm-stubs/commit/0778a26992c47d7dbee4d0b0bfb7fad4344371b1#diff-575bacb45377d474336c71cbf53c1729
            $stub = str_replace(' extends \iterable', '', $stub);
        }

        return $stub;
    }
public function generateClassStub(CoreReflectionClass $classReflection) : ?string
    {
        if ($classReflection->isUserDefined()) {
            return null;
        }

        $stub = $this->getStub($classReflection->getExtensionName(), $this->getClassNodeVisitor($classReflection));

        if ($classReflection->getName() === Traversable::class) {
            // See https://github.com/JetBrains/phpstorm-stubs/commit/0778a26992c47d7dbee4d0b0bfb7fad4344371b1#diff-575bacb45377d474336c71cbf53c1729
            $stub = str_replace(' extends \iterable', '', $stub);
        }

        return $stub;
    }
{@inheritDoc}