@@ -36,8 +36,8 @@ |
||
36 | 36 | $dateClone->modify('first day of this month'); |
37 | 37 | |
38 | 38 | $monthCheck = $dateClone->format('m'); |
39 | - while ((int) $monthCheck == (int) $dateClone->format('m')) { |
|
40 | - $week = (int) $dateClone->format('W'); |
|
39 | + while ((int)$monthCheck == (int)$dateClone->format('m')) { |
|
40 | + $week = (int)$dateClone->format('W'); |
|
41 | 41 | if (!isset($weeks[$week])) { |
42 | 42 | $weeks[$week] = [ |
43 | 43 | 'week' => $week, |
@@ -46,6 +46,6 @@ |
||
46 | 46 | ) { |
47 | 47 | $indexRepository = $this->objectManager->get(IndexRepository::class); |
48 | 48 | |
49 | - return $indexRepository->findByTraversing($index, $future, $past, (int) $limit, $sort, $useIndexTime); |
|
49 | + return $indexRepository->findByTraversing($index, $future, $past, (int)$limit, $sort, $useIndexTime); |
|
50 | 50 | } |
51 | 51 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function render(Index $index, $pageUid = null, $absolute = false) |
25 | 25 | { |
26 | - parent::render($index, $pageUid, (bool) $absolute); |
|
26 | + parent::render($index, $pageUid, (bool)$absolute); |
|
27 | 27 | |
28 | 28 | return $this->lastHref; |
29 | 29 | } |
@@ -29,6 +29,6 @@ |
||
29 | 29 | ], |
30 | 30 | ]; |
31 | 31 | |
32 | - return parent::renderLink($this->getPageUid($pageUid, 'detailPid'), $additionalParams, (bool) $absolute); |
|
32 | + return parent::renderLink($this->getPageUid($pageUid, 'detailPid'), $additionalParams, (bool)$absolute); |
|
33 | 33 | } |
34 | 34 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public function renderLink($pageUid = null, array $additionalParams = [], $absolute = false) |
55 | 55 | { |
56 | 56 | $uriBuilder = $this->controllerContext->getUriBuilder(); |
57 | - $this->lastHref = (string) $uriBuilder->reset() |
|
57 | + $this->lastHref = (string)$uriBuilder->reset() |
|
58 | 58 | ->setTargetPageUid($pageUid) |
59 | 59 | ->setArguments($additionalParams) |
60 | 60 | ->setCreateAbsoluteUri($absolute) |
@@ -81,17 +81,17 @@ discard block |
||
81 | 81 | protected function getPageUid($pageUid, $contextName = null) |
82 | 82 | { |
83 | 83 | if (MathUtility::canBeInterpretedAsInteger($pageUid)) { |
84 | - return (int) $pageUid; |
|
84 | + return (int)$pageUid; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | // by settings |
88 | 88 | if ($contextName && $this->templateVariableContainer->exists('settings')) { |
89 | 89 | $settings = $this->templateVariableContainer->get('settings'); |
90 | 90 | if (isset($settings[$contextName]) && MathUtility::canBeInterpretedAsInteger($settings[$contextName])) { |
91 | - return (int) $settings[$contextName]; |
|
91 | + return (int)$settings[$contextName]; |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
95 | - return (int) $GLOBALS['TSFE']->id; |
|
95 | + return (int)$GLOBALS['TSFE']->id; |
|
96 | 96 | } |
97 | 97 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | protected static function loadConfiguration() |
38 | 38 | { |
39 | 39 | if (self::$configuration === null) { |
40 | - self::$configuration = (array) unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['calendarize']); |
|
40 | + self::$configuration = (array)unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['calendarize']); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | } |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public static function getDaySecondsOfDateTime(\DateTime $dateTime) |
89 | 89 | { |
90 | - $hours = (int) $dateTime->format('G'); |
|
91 | - $minutes = $hours * self::SECONDS_MINUTE + (int) $dateTime->format('i'); |
|
90 | + $hours = (int)$dateTime->format('G'); |
|
91 | + $minutes = $hours * self::SECONDS_MINUTE + (int)$dateTime->format('i'); |
|
92 | 92 | |
93 | - return $minutes * self::SECONDS_MINUTE + (int) $dateTime->format('s'); |
|
93 | + return $minutes * self::SECONDS_MINUTE + (int)$dateTime->format('s'); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | { |
174 | 174 | // NOTE that new \DateTime('@timestamp') does NOT work - @see comment in normalizeDateTimeSingle() |
175 | 175 | // So we create a date string with timezone information first, and a \DateTime in the current server timezone then. |
176 | - return new \DateTime(date(\DateTime::ATOM, (int) $GLOBALS['SIM_ACCESS_TIME'])); |
|
176 | + return new \DateTime(date(\DateTime::ATOM, (int)$GLOBALS['SIM_ACCESS_TIME'])); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | foreach ($events as $event) { |
126 | 126 | $calendarizeEventRecord = [ |
127 | 127 | 'pid' => $event['pid'], |
128 | - 'import_id' => self::IMPORT_PREFIX . (int) $event['uid'], |
|
128 | + 'import_id' => self::IMPORT_PREFIX . (int)$event['uid'], |
|
129 | 129 | 'tstamp' => $event['tstamp'], |
130 | 130 | 'crdate' => $event['crdate'], |
131 | 131 | 'hidden' => $event['hidden'], |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | foreach ($selectResults as $group) { |
244 | 244 | $importId = explode(':', $group['import_id']); |
245 | - $groupId = (int) $importId[1]; |
|
245 | + $groupId = (int)$importId[1]; |
|
246 | 246 | |
247 | 247 | $variables = [ |
248 | 248 | 'table' => 'tx_cal_exception_event_mm', |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | $dbQueries[] = $selectQuery; |
257 | 257 | |
258 | 258 | foreach ($selectResults as $eventUid) { |
259 | - $eventImportId = self::IMPORT_PREFIX . (int) $eventUid['uid_local']; |
|
259 | + $eventImportId = self::IMPORT_PREFIX . (int)$eventUid['uid_local']; |
|
260 | 260 | $configurationRow = [ |
261 | - 'pid' => (int) $group['pid'], |
|
261 | + 'pid' => (int)$group['pid'], |
|
262 | 262 | 'tstamp' => $now->getTimestamp(), |
263 | 263 | 'crdate' => $now->getTimestamp(), |
264 | 264 | 'type' => 'group', |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | if ($configurationRow) { |
289 | 289 | $configurationRow['groups'] = $this->addValueToCsv($configurationRow['groups'], $configuration['groups']); |
290 | 290 | |
291 | - $updateWhere = 'uid = ' . (int) $configurationRow['uid']; |
|
291 | + $updateWhere = 'uid = ' . (int)$configurationRow['uid']; |
|
292 | 292 | unset($configurationRow['uid']); |
293 | 293 | $updateQuery = $db->UPDATEquery(self::CONFIGURATION_TABLE, $updateWhere, $configurationRow); |
294 | 294 | $results = $db->admin_query($updateQuery); |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | |
362 | 362 | $variables = [ |
363 | 363 | 'table' => self::EVENT_TABLE, |
364 | - 'eventId' => (int) $eventId, |
|
364 | + 'eventId' => (int)$eventId, |
|
365 | 365 | 'values' => $values, |
366 | 366 | 'dbQueries' => $dbQueries, |
367 | 367 | ]; |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $dispatcher = HelperUtility::getSignalSlotDispatcher(); |
370 | 370 | $variables = $dispatcher->dispatch(__CLASS__, __FUNCTION__, $variables); |
371 | 371 | |
372 | - $updateWhere = 'uid = ' . (int) $eventId; |
|
372 | + $updateWhere = 'uid = ' . (int)$eventId; |
|
373 | 373 | unset($values['uid']); |
374 | 374 | $updateQuery = $db->UPDATEquery($variables['table'], $updateWhere, $variables['values']); |
375 | 375 | $updateResults = $db->admin_query($updateQuery); |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | 'dbQueries' => $dbQueries, |
461 | 461 | ]; |
462 | 462 | |
463 | - $mmWhere = 'uid_local = ' . (int) $groupId; |
|
463 | + $mmWhere = 'uid_local = ' . (int)$groupId; |
|
464 | 464 | $mmQuery = $db->SELECTquery('*', $variables['table'], $mmWhere); |
465 | 465 | $mmResults = $db->admin_query($mmQuery); |
466 | 466 | $dbQueries[] = $mmQuery; |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | 'dbQueries' => $dbQueries, |
472 | 472 | ]; |
473 | 473 | |
474 | - $selectWhere = 'uid = ' . (int) $mmResult['uid_foreign']; |
|
474 | + $selectWhere = 'uid = ' . (int)$mmResult['uid_foreign']; |
|
475 | 475 | $selectQuery = $db->SELECTquery('*', $variables['table'], $selectWhere); |
476 | 476 | $selectResults = $db->admin_query($selectQuery); |
477 | 477 | $dbQueries[] = $selectQuery; |
@@ -485,13 +485,13 @@ discard block |
||
485 | 485 | 'handling' => 'include', |
486 | 486 | 'start_date' => $this->migrateDate($selectResult['start_date']), |
487 | 487 | 'end_date' => $this->migrateDate($selectResult['end_date']), |
488 | - 'start_time' => (int) $selectResult['start_time'], |
|
489 | - 'end_time' => (int) $selectResult['end_time'], |
|
488 | + 'start_time' => (int)$selectResult['start_time'], |
|
489 | + 'end_time' => (int)$selectResult['end_time'], |
|
490 | 490 | 'all_day' => ($selectResult['start_time'] == null && $selectResult['end_time'] == null) ? 1 : 0, |
491 | 491 | 'frequency' => $this->mapFrequency($selectResult['freq']), |
492 | 492 | 'till_date' => $this->migrateDate($selectResult['until']), |
493 | - 'counter_amount' => (int) $selectResult['cnt'], |
|
494 | - 'counter_interval' => (int) $selectResult['interval'], |
|
493 | + 'counter_amount' => (int)$selectResult['cnt'], |
|
494 | + 'counter_interval' => (int)$selectResult['interval'], |
|
495 | 495 | 'import_id' => self::IMPORT_PREFIX . $selectResult['uid'], |
496 | 496 | ]; |
497 | 497 | |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | $query = $db->INSERTquery($variables['table'], $variables['configurationRow']); |
507 | 507 | $db->admin_query($query); |
508 | 508 | $dbQueries[] = $query; |
509 | - $recordIds[] = (int) $db->sql_insert_id(); |
|
509 | + $recordIds[] = (int)$db->sql_insert_id(); |
|
510 | 510 | } |
511 | 511 | } |
512 | 512 | |
@@ -622,8 +622,8 @@ discard block |
||
622 | 622 | 'l10n_parent' => $category['l18n_parent'], |
623 | 623 | 'l10n_diffsource' => $category['l18n_diffsource'], |
624 | 624 | 'title' => $category['title'], |
625 | - 'parent' => (int) $category['parent_category'], |
|
626 | - 'import_id' => self::IMPORT_PREFIX . (int) $category['uid'], |
|
625 | + 'parent' => (int)$category['parent_category'], |
|
626 | + 'import_id' => self::IMPORT_PREFIX . (int)$category['uid'], |
|
627 | 627 | 'sorting' => $category['sorting'], |
628 | 628 | ]; |
629 | 629 | |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | foreach ($selectResults as $sysCategory) { |
648 | 648 | // update parent, because there are just the old uids |
649 | 649 | $updateRecord = [ |
650 | - 'parent' => $this->getSysCategoryParentUid(self::IMPORT_PREFIX . (int) $sysCategory['parent']), |
|
650 | + 'parent' => $this->getSysCategoryParentUid(self::IMPORT_PREFIX . (int)$sysCategory['parent']), |
|
651 | 651 | ]; |
652 | 652 | $query = $db->UPDATEquery('sys_category', 'uid = ' . $sysCategory['uid'], $updateRecord); |
653 | 653 | $db->admin_query($query); |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | $dbQueries[] = $selectQuery; |
673 | 673 | |
674 | 674 | $result = $db->sql_fetch_assoc($selectResults); |
675 | - $uid = (int) $result['uid']; |
|
675 | + $uid = (int)$result['uid']; |
|
676 | 676 | |
677 | 677 | return $uid; |
678 | 678 | } |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | $dbQueries[] = $selectQuery; |
752 | 752 | |
753 | 753 | $result = $db->sql_fetch_assoc($selectResults); |
754 | - $uid = (int) $result['uid']; |
|
754 | + $uid = (int)$result['uid']; |
|
755 | 755 | |
756 | 756 | return $uid; |
757 | 757 | } |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | $dbQueries[] = $selectQuery; |
787 | 787 | |
788 | 788 | $result = $db->sql_fetch_assoc($selectResults); |
789 | - $uid = (int) $result['uid']; |
|
789 | + $uid = (int)$result['uid']; |
|
790 | 790 | |
791 | 791 | return $uid; |
792 | 792 | } |
@@ -813,8 +813,8 @@ discard block |
||
813 | 813 | 'all_day' => $calEventRow['allday'], |
814 | 814 | 'frequency' => $this->mapFrequency($calEventRow['freq']), |
815 | 815 | 'till_date' => $this->migrateDate($calEventRow['until']), |
816 | - 'counter_amount' => (int) $calEventRow['cnt'], |
|
817 | - 'counter_interval' => (int) $calEventRow['interval'], |
|
816 | + 'counter_amount' => (int)$calEventRow['cnt'], |
|
817 | + 'counter_interval' => (int)$calEventRow['interval'], |
|
818 | 818 | ]; |
819 | 819 | |
820 | 820 | $variables = [ |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | |
915 | 915 | foreach ($events as $event) { |
916 | 916 | $checkImportIds[] = '"' . self::IMPORT_PREFIX . $event['uid'] . '"'; |
917 | - $nonMigrated[(int) $event['uid']] = (int) $event['uid']; |
|
917 | + $nonMigrated[(int)$event['uid']] = (int)$event['uid']; |
|
918 | 918 | } |
919 | 919 | |
920 | 920 | $countOriginal = count($checkImportIds); |
@@ -936,7 +936,7 @@ discard block |
||
936 | 936 | ); |
937 | 937 | |
938 | 938 | foreach ($migratedRows as $migratedRow) { |
939 | - $importId = (int) str_replace(self::IMPORT_PREFIX, '', $migratedRow['import_id']); |
|
939 | + $importId = (int)str_replace(self::IMPORT_PREFIX, '', $migratedRow['import_id']); |
|
940 | 940 | if (isset($nonMigrated[$importId])) { |
941 | 941 | unset($nonMigrated[$importId]); |
942 | 942 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | $configuration = $this->getConfiguration(); |
29 | - $timeShift = isset($configuration['timeShift']) ? (int) $configuration['timeShift'] : 0; |
|
29 | + $timeShift = isset($configuration['timeShift']) ? (int)$configuration['timeShift'] : 0; |
|
30 | 30 | if ($timeShift <= 0) { |
31 | 31 | // shift is disabled |
32 | 32 | return; |