@@ -44,7 +44,7 @@ |
||
| 44 | 44 | public function resolve(string $value): ?string |
| 45 | 45 | { |
| 46 | 46 | $route = GeneralUtility::makeInstance(Typo3Route::class); |
| 47 | - $id = (string) $route->convert(['resolve' => $value], null); |
|
| 47 | + $id = (string)$route->convert(['resolve' => $value], null); |
|
| 48 | 48 | |
| 49 | 49 | if ($this->generate($id) !== $value) { |
| 50 | 50 | throw new RouteNotFoundException('Wrong realurl segment', 12378); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $actions = $this->flexFormService->get('switchableControllerActions', 'main'); |
| 66 | 66 | $parts = GeneralUtility::trimExplode(';', $actions, true); |
| 67 | - $parts = \array_map(function ($element) { |
|
| 67 | + $parts = \array_map(function($element) { |
|
| 68 | 68 | $split = \explode('->', $element); |
| 69 | 69 | |
| 70 | 70 | return \ucfirst($split[1]); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | $this->layoutService->addRow(TranslateUtility::get('mode'), TranslateUtility::get('mode.' . $actionKey)); |
| 75 | 75 | |
| 76 | - $pluginConfiguration = (int) $this->flexFormService->get('settings.pluginConfiguration', 'main'); |
|
| 76 | + $pluginConfiguration = (int)$this->flexFormService->get('settings.pluginConfiguration', 'main'); |
|
| 77 | 77 | if ($pluginConfiguration) { |
| 78 | 78 | $table = 'tx_calendarize_domain_model_pluginconfiguration'; |
| 79 | 79 | |
@@ -88,17 +88,17 @@ discard block |
||
| 88 | 88 | ); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - if ('' !== \trim((string) $this->flexFormService->get('settings.configuration', 'general'))) { |
|
| 91 | + if ('' !== \trim((string)$this->flexFormService->get('settings.configuration', 'general'))) { |
|
| 92 | 92 | $this->layoutService->addRow( |
| 93 | 93 | TranslateUtility::get('configuration'), |
| 94 | 94 | $this->flexFormService->get('settings.configuration', 'general') |
| 95 | 95 | ); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - if ((bool) $this->flexFormService->get('settings.hidePagination', 'main')) { |
|
| 98 | + if ((bool)$this->flexFormService->get('settings.hidePagination', 'main')) { |
|
| 99 | 99 | $this->layoutService->addRow(TranslateUtility::get('hide.pagination.teaser'), '!!!'); |
| 100 | 100 | } |
| 101 | - $useRelativeDate = (bool) $this->flexFormService->get('settings.useRelativeDate', 'main'); |
|
| 101 | + $useRelativeDate = (bool)$this->flexFormService->get('settings.useRelativeDate', 'main'); |
|
| 102 | 102 | if ($useRelativeDate) { |
| 103 | 103 | $overrideStartRelative = $this->flexFormService->get('settings.overrideStartRelative', 'main'); |
| 104 | 104 | if ($overrideStartRelative) { |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | $this->layoutService->addRow(TranslateUtility::get('override.endrelative'), $overrideEndRelative); |
| 110 | 110 | } |
| 111 | 111 | } else { |
| 112 | - $overrideStartDate = (int) $this->flexFormService->get('settings.overrideStartdate', 'main'); |
|
| 112 | + $overrideStartDate = (int)$this->flexFormService->get('settings.overrideStartdate', 'main'); |
|
| 113 | 113 | if ($overrideStartDate) { |
| 114 | 114 | $this->layoutService->addRow(TranslateUtility::get('override.startdate'), \date('d.m.y H:i', $overrideStartDate)); |
| 115 | 115 | } |
| 116 | - $overrideEndDate = (int) $this->flexFormService->get('settings.overrideEnddate', 'main'); |
|
| 116 | + $overrideEndDate = (int)$this->flexFormService->get('settings.overrideEnddate', 'main'); |
|
| 117 | 117 | if ($overrideEndDate) { |
| 118 | 118 | $this->layoutService->addRow(TranslateUtility::get('override.enddate'), \date('d.m.y H:i', $overrideEndDate)); |
| 119 | 119 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | 'bookingPid', |
| 140 | 140 | ]; |
| 141 | 141 | foreach ($pageIdsNames as $pageIdName) { |
| 142 | - $pageId = (int) $this->flexFormService->get('settings.' . $pageIdName, 'pages'); |
|
| 142 | + $pageId = (int)$this->flexFormService->get('settings.' . $pageIdName, 'pages'); |
|
| 143 | 143 | $pageRow = BackendUtility::getRecord('pages', $pageId); |
| 144 | 144 | if ($pageRow) { |
| 145 | 145 | $this->layoutService->addRow( |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | switch ($configuration->getEndDateDynamic()) { |
| 62 | 62 | case Configuration::END_DYNAMIC_1_DAY: |
| 63 | - $callback = function ($entry) { |
|
| 63 | + $callback = function($entry) { |
|
| 64 | 64 | if ($entry['start_date'] instanceof \DateTime) { |
| 65 | 65 | $entry['end_date'] = clone $entry['start_date']; |
| 66 | 66 | $entry['end_date']->modify('+1 day'); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | }; |
| 71 | 71 | break; |
| 72 | 72 | case Configuration::END_DYNAMIC_1_WEEK: |
| 73 | - $callback = function ($entry) { |
|
| 73 | + $callback = function($entry) { |
|
| 74 | 74 | if ($entry['start_date'] instanceof \DateTime) { |
| 75 | 75 | $entry['end_date'] = clone $entry['start_date']; |
| 76 | 76 | $entry['end_date']->modify('+1 week'); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | }; |
| 81 | 81 | break; |
| 82 | 82 | case Configuration::END_DYNAMIC_END_WEEK: |
| 83 | - $callback = function ($entry) { |
|
| 83 | + $callback = function($entry) { |
|
| 84 | 84 | if ($entry['start_date'] instanceof \DateTime) { |
| 85 | 85 | $entry['end_date'] = clone $entry['start_date']; |
| 86 | 86 | $entry['end_date']->modify('monday next week'); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | }; |
| 92 | 92 | break; |
| 93 | 93 | case Configuration::END_DYNAMIC_END_MONTH: |
| 94 | - $callback = function ($entry) { |
|
| 94 | + $callback = function($entry) { |
|
| 95 | 95 | if ($entry['start_date'] instanceof \DateTime) { |
| 96 | 96 | $entry['end_date'] = clone $entry['start_date']; |
| 97 | 97 | $entry['end_date']->modify('last day of this month'); |
@@ -102,10 +102,10 @@ discard block |
||
| 102 | 102 | break; |
| 103 | 103 | case Configuration::END_DYNAMIC_END_YEAR: |
| 104 | 104 | |
| 105 | - $callback = function ($entry) { |
|
| 105 | + $callback = function($entry) { |
|
| 106 | 106 | if ($entry['start_date'] instanceof \DateTime) { |
| 107 | 107 | $entry['end_date'] = clone $entry['start_date']; |
| 108 | - $entry['end_date']->setDate((int) $entry['end_date']->format('Y'), 12, 31); |
|
| 108 | + $entry['end_date']->setDate((int)$entry['end_date']->format('Y'), 12, 31); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | return $entry; |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | */ |
| 330 | 330 | protected function getFrequencyLimitPerItem(): int |
| 331 | 331 | { |
| 332 | - $maxLimit = (int) ConfigurationUtility::get('frequencyLimitPerItem'); |
|
| 332 | + $maxLimit = (int)ConfigurationUtility::get('frequencyLimitPerItem'); |
|
| 333 | 333 | if ($maxLimit <= 0) { |
| 334 | 334 | $maxLimit = 300; |
| 335 | 335 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | // overlays can connect with l10n_paretn to the right default record. |
| 55 | 55 | $q->select('uid') |
| 56 | 56 | ->from($tableName) |
| 57 | - ->orderBy((string) $transPointer); |
|
| 57 | + ->orderBy((string)$transPointer); |
|
| 58 | 58 | } else { |
| 59 | 59 | $q->select('uid') |
| 60 | 60 | ->from($tableName); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | { |
| 101 | 101 | // Note: "uid" could be e.g. NEW6273482 in DataHandler process |
| 102 | 102 | if (MathUtility::canBeInterpretedAsInteger($uid)) { |
| 103 | - return (int) $this->getCurrentItems($tableName, $uid)->rowCount(); |
|
| 103 | + return (int)$this->getCurrentItems($tableName, $uid)->rowCount(); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | return 0; |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $q->expr()->andX( |
| 132 | 132 | $q->expr()->gte('start_date', $now->getTimestamp()), |
| 133 | 133 | $q->expr()->eq('foreign_table', $q->createNamedParameter($table)), |
| 134 | - $q->expr()->eq('foreign_uid', $q->createNamedParameter((int) $uid, \PDO::PARAM_INT)) |
|
| 134 | + $q->expr()->eq('foreign_uid', $q->createNamedParameter((int)$uid, \PDO::PARAM_INT)) |
|
| 135 | 135 | ) |
| 136 | 136 | ) |
| 137 | 137 | ->addOrderBy('start_date', 'ASC') |
@@ -275,9 +275,9 @@ discard block |
||
| 275 | 275 | $q->expr()->notIn('unique_register_key', $validKeys) |
| 276 | 276 | )->execute(); |
| 277 | 277 | |
| 278 | - return (bool) $q->execute(); |
|
| 278 | + return (bool)$q->execute(); |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | - return (bool) $db->truncate(self::TABLE_NAME); |
|
| 281 | + return (bool)$db->truncate(self::TABLE_NAME); |
|
| 282 | 282 | } |
| 283 | 283 | } |
@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | ]); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - if ((int) $options->getPid() > 0) { |
|
| 116 | - $query->matching($query->equals('pid', (int) $options->getPid())); |
|
| 115 | + if ((int)$options->getPid() > 0) { |
|
| 116 | + $query->matching($query->equals('pid', (int)$options->getPid())); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $result = $query->execute(); |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | */ |
| 398 | 398 | public function findWeek($year, $week, $weekStart = 1) |
| 399 | 399 | { |
| 400 | - $weekStart = (int) $weekStart; |
|
| 400 | + $weekStart = (int)$weekStart; |
|
| 401 | 401 | $daysShift = $weekStart - 1; |
| 402 | 402 | $firstDay = DateTimeUtility::convertWeekYear2DayMonthYear($week, $year); |
| 403 | 403 | $timezone = DateTimeUtility::getTimeZone(); |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | { |
| 422 | 422 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_calendarize_domain_model_index'); |
| 423 | 423 | |
| 424 | - return (array) $queryBuilder->select('unique_register_key', 'pid', 'foreign_table')->from('tx_calendarize_domain_model_index')->groupBy('pid', 'foreign_table', 'unique_register_key')->execute()->fetchAll(); |
|
| 424 | + return (array)$queryBuilder->select('unique_register_key', 'pid', 'foreign_table')->from('tx_calendarize_domain_model_index')->groupBy('pid', 'foreign_table', 'unique_register_key')->execute()->fetchAll(); |
|
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | /** |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | $config = $objectManager->get(ConfigurationManagerInterface::class); |
| 515 | 515 | $pluginConfig = $config->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS); |
| 516 | 516 | |
| 517 | - $mode = isset($pluginConfig['indexLanguageMode']) ? (string) $pluginConfig['indexLanguageMode'] : 'strict'; |
|
| 517 | + $mode = isset($pluginConfig['indexLanguageMode']) ? (string)$pluginConfig['indexLanguageMode'] : 'strict'; |
|
| 518 | 518 | |
| 519 | 519 | return $mode; |
| 520 | 520 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function generate(string $content, array $configuration) |
| 24 | 24 | { |
| 25 | 25 | $arguments = GeneralUtility::_GET('tx_calendarize_calendar'); |
| 26 | - $indexUid = isset($arguments['index']) ? (int) $arguments['index'] : 0; |
|
| 26 | + $indexUid = isset($arguments['index']) ? (int)$arguments['index'] : 0; |
|
| 27 | 27 | if (0 === $indexUid) { |
| 28 | 28 | return $content; |
| 29 | 29 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $event = $this->getEventByIndex($index); |
| 37 | 37 | $contentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class); |
| 38 | 38 | |
| 39 | - if (isset($configuration['doNotLinkIt']) && (bool) $configuration['doNotLinkIt']) { |
|
| 39 | + if (isset($configuration['doNotLinkIt']) && (bool)$configuration['doNotLinkIt']) { |
|
| 40 | 40 | $content = $event['title']; |
| 41 | 41 | } else { |
| 42 | 42 | $linkConfiguration = [ |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | protected function getEventByIndex($row) |
| 58 | 58 | { |
| 59 | - return $this->fetchRecordByUid($row['foreign_table'], (int) $row['foreign_uid']); |
|
| 59 | + return $this->fetchRecordByUid($row['foreign_table'], (int)$row['foreign_uid']); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | /** |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table); |
| 81 | 81 | $where = [ |
| 82 | - $queryBuilder->expr()->eq('uid', (int) $uid), |
|
| 82 | + $queryBuilder->expr()->eq('uid', (int)$uid), |
|
| 83 | 83 | ]; |
| 84 | 84 | $rows = $queryBuilder->select('*') |
| 85 | 85 | ->from($table) |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | { |
| 68 | 68 | try { |
| 69 | 69 | $info = $GLOBALS['BE_USER']->getSessionData('calendarize_be'); |
| 70 | - $object = @\unserialize((string) $info); |
|
| 70 | + $object = @\unserialize((string)$info); |
|
| 71 | 71 | if ($object instanceof OptionRequest) { |
| 72 | 72 | return $object; |
| 73 | 73 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $configuration = $this->getConfiguration($pid, $event['start'], $event['end']); |
| 62 | 62 | $eventObject->addCalendarize($configuration); |
| 63 | 63 | |
| 64 | - if (null !== $eventObject->getUid() && (int) $eventObject->getUid() > 0) { |
|
| 64 | + if (null !== $eventObject->getUid() && (int)$eventObject->getUid() > 0) { |
|
| 65 | 65 | $this->eventRepository->update($eventObject); |
| 66 | 66 | $commandController->enqueueMessage('Update Event Meta data: ' . $eventObject->getTitle(), 'Update'); |
| 67 | 67 | } else { |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | protected function nl2br($string) |
| 151 | 151 | { |
| 152 | - $string = \nl2br((string) $string); |
|
| 152 | + $string = \nl2br((string)$string); |
|
| 153 | 153 | |
| 154 | 154 | return \str_replace('\\n', '<br />', $string); |
| 155 | 155 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | ->fetchAll(); |
| 106 | 106 | |
| 107 | 107 | foreach ($rows as $row) { |
| 108 | - $categoryIds[] = (int) $row['uid_local']; |
|
| 108 | + $categoryIds[] = (int)$row['uid_local']; |
|
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | 111 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | ->fetchAll(); |
| 135 | 135 | |
| 136 | 136 | foreach ($rows as $row) { |
| 137 | - $indexIds[] = (int) $row['uid_foreign']; |
|
| 137 | + $indexIds[] = (int)$row['uid_foreign']; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | $indexIds[] = -1; |