-
-
Notifications
You must be signed in to change notification settings - Fork 740
Closed
rectorphp/rector-src
#5746Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | 1.0.3 |
Rector is adding a generic type as return type declaration:
1 file with changes
===================
1) src/ExtendedEntityRepository.php:34
---------- begin diff ----------
@@ @@
*
* @return T
*/
- public function findOneByOrThrow(array $conditions) {
+ public function findOneByOrThrow(array $conditions): ?T {
$entity = $this->findOneBy($conditions);
if ($entity === null) {
----------- end diff -----------
Applied rules:
* ChildDoctrineRepositoryClassTypeRector
Minimal PHP Code Causing Issue
The bug doesn't get triggered in the demo sandbox, unfortunately, but here's the code: https://getrector.com/demo/c6a5e684-b19a-4873-8047-cf43b809c207
If need be, I can try to construct a full reproduction repository.
Expected Behaviour
No changes.
Reactions are currently unavailable