@@ -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; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | if (null === $configuration) { |
| 115 | 115 | throw new Exception('No valid configuration for the current index: ' . $this->getUniqueRegisterKey(), 123678123); |
| 116 | 116 | } |
| 117 | - $this->originalObject = EventUtility::getOriginalRecordByConfiguration($configuration, (int) $this->getForeignUid()); |
|
| 117 | + $this->originalObject = EventUtility::getOriginalRecordByConfiguration($configuration, (int)$this->getForeignUid()); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | return $this->originalObject; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | */ |
| 246 | 246 | public function isAllDay() |
| 247 | 247 | { |
| 248 | - return (bool) $this->allDay; |
|
| 248 | + return (bool)$this->allDay; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | /** |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | */ |
| 275 | 275 | public function getFeedTitle(): string |
| 276 | 276 | { |
| 277 | - return (string) $this->getTitle(); |
|
| 277 | + return (string)$this->getTitle(); |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | /** |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | */ |
| 285 | 285 | public function getFeedAbstract(): string |
| 286 | 286 | { |
| 287 | - return (string) $this->getFeedContent(); |
|
| 287 | + return (string)$this->getFeedContent(); |
|
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | /** |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | */ |
| 295 | 295 | public function getFeedContent(): string |
| 296 | 296 | { |
| 297 | - return (string) $this->getDescription(); |
|
| 297 | + return (string)$this->getDescription(); |
|
| 298 | 298 | } |
| 299 | 299 | |
| 300 | 300 | /** |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | public function getFeedLocation(): string |
| 306 | 306 | { |
| 307 | - return (string) $this->getLocation(); |
|
| 307 | + return (string)$this->getLocation(); |
|
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | /** |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | */ |
| 315 | 315 | public function getRealUrlAliasBase(): string |
| 316 | 316 | { |
| 317 | - return (string) $this->getTitle(); |
|
| 317 | + return (string)$this->getTitle(); |
|
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | /** |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | */ |
| 367 | 367 | public function getKeSearchTitle(Index $index): string |
| 368 | 368 | { |
| 369 | - return (string) $this->getTitle() . ' - ' . $index->getStartDate() |
|
| 369 | + return (string)$this->getTitle() . ' - ' . $index->getStartDate() |
|
| 370 | 370 | ->format('d.m.Y'); |
| 371 | 371 | } |
| 372 | 372 | |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | */ |
| 380 | 380 | public function getKeSearchAbstract(Index $index): string |
| 381 | 381 | { |
| 382 | - return (string) $this->getDescription(); |
|
| 382 | + return (string)$this->getDescription(); |
|
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | /** |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | */ |
| 392 | 392 | public function getKeSearchContent(Index $index): string |
| 393 | 393 | { |
| 394 | - return (string) $this->getDescription(); |
|
| 394 | + return (string)$this->getDescription(); |
|
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | /** |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | 'tablenames="tt_content" AND uid_foreign=' . $additionalSlotArguments['contentRecord']['uid'] |
| 107 | 107 | ); |
| 108 | 108 | foreach ($rows as $row) { |
| 109 | - $categoryIds[] = (int) $row['uid_local']; |
|
| 109 | + $categoryIds[] = (int)$row['uid_local']; |
|
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | 'tablenames="' . $this->tableName . '" AND uid_local IN (' . \implode(',', $categoryIds) . ')' |
| 130 | 130 | ); |
| 131 | 131 | foreach ($rows as $row) { |
| 132 | - $indexIds[] = (int) $row['uid_foreign']; |
|
| 132 | + $indexIds[] = (int)$row['uid_foreign']; |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | return [ |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | */ |
| 139 | 139 | protected function nl2br($string) |
| 140 | 140 | { |
| 141 | - $string = \nl2br((string) $string); |
|
| 141 | + $string = \nl2br((string)$string); |
|
| 142 | 142 | |
| 143 | 143 | return \str_replace('\\n', '<br />', $string); |
| 144 | 144 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | foreach ($events as $event) { |
| 127 | 127 | $calendarizeEventRecord = [ |
| 128 | 128 | 'pid' => $event['pid'], |
| 129 | - 'import_id' => self::IMPORT_PREFIX . (int) $event['uid'], |
|
| 129 | + 'import_id' => self::IMPORT_PREFIX . (int)$event['uid'], |
|
| 130 | 130 | 'tstamp' => $event['tstamp'], |
| 131 | 131 | 'crdate' => $event['crdate'], |
| 132 | 132 | 'hidden' => $event['hidden'], |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | |
| 244 | 244 | foreach ($selectResults as $group) { |
| 245 | 245 | $importId = \explode(':', $group['import_id']); |
| 246 | - $groupId = (int) $importId[1]; |
|
| 246 | + $groupId = (int)$importId[1]; |
|
| 247 | 247 | |
| 248 | 248 | $variables = [ |
| 249 | 249 | 'table' => 'tx_cal_exception_event_mm', |
@@ -257,9 +257,9 @@ discard block |
||
| 257 | 257 | $dbQueries[] = $selectQuery; |
| 258 | 258 | |
| 259 | 259 | foreach ($selectResults as $eventUid) { |
| 260 | - $eventImportId = self::IMPORT_PREFIX . (int) $eventUid['uid_local']; |
|
| 260 | + $eventImportId = self::IMPORT_PREFIX . (int)$eventUid['uid_local']; |
|
| 261 | 261 | $configurationRow = [ |
| 262 | - 'pid' => (int) $group['pid'], |
|
| 262 | + 'pid' => (int)$group['pid'], |
|
| 263 | 263 | 'tstamp' => $now->getTimestamp(), |
| 264 | 264 | 'crdate' => $now->getTimestamp(), |
| 265 | 265 | 'type' => 'group', |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | if ($configurationRow) { |
| 385 | 385 | $configurationRow['groups'] = $this->addValueToCsv($configurationRow['groups'], $configuration['groups']); |
| 386 | 386 | |
| 387 | - $updateWhere = 'uid = ' . (int) $configurationRow['uid']; |
|
| 387 | + $updateWhere = 'uid = ' . (int)$configurationRow['uid']; |
|
| 388 | 388 | unset($configurationRow['uid']); |
| 389 | 389 | $updateQuery = $db->UPDATEquery(self::CONFIGURATION_TABLE, $updateWhere, $configurationRow); |
| 390 | 390 | $results = $db->admin_query($updateQuery); |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | |
| 458 | 458 | $variables = [ |
| 459 | 459 | 'table' => self::EVENT_TABLE, |
| 460 | - 'eventId' => (int) $eventId, |
|
| 460 | + 'eventId' => (int)$eventId, |
|
| 461 | 461 | 'values' => $values, |
| 462 | 462 | 'dbQueries' => $dbQueries, |
| 463 | 463 | ]; |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | $dispatcher = HelperUtility::getSignalSlotDispatcher(); |
| 466 | 466 | $variables = $dispatcher->dispatch(__CLASS__, __FUNCTION__, $variables); |
| 467 | 467 | |
| 468 | - $updateWhere = 'uid = ' . (int) $eventId; |
|
| 468 | + $updateWhere = 'uid = ' . (int)$eventId; |
|
| 469 | 469 | unset($values['uid']); |
| 470 | 470 | $updateQuery = $db->UPDATEquery($variables['table'], $updateWhere, $variables['values']); |
| 471 | 471 | $updateResults = $db->admin_query($updateQuery); |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | 'dbQueries' => $dbQueries, |
| 557 | 557 | ]; |
| 558 | 558 | |
| 559 | - $mmWhere = 'uid_local = ' . (int) $groupId; |
|
| 559 | + $mmWhere = 'uid_local = ' . (int)$groupId; |
|
| 560 | 560 | $mmQuery = $db->SELECTquery('*', $variables['table'], $mmWhere); |
| 561 | 561 | $mmResults = $db->admin_query($mmQuery); |
| 562 | 562 | $dbQueries[] = $mmQuery; |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | 'dbQueries' => $dbQueries, |
| 568 | 568 | ]; |
| 569 | 569 | |
| 570 | - $selectWhere = 'uid = ' . (int) $mmResult['uid_foreign']; |
|
| 570 | + $selectWhere = 'uid = ' . (int)$mmResult['uid_foreign']; |
|
| 571 | 571 | $selectQuery = $db->SELECTquery('*', $variables['table'], $selectWhere); |
| 572 | 572 | $selectResults = $db->admin_query($selectQuery); |
| 573 | 573 | $dbQueries[] = $selectQuery; |
@@ -581,13 +581,13 @@ discard block |
||
| 581 | 581 | 'handling' => 'include', |
| 582 | 582 | 'start_date' => $this->migrateDate($selectResult['start_date']), |
| 583 | 583 | 'end_date' => $this->migrateDate($selectResult['end_date']), |
| 584 | - 'start_time' => (int) $selectResult['start_time'], |
|
| 585 | - 'end_time' => (int) $selectResult['end_time'], |
|
| 584 | + 'start_time' => (int)$selectResult['start_time'], |
|
| 585 | + 'end_time' => (int)$selectResult['end_time'], |
|
| 586 | 586 | 'all_day' => (null === $selectResult['start_time'] && null === $selectResult['end_time']) ? 1 : 0, |
| 587 | 587 | 'frequency' => $this->mapFrequency($selectResult['freq']), |
| 588 | 588 | 'till_date' => $this->migrateDate($selectResult['until']), |
| 589 | - 'counter_amount' => (int) $selectResult['cnt'], |
|
| 590 | - 'counter_interval' => (int) $selectResult['interval'], |
|
| 589 | + 'counter_amount' => (int)$selectResult['cnt'], |
|
| 590 | + 'counter_interval' => (int)$selectResult['interval'], |
|
| 591 | 591 | 'import_id' => self::IMPORT_PREFIX . $selectResult['uid'], |
| 592 | 592 | ]; |
| 593 | 593 | |
@@ -602,7 +602,7 @@ discard block |
||
| 602 | 602 | $query = $db->INSERTquery($variables['table'], $variables['configurationRow']); |
| 603 | 603 | $db->admin_query($query); |
| 604 | 604 | $dbQueries[] = $query; |
| 605 | - $recordIds[] = (int) $db->sql_insert_id(); |
|
| 605 | + $recordIds[] = (int)$db->sql_insert_id(); |
|
| 606 | 606 | } |
| 607 | 607 | } |
| 608 | 608 | |
@@ -668,8 +668,8 @@ discard block |
||
| 668 | 668 | 'l10n_parent' => $category['l18n_parent'], |
| 669 | 669 | 'l10n_diffsource' => $category['l18n_diffsource'], |
| 670 | 670 | 'title' => $category['title'], |
| 671 | - 'parent' => (int) $category['parent_category'], |
|
| 672 | - 'import_id' => self::IMPORT_PREFIX . (int) $category['uid'], |
|
| 671 | + 'parent' => (int)$category['parent_category'], |
|
| 672 | + 'import_id' => self::IMPORT_PREFIX . (int)$category['uid'], |
|
| 673 | 673 | 'sorting' => $category['sorting'], |
| 674 | 674 | ]; |
| 675 | 675 | |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | foreach ($selectResults as $sysCategory) { |
| 694 | 694 | // update parent, because there are just the old uids |
| 695 | 695 | $updateRecord = [ |
| 696 | - 'parent' => $this->getSysCategoryParentUid(self::IMPORT_PREFIX . (int) $sysCategory['parent']), |
|
| 696 | + 'parent' => $this->getSysCategoryParentUid(self::IMPORT_PREFIX . (int)$sysCategory['parent']), |
|
| 697 | 697 | ]; |
| 698 | 698 | $query = $db->UPDATEquery('sys_category', 'uid = ' . $sysCategory['uid'], $updateRecord); |
| 699 | 699 | $db->admin_query($query); |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | $dbQueries[] = $selectQuery; |
| 719 | 719 | |
| 720 | 720 | $result = $db->sql_fetch_assoc($selectResults); |
| 721 | - $uid = (int) $result['uid']; |
|
| 721 | + $uid = (int)$result['uid']; |
|
| 722 | 722 | |
| 723 | 723 | return $uid; |
| 724 | 724 | } |
@@ -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 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | protected static function loadConfiguration() |
| 40 | 40 | { |
| 41 | 41 | if (null === self::$configuration) { |
| 42 | - self::$configuration = (array) \unserialize((string) $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['calendarize']); |
|
| 42 | + self::$configuration = (array)\unserialize((string)$GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['calendarize']); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public static function convertWeekYear2DayMonthYear($week, $year, $startDay = 1): \DateTime |
| 67 | 67 | { |
| 68 | - $week = \str_pad((string) $week, 2, '0', STR_PAD_LEFT); |
|
| 68 | + $week = \str_pad((string)$week, 2, '0', STR_PAD_LEFT); |
|
| 69 | 69 | |
| 70 | 70 | return self::normalizeDateTimeSingle(\strtotime($year . '-W' . $week . '-' . $startDay)); |
| 71 | 71 | } |
@@ -91,10 +91,10 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public static function getDaySecondsOfDateTime(\DateTime $dateTime): int |
| 93 | 93 | { |
| 94 | - $hours = (int) $dateTime->format('G'); |
|
| 95 | - $minutes = $hours * self::SECONDS_MINUTE + (int) $dateTime->format('i'); |
|
| 94 | + $hours = (int)$dateTime->format('G'); |
|
| 95 | + $minutes = $hours * self::SECONDS_MINUTE + (int)$dateTime->format('i'); |
|
| 96 | 96 | |
| 97 | - return $minutes * self::SECONDS_MINUTE + (int) $dateTime->format('s'); |
|
| 97 | + return $minutes * self::SECONDS_MINUTE + (int)$dateTime->format('s'); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | if (!MathUtility::canBeInterpretedAsInteger($day)) { |
| 119 | 119 | $day = $date->format('d'); |
| 120 | 120 | } |
| 121 | - $date->setDate((int) $year, (int) $month, (int) $day); |
|
| 121 | + $date->setDate((int)$year, (int)$month, (int)$day); |
|
| 122 | 122 | $date->setTime(0, 0, 0); |
| 123 | 123 | if ($date->format('m') > $month) { |
| 124 | 124 | $date->modify('last day of last month'); |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | { |
| 180 | 180 | // NOTE that new \DateTime('@timestamp') does NOT work - @see comment in normalizeDateTimeSingle() |
| 181 | 181 | // So we create a date string with timezone information first, and a \DateTime in the current server timezone then. |
| 182 | - return new \DateTime(\date(\DateTime::ATOM, (int) $GLOBALS['SIM_ACCESS_TIME'])); |
|
| 182 | + return new \DateTime(\date(\DateTime::ATOM, (int)$GLOBALS['SIM_ACCESS_TIME'])); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | /** |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | */ |
| 104 | 104 | protected function sendHeaderAndFilename($contentType, $fileExtension) |
| 105 | 105 | { |
| 106 | - $testMode = (bool) $this->settings['feed']['debugMode']; |
|
| 106 | + $testMode = (bool)$this->settings['feed']['debugMode']; |
|
| 107 | 107 | if ($testMode) { |
| 108 | 108 | \header('Content-Type: text/plain; charset=utf-8'); |
| 109 | 109 | } else { |