Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Dec 9, 2024

I think it would be useful, if rector transforms a array return type into a Iterator, that it also fixes a possible @return phpdoc type of a dataprovider (otherwise PHPStan is starting to yell about incompatible native vs. phpdoc return-type

…Fixture/use_data_provider_with_phpdoc.php.inc

Co-authored-by: Abdul Malik Ikhsan <[email protected]>
@staabm
Copy link
Contributor Author

staabm commented Dec 9, 2024

@samsonasik could you have a look into the rule?

@samsonasik
Copy link
Member

I will try 👍

];
}

public static function dataProvider()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

At this provider we could add another case with list<...>

@samsonasik
Copy link
Member

samsonasik added a commit that referenced this pull request Dec 9, 2024
…oviderRector (#415)

* YieldDataProviderRector: added failling test

* Update use_data_provider_with_phpdoc.php.inc

* Update rules-tests/CodeQuality/Rector/Class_/YieldDataProviderRector/Fixture/use_data_provider_with_phpdoc.php.inc

Co-authored-by: Abdul Malik Ikhsan <[email protected]>

* Closes #414

---------

Co-authored-by: Markus Staab <[email protected]>
Co-authored-by: Markus Staab <[email protected]>
@staabm staabm deleted the failing-test branch December 10, 2024 11:41
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