Skip to content

Commit 96ddb6f

Browse files
committed
fixup! initialize default array even for non-entity-property collections
1 parent 7ff1aa3 commit 96ddb6f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

rules/TypedCollections/Rector/Class_/InitializeCollectionInConstructorRector.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ private function isDefaultArrayCollectionPropertyCandidate(mixed $property): boo
140140
if ($this->entityLikeClassDetector->isToMany($property)) {
141141
return true;
142142
}
143-
144-
if ($this->collectionPropertyDetector->detect($property)) {
145-
return true;
146-
}
147-
148-
return false;
143+
return $this->collectionPropertyDetector->detect($property);
149144
}
150145
}

0 commit comments

Comments
 (0)