1 | <?php |
||
11 | class Recurrence |
||
12 | { |
||
13 | /** |
||
14 | * @var Frequency |
||
15 | */ |
||
16 | private $frequency; |
||
17 | |||
18 | /** |
||
19 | * @var \Datetime |
||
20 | */ |
||
21 | private $periodStartAt; |
||
22 | |||
23 | /** |
||
24 | * @var \Datetime |
||
25 | */ |
||
26 | private $periodEndAt; |
||
27 | |||
28 | /** |
||
29 | * @var integer |
||
30 | */ |
||
31 | private $interval = 1; |
||
32 | |||
33 | /** |
||
34 | * @var integer |
||
35 | */ |
||
36 | private $count; |
||
37 | |||
38 | /** |
||
39 | * @var array |
||
40 | */ |
||
41 | private $constraints = []; |
||
42 | |||
43 | /** |
||
44 | * Recurrence constructor. |
||
45 | */ |
||
46 | public function __construct() |
||
50 | |||
51 | /** |
||
52 | * @param \Datetime $periodStartAt |
||
53 | * @return $this |
||
54 | */ |
||
55 | public function setPeriodStartAt(\Datetime $periodStartAt) |
||
61 | |||
62 | /** |
||
63 | * @return \Datetime |
||
64 | */ |
||
65 | public function getPeriodStartAt() |
||
69 | |||
70 | /** |
||
71 | * @param \Datetime $periodEndAt |
||
72 | * @return $this |
||
73 | */ |
||
74 | public function setPeriodEndAt(\Datetime $periodEndAt) |
||
80 | |||
81 | /** |
||
82 | * @return \Datetime |
||
83 | */ |
||
84 | public function getPeriodEndAt() |
||
88 | |||
89 | /** |
||
90 | * @return bool |
||
91 | */ |
||
92 | public function hasPeriodEndAt() |
||
96 | |||
97 | /** |
||
98 | * @param Frequency $frequency |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function setFrequency(Frequency $frequency) |
||
107 | |||
108 | /** |
||
109 | * @return Frequency |
||
110 | */ |
||
111 | public function getFrequency() |
||
115 | |||
116 | /** |
||
117 | * @return int |
||
118 | */ |
||
119 | public function getInterval() |
||
123 | |||
124 | /** |
||
125 | * @param int $interval |
||
126 | * @return $this |
||
127 | */ |
||
128 | public function setInterval($interval) |
||
134 | |||
135 | /** |
||
136 | * @return int |
||
137 | */ |
||
138 | public function getCount() |
||
142 | |||
143 | /** |
||
144 | * @return bool |
||
145 | */ |
||
146 | public function hasCount() |
||
150 | |||
151 | /** |
||
152 | * @param int $count |
||
153 | * @return $this |
||
154 | */ |
||
155 | public function setCount($count) |
||
161 | |||
162 | /** |
||
163 | * @return array |
||
164 | */ |
||
165 | public function getConstraints() |
||
169 | |||
170 | /** |
||
171 | * @param array $constraints |
||
172 | * @return $this |
||
173 | */ |
||
174 | public function setConstraints(array $constraints) |
||
184 | |||
185 | /** |
||
186 | * @return bool |
||
187 | */ |
||
188 | public function hasConstraints() |
||
192 | |||
193 | /** |
||
194 | * @param RecurrenceConstraintInterface $constraint |
||
195 | * @return $this |
||
196 | */ |
||
197 | public function addConstraint(RecurrenceConstraintInterface $constraint) |
||
207 | |||
208 | /** |
||
209 | * @param RecurrenceConstraintInterface $constraint |
||
210 | * @return $this |
||
211 | */ |
||
212 | public function removeConstraint(RecurrenceConstraintInterface $constraint) |
||
220 | |||
221 | /** |
||
222 | * @param string $constraintClassName |
||
223 | * @return bool |
||
224 | */ |
||
225 | public function hasConstraint($constraintClassName) |
||
235 | } |
||
236 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: