1 | <?php |
||
10 | class TimeZone implements ValueObjectInterface |
||
11 | { |
||
12 | /** @var StringLiteral */ |
||
13 | protected $name; |
||
14 | |||
15 | /** |
||
16 | * Returns a new Time object from native timezone name |
||
17 | * |
||
18 | * @param string $name |
||
|
|||
19 | * @return self |
||
20 | */ |
||
21 | 4 | public static function fromNative() |
|
29 | |||
30 | /** |
||
31 | * Returns a new Time from a native PHP \DateTime |
||
32 | * |
||
33 | * @param \DateTimeZone $timezone |
||
34 | * @return self |
||
35 | */ |
||
36 | 2 | public static function fromNativeDateTimeZone(\DateTimeZone $timezone) |
|
40 | |||
41 | /** |
||
42 | * Returns default TimeZone |
||
43 | * |
||
44 | * @return self |
||
45 | */ |
||
46 | 2 | public static function fromDefault() |
|
50 | |||
51 | /** |
||
52 | * Returns a new TimeZone object |
||
53 | * |
||
54 | * @param StringLiteral $name |
||
55 | * @throws InvalidTimeZoneException |
||
56 | */ |
||
57 | 17 | public function __construct(StringLiteral $name) |
|
65 | |||
66 | /** |
||
67 | * Returns a native PHP \DateTimeZone version of the current TimeZone. |
||
68 | * |
||
69 | * @return \DateTimeZone |
||
70 | */ |
||
71 | 3 | public function toNativeDateTimeZone() |
|
75 | |||
76 | /** |
||
77 | * Tells whether two DateTimeZone are equal by comparing their names |
||
78 | * |
||
79 | * @param ValueObjectInterface $timezone |
||
80 | * @return bool |
||
81 | */ |
||
82 | 7 | public function sameValueAs(ValueObjectInterface $timezone) |
|
90 | |||
91 | /** |
||
92 | * Returns timezone name |
||
93 | * |
||
94 | * @return StringLiteral |
||
95 | */ |
||
96 | 15 | public function getName() |
|
100 | |||
101 | /** |
||
102 | * Returns timezone name as string |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | 4 | public function __toString() |
|
110 | } |
||
111 |
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.