@@ -136,7 +136,7 @@ |
||
| 136 | 136 | */ |
| 137 | 137 | protected function nl2br($string) |
| 138 | 138 | { |
| 139 | - $string = nl2br((string) $string); |
|
| 139 | + $string = nl2br((string)$string); |
|
| 140 | 140 | |
| 141 | 141 | return str_replace('\\n', '<br />', $string); |
| 142 | 142 | } |
@@ -116,6 +116,6 @@ |
||
| 116 | 116 | )); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | - return (array) (new \ICal($absoluteIcalFile))->events(); |
|
| 119 | + return (array)(new \ICal($absoluteIcalFile))->events(); |
|
| 120 | 120 | } |
| 121 | 121 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | // climb thru the events and hide/delete them |
| 69 | 69 | foreach ($events as $event) { |
| 70 | - $uid = (int) $event['foreign_uid']; |
|
| 70 | + $uid = (int)$event['foreign_uid']; |
|
| 71 | 71 | |
| 72 | 72 | $model = $repository->findByUid($uid); |
| 73 | 73 | |
@@ -100,12 +100,12 @@ discard block |
||
| 100 | 100 | protected function processEvent(EventRepository $repository, Event $model, $modus) |
| 101 | 101 | { |
| 102 | 102 | // define the function for the delete-modus. |
| 103 | - $delete = function ($repository, $model) { |
|
| 103 | + $delete = function($repository, $model) { |
|
| 104 | 104 | $repository->remove($model); |
| 105 | 105 | }; |
| 106 | 106 | |
| 107 | 107 | // define the function for the hide-modus. |
| 108 | - $hide = function ($repository, $model) { |
|
| 108 | + $hide = function($repository, $model) { |
|
| 109 | 109 | $model->setHidden(true); |
| 110 | 110 | $repository->update($model); |
| 111 | 111 | }; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | protected function findOutdatedEvents($tableName, $waitingPeriod) |
| 142 | 142 | { |
| 143 | 143 | // calculate the waiting time |
| 144 | - $interval = 'P' . (int) $waitingPeriod . 'D'; |
|
| 144 | + $interval = 'P' . (int)$waitingPeriod . 'D'; |
|
| 145 | 145 | $now = DateTimeUtility::getNow(); |
| 146 | 146 | $now->sub(new \DateInterval($interval)); |
| 147 | 147 | |
@@ -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 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | public function renderLink($pageUid = null, array $additionalParams = [], $absolute = false) |
| 54 | 54 | { |
| 55 | 55 | $uriBuilder = $this->controllerContext->getUriBuilder(); |
| 56 | - $this->lastHref = (string) $uriBuilder->reset() |
|
| 56 | + $this->lastHref = (string)$uriBuilder->reset() |
|
| 57 | 57 | ->setTargetPageUid($pageUid) |
| 58 | 58 | ->setArguments($additionalParams) |
| 59 | 59 | ->setCreateAbsoluteUri($absolute) |
@@ -80,17 +80,17 @@ discard block |
||
| 80 | 80 | protected function getPageUid($pageUid, $contextName = null) |
| 81 | 81 | { |
| 82 | 82 | if (MathUtility::canBeInterpretedAsInteger($pageUid) && $pageUid > 0) { |
| 83 | - return (int) $pageUid; |
|
| 83 | + return (int)$pageUid; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | // by settings |
| 87 | 87 | if ($contextName && $this->templateVariableContainer->exists('settings')) { |
| 88 | 88 | $settings = $this->templateVariableContainer->get('settings'); |
| 89 | 89 | if (isset($settings[$contextName]) && MathUtility::canBeInterpretedAsInteger($settings[$contextName])) { |
| 90 | - return (int) $settings[$contextName]; |
|
| 90 | + return (int)$settings[$contextName]; |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - return (int) $GLOBALS['TSFE']->id; |
|
| 94 | + return (int)$GLOBALS['TSFE']->id; |
|
| 95 | 95 | } |
| 96 | 96 | } |
@@ -253,12 +253,12 @@ discard block |
||
| 253 | 253 | } elseif (MathUtility::canBeInterpretedAsInteger($year)) { |
| 254 | 254 | $indices = $this->indexRepository->findYear($year); |
| 255 | 255 | } else { |
| 256 | - $overrideStartDate = (int) $this->settings['overrideStartdate']; |
|
| 257 | - $overrideEndDate = (int) $this->settings['overrideEnddate']; |
|
| 256 | + $overrideStartDate = (int)$this->settings['overrideStartdate']; |
|
| 257 | + $overrideEndDate = (int)$this->settings['overrideEnddate']; |
|
| 258 | 258 | $indices = $this->indexRepository->findList( |
| 259 | - (int) $this->settings['limit'], |
|
| 259 | + (int)$this->settings['limit'], |
|
| 260 | 260 | $this->settings['listStartTime'], |
| 261 | - (int) $this->settings['listStartTimeOffsetHours'], |
|
| 261 | + (int)$this->settings['listStartTimeOffsetHours'], |
|
| 262 | 262 | $overrideStartDate, |
| 263 | 263 | $overrideEndDate |
| 264 | 264 | ); |
@@ -335,8 +335,8 @@ discard block |
||
| 335 | 335 | if ($week === null) { |
| 336 | 336 | $week = $now->format('W'); |
| 337 | 337 | } |
| 338 | - $weekStart = (int) $this->settings['weekStart']; |
|
| 339 | - $firstDay = DateTimeUtility::convertWeekYear2DayMonthYear((int) $week, $year, $weekStart); |
|
| 338 | + $weekStart = (int)$this->settings['weekStart']; |
|
| 339 | + $firstDay = DateTimeUtility::convertWeekYear2DayMonthYear((int)$week, $year, $weekStart); |
|
| 340 | 340 | $timezone = DateTimeUtility::getTimeZone(); |
| 341 | 341 | $firstDay->setTimezone($timezone); |
| 342 | 342 | $firstDay->setTime(0, 0, 0); |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | if ($index === null) { |
| 397 | 397 | // handle fallback for "strange language settings" |
| 398 | 398 | if ($this->request->hasArgument('index')) { |
| 399 | - $indexId = (int) $this->request->getArgument('index'); |
|
| 399 | + $indexId = (int)$this->request->getArgument('index'); |
|
| 400 | 400 | if ($indexId > 0) { |
| 401 | 401 | $index = $this->indexRepository->findByUid($indexId); |
| 402 | 402 | } |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | |
| 405 | 405 | if ($index === null) { |
| 406 | 406 | if (!MathUtility::canBeInterpretedAsInteger($this->settings['listPid'])) { |
| 407 | - return (string) TranslateUtility::get('noEventDetailView'); |
|
| 407 | + return (string)TranslateUtility::get('noEventDetailView'); |
|
| 408 | 408 | } |
| 409 | 409 | $this->slottedRedirect(__CLASS__, __FUNCTION__ . 'noEvent'); |
| 410 | 410 | } |