@@ -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; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $actions = $this->flexFormService->get('switchableControllerActions', 'main'); |
| 68 | 68 | $parts = GeneralUtility::trimExplode(';', $actions, true); |
| 69 | - $parts = array_map(function ($element) { |
|
| 69 | + $parts = array_map(function($element) { |
|
| 70 | 70 | $split = explode('->', $element); |
| 71 | 71 | |
| 72 | 72 | return ucfirst($split[1]); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | $this->layoutService->addRow(TranslateUtility::get('mode'), TranslateUtility::get('mode.' . $actionKey)); |
| 77 | 77 | |
| 78 | - $pluginConfiguration = (int) $this->flexFormService->get('settings.pluginConfiguration', 'main'); |
|
| 78 | + $pluginConfiguration = (int)$this->flexFormService->get('settings.pluginConfiguration', 'main'); |
|
| 79 | 79 | if ($pluginConfiguration) { |
| 80 | 80 | $table = 'tx_calendarize_domain_model_pluginconfiguration'; |
| 81 | 81 | $row = HelperUtility::getDatabaseConnection()->exec_SELECTgetSingleRow( |
@@ -96,14 +96,14 @@ discard block |
||
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - if ((bool) $this->flexFormService->get('settings.hidePagination', 'main')) { |
|
| 99 | + if ((bool)$this->flexFormService->get('settings.hidePagination', 'main')) { |
|
| 100 | 100 | $this->layoutService->addRow(TranslateUtility::get('hide.pagination.teaser'), '!!!'); |
| 101 | 101 | } |
| 102 | - $overrideStartDate = (int) $this->flexFormService->get('settings.overrideStartdate', 'main'); |
|
| 102 | + $overrideStartDate = (int)$this->flexFormService->get('settings.overrideStartdate', 'main'); |
|
| 103 | 103 | if ($overrideStartDate) { |
| 104 | 104 | $this->layoutService->addRow('OverrideStartdate', date('d.m.y H:i', $overrideStartDate)); |
| 105 | 105 | } |
| 106 | - $overrideEndDate = (int) $this->flexFormService->get('settings.overrideEnddate', 'main'); |
|
| 106 | + $overrideEndDate = (int)$this->flexFormService->get('settings.overrideEnddate', 'main'); |
|
| 107 | 107 | if ($overrideEndDate) { |
| 108 | 108 | $this->layoutService->addRow('OverrideEndDate', date('d.m.y H:i', $overrideEndDate)); |
| 109 | 109 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | 'bookingPid', |
| 129 | 129 | ]; |
| 130 | 130 | foreach ($pageIdsNames as $pageIdName) { |
| 131 | - $pageId = (int) $this->flexFormService->get('settings.' . $pageIdName, 'pages'); |
|
| 131 | + $pageId = (int)$this->flexFormService->get('settings.' . $pageIdName, 'pages'); |
|
| 132 | 132 | $pageRow = BackendUtility::getRecord('pages', $pageId); |
| 133 | 133 | if ($pageRow) { |
| 134 | 134 | $this->layoutService->addRow( |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | 'tablenames="tt_content" AND uid_foreign=' . $additionalSlotArguments['contentRecord']['uid'] |
| 102 | 102 | ); |
| 103 | 103 | foreach ($rows as $row) { |
| 104 | - $categoryIds[] = (int) $row['uid_local']; |
|
| 104 | + $categoryIds[] = (int)$row['uid_local']; |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | 'tablenames="' . $this->tableName . '" AND uid_local IN (' . implode(',', $categoryIds) . ')' |
| 125 | 125 | ); |
| 126 | 126 | foreach ($rows as $row) { |
| 127 | - $indexIds[] = (int) $row['uid_foreign']; |
|
| 127 | + $indexIds[] = (int)$row['uid_foreign']; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | return [ |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | $db = HelperUtility::getDatabaseConnection(); |
| 32 | 32 | |
| 33 | - $selectWhere = 'tablenames = \'tx_cal_event\' AND uid_foreign = ' . (int) $event['uid']; |
|
| 33 | + $selectWhere = 'tablenames = \'tx_cal_event\' AND uid_foreign = ' . (int)$event['uid']; |
|
| 34 | 34 | $query = $db->SELECTquery('*', 'sys_file_reference', $selectWhere); |
| 35 | 35 | $selectResults = $db->admin_query($query); |
| 36 | 36 | $dbQueries[] = $query; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | foreach ($selectResults as $selectResult) { |
| 39 | 39 | $updateWhere = ' import_id = \'' . CalMigrationUpdate::IMPORT_PREFIX . $selectResult['uid'] . '\''; |
| 40 | 40 | $fieldValues = [ |
| 41 | - 'uid_foreign' => (int) $recordId, |
|
| 41 | + 'uid_foreign' => (int)$recordId, |
|
| 42 | 42 | 'tablenames' => $table, |
| 43 | 43 | ]; |
| 44 | 44 | |
@@ -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 | } |