@@ -31,6 +31,7 @@ public function test_it_should_collect_dependencies_defined_in_docblock(): void
3131
3232 use Application\MyDto;
3333 use Domain\ValueObject;
34+ use Symfony\Component\Validator\Constraints AS Assert;
3435
3536 use Application\Model\{User, Product};
3637
@@ -39,9 +40,16 @@ class MyClass
3940 /** @var array<int, int|string> */
4041 public array $myArray;
4142
42- /** @var array<int, User> */
43+ /**
44+ * @var array<int, User>
45+ * @Assert\Blank
46+ */
4347 public array $users;
4448
49+ /**
50+ * @phpstan-ignore property.readOnlyByPhpDocDefaultValue
51+ */
52+ private static ?\UuidFactoryInterface $factory = null;
4553
4654 /**
4755 * @param MyDto[] $dtoList
@@ -76,13 +84,14 @@ public function myMethod2(array $aParam, array $users): array
7684 $ cd = $ parser ->getClassDescriptions ()[0 ];
7785 $ dep = $ cd ->getDependencies ();
7886
79- self ::assertCount (7 , $ cd ->getDependencies ());
87+ self ::assertCount (8 , $ cd ->getDependencies ());
8088 self ::assertEquals ('Application\Model\User ' , $ dep [0 ]->getFQCN ()->toString ());
81- self ::assertEquals ('Application\MyDto ' , $ dep [1 ]->getFQCN ()->toString ());
82- self ::assertEquals ('Domain\ValueObject ' , $ dep [2 ]->getFQCN ()->toString ());
83- self ::assertEquals ('Application\Model\User ' , $ dep [3 ]->getFQCN ()->toString ());
84- self ::assertEquals ('Application\Model\Product ' , $ dep [4 ]->getFQCN ()->toString ());
85- self ::assertEquals ('Domain\Foo\MyOtherClass ' , $ dep [5 ]->getFQCN ()->toString ());
86- self ::assertEquals ('Application\Model\User ' , $ dep [6 ]->getFQCN ()->toString ());
89+ self ::assertEquals ('UuidFactoryInterface ' , $ dep [1 ]->getFQCN ()->toString ());
90+ self ::assertEquals ('Application\MyDto ' , $ dep [2 ]->getFQCN ()->toString ());
91+ self ::assertEquals ('Domain\ValueObject ' , $ dep [3 ]->getFQCN ()->toString ());
92+ self ::assertEquals ('Application\Model\User ' , $ dep [4 ]->getFQCN ()->toString ());
93+ self ::assertEquals ('Application\Model\Product ' , $ dep [5 ]->getFQCN ()->toString ());
94+ self ::assertEquals ('Domain\Foo\MyOtherClass ' , $ dep [6 ]->getFQCN ()->toString ());
95+ self ::assertEquals ('Application\Model\User ' , $ dep [7 ]->getFQCN ()->toString ());
8796 }
8897}
0 commit comments