1 | <?php |
||
14 | class PrefixMappingEntityIdParserFactory { |
||
15 | |||
16 | /** |
||
17 | * @var string[] |
||
18 | */ |
||
19 | private $idPrefixMapping; |
||
20 | |||
21 | /** |
||
22 | * @var EntityIdParser |
||
23 | */ |
||
24 | private $parser; |
||
25 | |||
26 | /** |
||
27 | * @var PrefixMappingEntityIdParser[] |
||
28 | */ |
||
29 | private $parsers = []; |
||
30 | |||
31 | /** |
||
32 | * @since 3.7 |
||
33 | * |
||
34 | * @param EntityIdParser $parser |
||
35 | * @param array[] $idPrefixMapping An associative array mapping repository names (strings) to id serialization |
||
36 | * prefix mappings specific to the particular repository (@see PrefixMappingEntityIdParser). |
||
37 | * If an empty-string key is provided in the mapping for some repository, its value must be the same |
||
38 | * as the repository name. |
||
39 | * |
||
40 | * @throws ParameterAssertionException |
||
41 | */ |
||
42 | public function __construct( EntityIdParser $parser, array $idPrefixMapping ) { |
||
67 | |||
68 | /** |
||
69 | * Create a PrefixMappingEntityIdParser for the particular repository using id prefix mappings |
||
70 | * defined in the constructor. |
||
71 | * |
||
72 | * @since 3.7 |
||
73 | * |
||
74 | * @param string $repository |
||
75 | * |
||
76 | * @return PrefixMappingEntityIdParser |
||
77 | * @throws ParameterAssertionException |
||
78 | */ |
||
79 | public function getIdParser( $repository ) { |
||
86 | |||
87 | /** |
||
88 | * @param string $repository |
||
89 | * |
||
90 | * @return PrefixMappingEntityIdParser |
||
91 | * @throws ParameterAssertionException |
||
92 | */ |
||
93 | private function newIdParserForRepository( $repository ) { |
||
102 | |||
103 | } |
||
104 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..