diff options
author | emkael <emkael@tlen.pl> | 2016-11-03 23:22:40 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-11-03 23:22:40 +0100 |
commit | bef5754e4676a8a578550b6af24d050a946405eb (patch) | |
tree | 190a54af236d00c476b28799ba502a42205a95c5 /app/frontend/dto | |
parent | 94e03b260197122ae8f6d7dfedfb2a191fdae273 (diff) |
* more strict function definitions
Diffstat (limited to 'app/frontend/dto')
-rw-r--r-- | app/frontend/dto/CalendarGridDTO.php | 2 | ||||
-rw-r--r-- | app/frontend/dto/CalendarGroupDTO.php | 4 | ||||
-rw-r--r-- | app/frontend/dto/EventDTO.php | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/frontend/dto/CalendarGridDTO.php b/app/frontend/dto/CalendarGridDTO.php index c6f1d00..c9a5bf3 100644 --- a/app/frontend/dto/CalendarGridDTO.php +++ b/app/frontend/dto/CalendarGridDTO.php @@ -9,7 +9,7 @@ class CalendarGridDTO { public $DateTo; public $Weeks = []; - public function __construct($events, DateTime $dateFrom, DateTime $dateTo) { + public function __construct(array $events, DateTime $dateFrom, DateTime $dateTo) { $this->DateFrom = DateTimeImmutable::createFromMutable($dateFrom); $this->DateTo = DateTimeImmutable::createFromMutable($dateTo); $date = $this->DateFrom; diff --git a/app/frontend/dto/CalendarGroupDTO.php b/app/frontend/dto/CalendarGroupDTO.php index a607826..cba1623 100644 --- a/app/frontend/dto/CalendarGroupDTO.php +++ b/app/frontend/dto/CalendarGroupDTO.php @@ -19,14 +19,14 @@ class CalendarGroupDTO extends BaseDTO { $this->ID = $categoryRecord->ID; $this->Priority = $categoryRecord->Priority; $this->Calendars = array_map( - function($calendarRecord) { + function(Calendar $calendarRecord) { $dto = new CalendarDTO(); $dto->loadRecord($calendarRecord); return $dto; }, array_filter( $calendars, - function($calendarRecord) use($categoryRecord) { + function(Calendar $calendarRecord) use($categoryRecord) { return $categoryRecord->ID == $calendarRecord->CategoryID; } ) diff --git a/app/frontend/dto/EventDTO.php b/app/frontend/dto/EventDTO.php index 9af06e4..13262bb 100644 --- a/app/frontend/dto/EventDTO.php +++ b/app/frontend/dto/EventDTO.php @@ -67,7 +67,7 @@ class EventDTO extends BaseDTO { $calendars = array_filter( $calendars, - function ($calendar) use($event) { + function (Calendar $calendar) use($event) { return $calendar->UID == $event->CalendarID; } ); |