1 | <?php |
||
24 | class Calendar |
||
25 | { |
||
26 | /** |
||
27 | * @var Manager |
||
28 | */ |
||
29 | private $eventManager; |
||
30 | |||
31 | /** |
||
32 | * @var FactoryInterface |
||
33 | */ |
||
34 | protected $factory; |
||
35 | |||
36 | /** |
||
37 | * @param Manager $eventManager |
||
38 | */ |
||
39 | public function setEventManager(Manager $eventManager) |
||
43 | |||
44 | /** |
||
45 | * @return Manager |
||
46 | */ |
||
47 | public function getEventManager() |
||
55 | |||
56 | /** |
||
57 | * @param $yearOrStart |
||
58 | * |
||
59 | * @return Period\Year |
||
60 | */ |
||
61 | public function getYear($yearOrStart) |
||
69 | |||
70 | /** |
||
71 | * @param \DateTime|int $yearOrStart year if month is filled, month begin datetime otherwise |
||
72 | * @param null|int $month number (1~12) |
||
73 | * |
||
74 | * @return PeriodInterface |
||
75 | */ |
||
76 | public function getMonth($yearOrStart, $month = null) |
||
84 | |||
85 | /** |
||
86 | * @param \DateTime|int $yearOrStart |
||
87 | * @param null|int $week |
||
88 | * |
||
89 | * @return PeriodInterface |
||
90 | */ |
||
91 | public function getWeek($yearOrStart, $week = null) |
||
101 | |||
102 | /** |
||
103 | * @param \DateTime|int $yearOrStart |
||
104 | * @param null|int $month |
||
105 | * @param null|int $day |
||
106 | * |
||
107 | * @return PeriodInterface |
||
108 | */ |
||
109 | public function getDay($yearOrStart, $month = null, $day = null) |
||
117 | |||
118 | /** |
||
119 | * @param \DateTime|int $yearOrStart |
||
120 | * @param null|int $month |
||
121 | * @param null|int $day |
||
122 | * |
||
123 | * @return PeriodInterface |
||
124 | */ |
||
125 | public function getHour($yearOrStart, $month = null, $day = null, $hour = null) |
||
133 | |||
134 | /** |
||
135 | * @param \DateTime|int $yearOrStart |
||
136 | * @param null|int $month |
||
137 | * @param null|int $day |
||
138 | * |
||
139 | * @return PeriodInterface |
||
140 | */ |
||
141 | public function getMinute($yearOrStart, $month = null, $day = null, $hour = null, $minute = null) |
||
149 | |||
150 | /** |
||
151 | * @param \DateTime|int $yearOrStart |
||
152 | * @param null|int $month |
||
153 | * @param null|int $day |
||
154 | * |
||
155 | * @return PeriodInterface |
||
156 | */ |
||
157 | public function getSecond($yearOrStart, $month = null, $day = null, $hour = null, $minute = null, $second = null) |
||
167 | |||
168 | /** |
||
169 | * @param Period\PeriodInterface $period |
||
170 | * @param array $options |
||
171 | * |
||
172 | * @return array<Event\EventInterface> |
||
|
|||
173 | */ |
||
174 | public function getEvents(PeriodInterface $period, array $options = array()) |
||
178 | |||
179 | /** |
||
180 | * @param FactoryInterface $factory |
||
181 | */ |
||
182 | public function setFactory(FactoryInterface $factory) |
||
186 | |||
187 | /** |
||
188 | * @return FactoryInterface |
||
189 | */ |
||
190 | public function getFactory() |
||
198 | |||
199 | /** |
||
200 | * @param int $firstWeekday |
||
201 | */ |
||
202 | public function setFirstWeekday($firstWeekday) |
||
206 | |||
207 | /** |
||
208 | * @return int |
||
209 | */ |
||
210 | public function getFirstWeekday() |
||
214 | } |
||
215 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.