1 | <?php |
||
15 | class MappingContext |
||
16 | { |
||
17 | /** |
||
18 | * Object mapper |
||
19 | * |
||
20 | * @var ObjectMapper |
||
21 | */ |
||
22 | protected $mapper; |
||
23 | |||
24 | /** |
||
25 | * Mapping definition |
||
26 | * |
||
27 | * @var Definition |
||
28 | */ |
||
29 | protected $definition; |
||
30 | |||
31 | /** |
||
32 | * Identifier handler |
||
33 | * |
||
34 | * @var IdentifierHandlerInterface |
||
35 | */ |
||
36 | protected $identifierHandler; |
||
37 | |||
38 | /** |
||
39 | * Type handler |
||
40 | * |
||
41 | * @var TypeHandlerInterface |
||
42 | */ |
||
43 | protected $typeHandler; |
||
44 | |||
45 | /** |
||
46 | * MappingContext constructor. |
||
47 | * |
||
48 | * @param ObjectMapper $mapper |
||
49 | * @param Definition $definition |
||
50 | * @param IdentifierHandlerInterface $identifierHandler, |
||
|
|||
51 | * @param TypeHandlerInterface $typeHandler |
||
52 | */ |
||
53 | 3 | public function __construct( |
|
64 | |||
65 | /** |
||
66 | * Get object mapper |
||
67 | * |
||
68 | * @return ObjectMapper |
||
69 | */ |
||
70 | 1 | public function getMapper(): ObjectMapper |
|
74 | |||
75 | /** |
||
76 | * Get mapping configuration |
||
77 | * |
||
78 | * @return Definition |
||
79 | */ |
||
80 | 1 | public function getDefinition(): Definition |
|
84 | |||
85 | /** |
||
86 | * Get identifier handler |
||
87 | * |
||
88 | * @return IdentifierHandlerInterface |
||
89 | */ |
||
90 | 1 | public function getIdentifierHandler(): IdentifierHandlerInterface |
|
94 | |||
95 | /** |
||
96 | * Get type handler |
||
97 | * |
||
98 | * @return TypeHandlerInterface |
||
99 | */ |
||
100 | 1 | public function getTypeHandler(): TypeHandlerInterface |
|
104 | } |
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.