1 | <?php |
||
19 | class TimeZoneRequest |
||
20 | { |
||
21 | /** |
||
22 | * @var Coordinate |
||
23 | */ |
||
24 | private $location; |
||
25 | |||
26 | /** |
||
27 | * @var \DateTime |
||
28 | */ |
||
29 | private $date; |
||
30 | |||
31 | /** |
||
32 | * @var string|null |
||
33 | */ |
||
34 | private $language; |
||
35 | |||
36 | /** |
||
37 | * @param Coordinate $location |
||
38 | * @param \DateTime|null $date |
||
39 | */ |
||
40 | public function __construct(Coordinate $location, \DateTime $date = null) |
||
45 | |||
46 | /** |
||
47 | * @return Coordinate |
||
48 | */ |
||
49 | public function getLocation() |
||
53 | |||
54 | /** |
||
55 | * @param Coordinate $location |
||
56 | */ |
||
57 | public function setLocation(Coordinate $location) |
||
61 | |||
62 | /** |
||
63 | * @return \DateTime |
||
64 | */ |
||
65 | public function getDate() |
||
69 | |||
70 | /** |
||
71 | * @param \DateTime $date |
||
72 | */ |
||
73 | public function setDate(\DateTime $date) |
||
77 | |||
78 | /** |
||
79 | * @return bool |
||
80 | */ |
||
81 | public function hasLanguage() |
||
85 | |||
86 | /** |
||
87 | * @return string|null |
||
88 | */ |
||
89 | public function getLanguage() |
||
93 | |||
94 | /** |
||
95 | * @param string|null $language |
||
96 | */ |
||
97 | public function setLanguage( $language ) |
||
101 | |||
102 | /** |
||
103 | * @return mixed[] |
||
104 | */ |
||
105 | public function buildQuery() |
||
118 | } |
||
119 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):