1 | <?php |
||
10 | class PropertyMapDefinition { |
||
11 | |||
12 | /** |
||
13 | * The property maps. |
||
14 | * |
||
15 | * @var \TheSportsDb\PropertyMapper\PropertyMap[] |
||
16 | */ |
||
17 | protected $propertyMaps = []; |
||
18 | |||
19 | /** |
||
20 | * Adds a property map. |
||
21 | * @param \TheSportsDb\PropertyMapper\PropertyDefinition $source |
||
22 | * The source property definition. |
||
23 | * @param \TheSportsDb\PropertyMapper\PropertyDefinition $destination |
||
24 | * The destination property definition. |
||
25 | * @param callable $transform |
||
|
|||
26 | * The transform method. |
||
27 | * @param callable $reverse |
||
28 | * The reverse method. |
||
29 | * |
||
30 | * @return $this |
||
31 | */ |
||
32 | 4 | public function addPropertyMap(PropertyDefinition $source, PropertyDefinition $destination, callable $transform = NULL, callable $reverse = NULL) { |
|
41 | |||
42 | /** |
||
43 | * Gets the property maps. |
||
44 | * |
||
45 | * @return \TheSportsDb\PropertyMapper\PropertyMap[] |
||
46 | * The property maps. |
||
47 | */ |
||
48 | 1 | public function getPropertyMaps() { |
|
51 | |||
52 | |||
53 | } |
||
54 |
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.