| 1 | <?php |
||
| 7 | class CalendarService |
||
| 8 | { |
||
| 9 | // Containing our matchRepository to make all our database calls to |
||
| 10 | protected $matchRepo; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Loads our $matchRepo |
||
| 14 | * |
||
| 15 | * @param MatchRepository $matchRepo |
||
| 16 | * @return CalendarService |
||
|
|
|||
| 17 | */ |
||
| 18 | public function __construct(MatchRepository $matchRepo) |
||
| 22 | |||
| 23 | public function getByDate($startDate, $endDate) |
||
| 29 | |||
| 30 | public function formatEvents($events) |
||
| 39 | |||
| 40 | } |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.