1 | <?php |
||
24 | class DateTransformer implements DataTransformerInterface |
||
25 | { |
||
26 | /** |
||
27 | * @var string Date format |
||
28 | */ |
||
29 | private $format; |
||
30 | |||
31 | /** |
||
32 | * @var \Symfony\Component\PropertyAccess\PropertyAccessor |
||
33 | */ |
||
34 | private $propertyAccessor; |
||
35 | |||
36 | /** |
||
37 | * Constructor |
||
38 | * |
||
39 | * @param $format |
||
40 | */ |
||
41 | public function __construct($format) |
||
46 | |||
47 | /** |
||
48 | * Transforms date object to string using given format |
||
49 | * |
||
50 | * @param DateTime|string $dateTime |
||
|
|||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | public function transform($modelData) |
||
62 | |||
63 | /** |
||
64 | * Transforms date string to DateTime object |
||
65 | * |
||
66 | * @param object $modelData |
||
67 | * @param PropertyPathInterface $propertyPath |
||
68 | * @param mixed $value |
||
69 | */ |
||
70 | public function reverseTransform($modelData, PropertyPathInterface $propertyPath, $value) |
||
78 | |||
79 | /** |
||
80 | * Creates DateTime from string |
||
81 | * |
||
82 | * @param $date |
||
83 | * |
||
84 | * @return DateTime|false |
||
85 | */ |
||
86 | private function createDateFromString($date) |
||
90 | } |
||
91 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.