From ea1077c8199e7483cd309162929b5e7ca15616a5 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 15 Aug 2024 14:02:44 +0200 Subject: [PATCH] improve sample to note setter as well --- ...proveDoctrineCollectionDocTypeInEntityRector.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rules/CodeQuality/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php b/rules/CodeQuality/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php index cd842119..9c1330ef 100644 --- a/rules/CodeQuality/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php +++ b/rules/CodeQuality/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php @@ -66,6 +66,11 @@ class SomeClass * @var Collection|Trainer[] */ private $trainings = []; + + public function setTrainings($trainings) + { + $this->trainings = $trainings; + } } CODE_SAMPLE , @@ -83,6 +88,14 @@ class SomeClass * @var Collection */ private $trainings = []; + + /** + * @param Collection $trainings + */ + public function setTrainings($trainings) + { + $this->trainings = $trainings; + } } CODE_SAMPLE ),