1 | <?php |
||
20 | class CLIApplicationBuilder |
||
21 | { |
||
22 | /** |
||
23 | * Create a Doctrine CLI application. |
||
24 | * |
||
25 | * @param array|\Doctrine\ORM\EntityManager $entityManager |
||
26 | * @param array|\Doctrine\ODM\MongoDB\DocumentManager $documentManager |
||
|
|||
27 | * |
||
28 | * @throws \Doctrine\DBAL\DBALException |
||
29 | * @throws \Doctrine\ORM\ORMException |
||
30 | * @throws \InvalidArgumentException |
||
31 | * @throws \LogicException |
||
32 | * @throws \RuntimeException |
||
33 | * |
||
34 | * @return \Symfony\Component\Console\Application |
||
35 | */ |
||
36 | public static function build($entityManager, $documentManager = null) |
||
65 | |||
66 | /** |
||
67 | * Retrieve entity manager. |
||
68 | * |
||
69 | * @param array|\Doctrine\ORM\EntityManager $entityManager |
||
70 | * |
||
71 | * @throws \InvalidArgumentException |
||
72 | * |
||
73 | * @return \Doctrine\ORM\EntityManager |
||
74 | */ |
||
75 | protected static function getEntityManager($entityManager) |
||
87 | |||
88 | /** |
||
89 | * Retrieve document manager. |
||
90 | * |
||
91 | * @param array|\Doctrine\ODM\MongoDB\DocumentManager $documentManager |
||
92 | * |
||
93 | * @throws \InvalidArgumentException |
||
94 | * |
||
95 | * @return \Doctrine\ODM\MongoDB\DocumentManager |
||
96 | */ |
||
97 | protected static function getDocumentManager($documentManager) |
||
109 | } |
||
110 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive. In addition it looks for parameters that have the generic type
array
and suggests a stricter type likearray<String>
.Most often this is a case of a parameter that can be null in addition to its declared types.