1 | <?php |
||
16 | final class StorageMetadataFactory implements StorageMetadataFactoryInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var EntityUtility |
||
20 | */ |
||
21 | private $entityUtil; |
||
22 | |||
23 | /** |
||
24 | * Constructor. |
||
25 | * |
||
26 | * @param EntityUtility $entityUtil |
||
27 | */ |
||
28 | public function __construct(EntityUtility $entityUtil) |
||
32 | |||
33 | /** |
||
34 | * {@inheritDoc} |
||
35 | */ |
||
36 | public function createInstance(array $mapping) |
||
49 | |||
50 | /** |
||
51 | * {@inheritDoc} |
||
52 | */ |
||
53 | public function handleLoad(EntityMetadata $metadata) |
||
59 | |||
60 | /** |
||
61 | * {@inheritDoc} |
||
62 | */ |
||
63 | public function handleValidate(EntityMetadata $metadata) |
||
69 | |||
70 | |||
71 | |||
72 | /** |
||
73 | * Validates that the collection naming is correct, based on entity format config. |
||
74 | * |
||
75 | * @param EntityMetadata $metadata |
||
76 | * @throws MetadataException |
||
77 | */ |
||
78 | private function validateCollectionNaming(EntityMetadata $metadata) |
||
91 | |||
92 | /** |
||
93 | * Validates that the proper database properties are set. |
||
94 | * |
||
95 | * @param EntityMetadata $metadata |
||
96 | * @throws MetadataException |
||
97 | */ |
||
98 | private function validateDatabase(EntityMetadata $metadata) |
||
105 | |||
106 | /** |
||
107 | * Validates the proper id strategy. |
||
108 | * |
||
109 | * @param EntityMetadata $metadata |
||
110 | * @throws MetadataException |
||
111 | */ |
||
112 | private function validateIdStrategy(EntityMetadata $metadata) |
||
120 | } |
||
121 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: