Skip to content

Conversation

drupol
Copy link
Contributor

@drupol drupol commented Jun 22, 2022

No description provided.

@drupol drupol marked this pull request as ready for review June 22, 2022 19:54
*
* @template-extends FilterIterator<TKey, TValue, TIterator>
*/
class RegexIterator extends FilterIterator {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be in skipCheckGenericClasses

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

public function __construct(Iterator $iterator, string $regex, int $mode = self::MATCH, int $flags = 0, int $preg_flags = 0) {}

/**
* @return TValue|null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not add the |null part here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got rid of the method as we are extending FilterIterator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually those methods are not defined in FilterIterator. Adding them back and remove the null.

public function current() {}

/**
* @return TKey|null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dtto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

@ondrejmirtes ondrejmirtes merged commit d194a47 into phpstan:1.7.x Jun 23, 2022
@ondrejmirtes
Copy link
Member

Thank you.

@drupol drupol deleted the iterators/add-RegexIterator branch June 23, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants