@@ -21,7 +21,7 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * Build the timetable for the given configuration matrix (sorted). |
| 23 | 23 | * |
| 24 | - * @param array $ids |
|
| 24 | + * @param integer[] $ids |
|
| 25 | 25 | * |
| 26 | 26 | * @return array |
| 27 | 27 | */ |
@@ -174,7 +174,7 @@ |
||
| 174 | 174 | } |
| 175 | 175 | /** @var \DateTime $base */ |
| 176 | 176 | $base = clone $record[$position . '_date']; |
| 177 | - if (\is_int($record[$position . '_time']) && (int) $record[$position . '_time'] > 0) { |
|
| 177 | + if (\is_int($record[$position . '_time']) && (int)$record[$position . '_time'] > 0) { |
|
| 178 | 178 | // Fix handling, if the time field contains a complete timestamp |
| 179 | 179 | $seconds = $record[$position . '_time'] % DateTimeUtility::SECONDS_DAY; |
| 180 | 180 | $base->setTime(0, 0, 0); |
@@ -35,6 +35,6 @@ |
||
| 35 | 35 | ], |
| 36 | 36 | ]; |
| 37 | 37 | |
| 38 | - return parent::renderLink($this->getPageUid($this->arguments['pageUid'], 'detailPid'), $additionalParams, (bool) $this->arguments['absolute']); |
|
| 38 | + return parent::renderLink($this->getPageUid($this->arguments['pageUid'], 'detailPid'), $additionalParams, (bool)$this->arguments['absolute']); |
|
| 39 | 39 | } |
| 40 | 40 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $this->arguments['index'], |
| 53 | 53 | $this->arguments['future'], |
| 54 | 54 | $this->arguments['past'], |
| 55 | - (int) $this->arguments['limit'], |
|
| 55 | + (int)$this->arguments['limit'], |
|
| 56 | 56 | $this->arguments['sort'], |
| 57 | 57 | $this->arguments['useIndexTime'] |
| 58 | 58 | ); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | protected function getItems(\DateTime $date) |
| 23 | 23 | { |
| 24 | 24 | $months = []; |
| 25 | - $date->setDate((int) $date->format('Y'), (int) $date->format('n'), 1); |
|
| 25 | + $date->setDate((int)$date->format('Y'), (int)$date->format('n'), 1); |
|
| 26 | 26 | for ($i = 0; $i < 12; ++$i) { |
| 27 | 27 | $months[$date->format('n')] = [ |
| 28 | 28 | 'week' => $date->format('n'), |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | $dateClone->modify('first day of this month'); |
| 39 | 39 | |
| 40 | 40 | $monthCheck = $dateClone->format('m'); |
| 41 | - while ((int) $monthCheck === (int) $dateClone->format('m')) { |
|
| 42 | - $week = (int) $dateClone->format('W'); |
|
| 41 | + while ((int)$monthCheck === (int)$dateClone->format('m')) { |
|
| 42 | + $week = (int)$dateClone->format('W'); |
|
| 43 | 43 | if (!isset($weeks[$week])) { |
| 44 | 44 | $weeks[$week] = [ |
| 45 | 45 | 'week' => $week, |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function render() |
| 32 | 32 | { |
| 33 | - $content = null === $this->arguments['content'] || '' === \trim((string) $this->arguments['content']) ? $this->renderChildren() : $this->arguments['content']; |
|
| 33 | + $content = null === $this->arguments['content'] || '' === \trim((string)$this->arguments['content']) ? $this->renderChildren() : $this->arguments['content']; |
|
| 34 | 34 | |
| 35 | 35 | return GeneralUtility::quoteJSvalue($content); |
| 36 | 36 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | if ('' === $id && '' === $name) { |
| 35 | 35 | return ''; |
| 36 | 36 | } |
| 37 | - $times = $this->getTimes((int) $params['pid']); |
|
| 37 | + $times = $this->getTimes((int)$params['pid']); |
|
| 38 | 38 | if (!$times) { |
| 39 | 39 | return ''; |
| 40 | 40 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | $previewLimit = 10; |
| 36 | 36 | if (isset($configuration['fieldConf']['config']['items'])) { |
| 37 | - $previewLimit = (int) $configuration['fieldConf']['config']['items']; |
|
| 37 | + $previewLimit = (int)$configuration['fieldConf']['config']['items']; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | $indexService = GeneralUtility::makeInstance(IndexerService::class); |
@@ -77,13 +77,13 @@ discard block |
||
| 77 | 77 | $items = []; |
| 78 | 78 | foreach ($events as $event) { |
| 79 | 79 | $startDateStamp = $event['start_date'] instanceof \DateTimeInterface ? $event['start_date']->getTimestamp() : $event['start_date']; |
| 80 | - $startDate = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int) $startDateStamp); |
|
| 80 | + $startDate = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int)$startDateStamp); |
|
| 81 | 81 | $endDateStamp = $event['end_date'] instanceof \DateTimeInterface ? $event['end_date']->getTimestamp() : $event['end_date']; |
| 82 | - $endDate = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int) $endDateStamp); |
|
| 82 | + $endDate = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int)$endDateStamp); |
|
| 83 | 83 | $entry = $startDate . ' - ' . $endDate; |
| 84 | 84 | if (!$event['all_day']) { |
| 85 | 85 | $start = BackendUtility::time($event['start_time'] % DateTimeUtility::SECONDS_DAY, false); |
| 86 | - if (AbstractTimeTable::DAY_END === (int) $event['end_time']) { |
|
| 86 | + if (AbstractTimeTable::DAY_END === (int)$event['end_time']) { |
|
| 87 | 87 | $end = '"' . TranslateUtility::get('openEndTime') . '"'; |
| 88 | 88 | } else { |
| 89 | 89 | $end = BackendUtility::time($event['end_time'] % DateTimeUtility::SECONDS_DAY, false); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | // clone and reset and move to next month |
| 68 | 68 | $dateTime = clone $date; |
| 69 | - $dateTime->setDate((int) $dateTime->format('Y'), (int) $dateTime->format('m'), 1); |
|
| 69 | + $dateTime->setDate((int)$dateTime->format('Y'), (int)$dateTime->format('m'), 1); |
|
| 70 | 70 | $dateTime->modify($modify); |
| 71 | 71 | |
| 72 | 72 | $days = $this->getValidDays($day); |
@@ -162,15 +162,15 @@ discard block |
||
| 162 | 162 | protected function findDayInCurrentMonth(\DateTime $dateTime, string $direction, array $validDays, int $position = 1) |
| 163 | 163 | { |
| 164 | 164 | if (self::DIRECTION_UP === $direction) { |
| 165 | - $dateTime->setDate((int) $dateTime->format('Y'), (int) $dateTime->format('m'), 1); |
|
| 165 | + $dateTime->setDate((int)$dateTime->format('Y'), (int)$dateTime->format('m'), 1); |
|
| 166 | 166 | $modify = '+1 day'; |
| 167 | 167 | } else { |
| 168 | - $dateTime->setDate((int) $dateTime->format('Y'), (int) $dateTime->format('m'), (int) $dateTime->format('t')); |
|
| 168 | + $dateTime->setDate((int)$dateTime->format('Y'), (int)$dateTime->format('m'), (int)$dateTime->format('t')); |
|
| 169 | 169 | $modify = '-1 day'; |
| 170 | 170 | } |
| 171 | 171 | $validMonth = $dateTime->format('Y-m'); |
| 172 | 172 | while ($dateTime->format('Y-m') === $validMonth) { |
| 173 | - if (\in_array((int) $dateTime->format('N'), $validDays, true)) { |
|
| 173 | + if (\in_array((int)$dateTime->format('N'), $validDays, true)) { |
|
| 174 | 174 | --$position; |
| 175 | 175 | if (0 === $position) { |
| 176 | 176 | return $dateTime; |