mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Prevent check triggering for commonly-extended classes
This commit is contained in:
parent
f2d202e2bb
commit
049b2c3f7a
@ -2082,10 +2082,12 @@ class ClassAnalyzer extends ClassLikeAnalyzer
|
||||
|
||||
if ($fq_interface_name_lc === 'traversable'
|
||||
&& !$storage->abstract
|
||||
&& !(
|
||||
isset($storage->class_implements['iteratoraggregate'])
|
||||
|| isset($storage->class_implements['iterator'])
|
||||
)
|
||||
&& !isset($storage->class_implements['iteratoraggregate'])
|
||||
&& !isset($storage->class_implements['iterator'])
|
||||
&& !isset($storage->parent_classes['pdostatement'])
|
||||
&& !isset($storage->parent_classes['ds\collection'])
|
||||
&& !isset($storage->parent_classes['domnodelist'])
|
||||
&& !isset($storage->parent_classes['dateperiod'])
|
||||
) {
|
||||
if (IssueBuffer::accepts(
|
||||
new InvalidTraversableImplementation(
|
||||
|
Loading…
x
Reference in New Issue
Block a user