1 | <?php |
||
17 | final class StorageMetadataFactory implements StorageMetadataFactoryInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var EntityUtility |
||
21 | */ |
||
22 | private $entityUtil; |
||
23 | |||
24 | /** |
||
25 | * Constructor. |
||
26 | * |
||
27 | * @param EntityUtility $entityUtl |
||
|
|||
28 | */ |
||
29 | public function __construct(EntityUtility $entityUtil) |
||
33 | |||
34 | /** |
||
35 | * {@inheritDoc} |
||
36 | */ |
||
37 | public function createInstance(array $mapping) |
||
50 | |||
51 | /** |
||
52 | * {@inheritDoc} |
||
53 | */ |
||
54 | public function handleLoad(EntityMetadata $metadata) |
||
60 | |||
61 | /** |
||
62 | * {@inheritDoc} |
||
63 | */ |
||
64 | public function handleValidate(EntityMetadata $metadata) |
||
70 | |||
71 | |||
72 | |||
73 | /** |
||
74 | * Validates that the collection naming is correct, based on entity format config. |
||
75 | * |
||
76 | * @param EntityMetadata $metadata |
||
77 | * @throws MetadataException |
||
78 | */ |
||
79 | private function validateCollectionNaming(EntityMetadata $metadata) |
||
92 | |||
93 | /** |
||
94 | * Validates that the proper database properties are set. |
||
95 | * |
||
96 | * @param EntityMetadata $metadata |
||
97 | * @throws MetadataException |
||
98 | */ |
||
99 | private function validateDatabase(EntityMetadata $metadata) |
||
106 | |||
107 | /** |
||
108 | * Validates the proper id strategy. |
||
109 | * |
||
110 | * @param EntityMetadata $metadata |
||
111 | * @throws MetadataException |
||
112 | */ |
||
113 | private function validateIdStrategy(EntityMetadata $metadata) |
||
121 | } |
||
122 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.