@@ -38,8 +38,8 @@ |
||
38 | 38 | $dateClone->modify('first day of this month'); |
39 | 39 | |
40 | 40 | $monthCheck = $dateClone->format('m'); |
41 | - while ((int) $monthCheck === (int) $dateClone->format('m')) { |
|
42 | - $week = (int) $dateClone->format('W'); |
|
41 | + while ((int)$monthCheck === (int)$dateClone->format('m')) { |
|
42 | + $week = (int)$dateClone->format('W'); |
|
43 | 43 | if (!isset($weeks[$week])) { |
44 | 44 | $weeks[$week] = [ |
45 | 45 | 'week' => $week, |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public function render() |
32 | 32 | { |
33 | - $content = null === $this->arguments['content'] || '' === \trim((string) $this->arguments['content']) ? $this->renderChildren() : $this->arguments['content']; |
|
33 | + $content = null === $this->arguments['content'] || '' === \trim((string)$this->arguments['content']) ? $this->renderChildren() : $this->arguments['content']; |
|
34 | 34 | |
35 | 35 | return GeneralUtility::quoteJSvalue($content); |
36 | 36 | } |
@@ -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 | $row = HelperUtility::getDatabaseConnection()->exec_SELECTgetSingleRow( |
@@ -87,21 +87,21 @@ discard block |
||
87 | 87 | ); |
88 | 88 | } |
89 | 89 | |
90 | - if ('' !== \trim((string) $this->flexFormService->get('settings.configuration', 'general'))) { |
|
90 | + if ('' !== \trim((string)$this->flexFormService->get('settings.configuration', 'general'))) { |
|
91 | 91 | $this->layoutService->addRow( |
92 | 92 | TranslateUtility::get('configuration'), |
93 | 93 | $this->flexFormService->get('settings.configuration', 'general') |
94 | 94 | ); |
95 | 95 | } |
96 | 96 | |
97 | - if ((bool) $this->flexFormService->get('settings.hidePagination', 'main')) { |
|
97 | + if ((bool)$this->flexFormService->get('settings.hidePagination', 'main')) { |
|
98 | 98 | $this->layoutService->addRow(TranslateUtility::get('hide.pagination.teaser'), '!!!'); |
99 | 99 | } |
100 | - $overrideStartDate = (int) $this->flexFormService->get('settings.overrideStartdate', 'main'); |
|
100 | + $overrideStartDate = (int)$this->flexFormService->get('settings.overrideStartdate', 'main'); |
|
101 | 101 | if ($overrideStartDate) { |
102 | 102 | $this->layoutService->addRow('OverrideStartdate', \date('d.m.y H:i', $overrideStartDate)); |
103 | 103 | } |
104 | - $overrideEndDate = (int) $this->flexFormService->get('settings.overrideEnddate', 'main'); |
|
104 | + $overrideEndDate = (int)$this->flexFormService->get('settings.overrideEnddate', 'main'); |
|
105 | 105 | if ($overrideEndDate) { |
106 | 106 | $this->layoutService->addRow('OverrideEndDate', \date('d.m.y H:i', $overrideEndDate)); |
107 | 107 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | 'bookingPid', |
127 | 127 | ]; |
128 | 128 | foreach ($pageIdsNames as $pageIdName) { |
129 | - $pageId = (int) $this->flexFormService->get('settings.' . $pageIdName, 'pages'); |
|
129 | + $pageId = (int)$this->flexFormService->get('settings.' . $pageIdName, 'pages'); |
|
130 | 130 | $pageRow = BackendUtility::getRecord('pages', $pageId); |
131 | 131 | if ($pageRow) { |
132 | 132 | $this->layoutService->addRow( |
@@ -140,8 +140,8 @@ |
||
140 | 140 | { |
141 | 141 | $title = ''; |
142 | 142 | if ($row['start_date']) { |
143 | - $dateStart = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int) $row['start_date']); |
|
144 | - $dateEnd = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int) ($row['end_date'] ?: $row['start_date'])); |
|
143 | + $dateStart = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int)$row['start_date']); |
|
144 | + $dateEnd = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int)($row['end_date'] ?: $row['start_date'])); |
|
145 | 145 | $title .= $dateStart; |
146 | 146 | if ($dateStart !== $dateEnd) { |
147 | 147 | $title .= ' - ' . $dateEnd; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function respectPluginConfiguration(array $settings) |
26 | 26 | { |
27 | - $settings['pluginConfiguration'] = $this->buildPluginConfigurationObject((int) $settings['pluginConfiguration']); |
|
27 | + $settings['pluginConfiguration'] = $this->buildPluginConfigurationObject((int)$settings['pluginConfiguration']); |
|
28 | 28 | if ($settings['pluginConfiguration'] instanceof PluginConfiguration) { |
29 | 29 | $checkFields = [ |
30 | 30 | 'detailPid', |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | protected function buildPluginConfigurationObject($uid) |
84 | 84 | { |
85 | 85 | $db = HelperUtility::getDatabaseConnection(); |
86 | - $row = $db->exec_SELECTgetSingleRow('*', 'tx_calendarize_domain_model_pluginconfiguration', 'uid=' . (int) $uid); |
|
86 | + $row = $db->exec_SELECTgetSingleRow('*', 'tx_calendarize_domain_model_pluginconfiguration', 'uid=' . (int)$uid); |
|
87 | 87 | if (!isset($row['model_name'])) { |
88 | 88 | return; |
89 | 89 | } |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | if (!$languageField || !$transPointer) { |
83 | 83 | return; |
84 | 84 | } |
85 | - if ((int) $record[$transPointer] > 0) { |
|
85 | + if ((int)$record[$transPointer] > 0) { |
|
86 | 86 | // no Index for language child elements |
87 | 87 | return; |
88 | 88 | } |
89 | - $language = (int) $record[$languageField]; |
|
89 | + $language = (int)$record[$languageField]; |
|
90 | 90 | |
91 | 91 | foreach (\array_keys($neededItems) as $key) { |
92 | 92 | $neededItems[$key]['sys_language_uid'] = $language; |
@@ -109,16 +109,16 @@ discard block |
||
109 | 109 | |
110 | 110 | $addFields = []; |
111 | 111 | if (isset($enableFields['disabled'])) { |
112 | - $addFields['hidden'] = (int) $record[$enableFields['disabled']]; |
|
112 | + $addFields['hidden'] = (int)$record[$enableFields['disabled']]; |
|
113 | 113 | } |
114 | 114 | if (isset($enableFields['starttime'])) { |
115 | - $addFields['starttime'] = (int) $record[$enableFields['starttime']]; |
|
115 | + $addFields['starttime'] = (int)$record[$enableFields['starttime']]; |
|
116 | 116 | } |
117 | 117 | if (isset($enableFields['endtime'])) { |
118 | - $addFields['endtime'] = (int) $record[$enableFields['endtime']]; |
|
118 | + $addFields['endtime'] = (int)$record[$enableFields['endtime']]; |
|
119 | 119 | } |
120 | 120 | if (isset($enableFields['fe_group'])) { |
121 | - $addFields['fe_group'] = (string) $record[$enableFields['fe_group']]; |
|
121 | + $addFields['fe_group'] = (string)$record[$enableFields['fe_group']]; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | foreach ($neededItems as $key => $value) { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | if ($value instanceof \DateTimeInterface) { |
138 | 138 | $record[$key] = $value->getTimestamp(); |
139 | 139 | } elseif (\is_bool($value) || 'start_time' === $key || 'end_time' === $key) { |
140 | - $record[$key] = (int) $value; |
|
140 | + $record[$key] = (int)$value; |
|
141 | 141 | } elseif (null === $value) { |
142 | 142 | $record[$key] = ''; |
143 | 143 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | if ('' === $id && '' === $name) { |
35 | 35 | return ''; |
36 | 36 | } |
37 | - $times = $this->getTimes((int) $params['pid']); |
|
37 | + $times = $this->getTimes((int)$params['pid']); |
|
38 | 38 | if (!$times) { |
39 | 39 | return ''; |
40 | 40 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return $databaseConnection->exec_SELECTcountRows( |
72 | 72 | '*', |
73 | 73 | self::TABLE_NAME, |
74 | - 'foreign_table=' . $databaseConnection->fullQuoteStr($table, self::TABLE_NAME) . ' AND foreign_uid=' . (int) $uid |
|
74 | + 'foreign_table=' . $databaseConnection->fullQuoteStr($table, self::TABLE_NAME) . ' AND foreign_uid=' . (int)$uid |
|
75 | 75 | ); |
76 | 76 | } |
77 | 77 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | 'start_date >= ' . $now->getTimestamp() . ' AND foreign_table=' . $databaseConnection->fullQuoteStr( |
97 | 97 | $table, |
98 | 98 | self::TABLE_NAME |
99 | - ) . ' AND foreign_uid=' . (int) $uid, |
|
99 | + ) . ' AND foreign_uid=' . (int)$uid, |
|
100 | 100 | '', |
101 | 101 | 'start_date ASC, start_time ASC', |
102 | 102 | $limit |
@@ -178,11 +178,11 @@ discard block |
||
178 | 178 | { |
179 | 179 | foreach ($neededItem as $key => $value) { |
180 | 180 | if (MathUtility::canBeInterpretedAsInteger($value)) { |
181 | - if ((int) $value !== (int) $currentItem[$key]) { |
|
181 | + if ((int)$value !== (int)$currentItem[$key]) { |
|
182 | 182 | return false; |
183 | 183 | } |
184 | 184 | } else { |
185 | - if ((string) $value !== (string) $currentItem[$key]) { |
|
185 | + if ((string)$value !== (string)$currentItem[$key]) { |
|
186 | 186 | return false; |
187 | 187 | } |
188 | 188 | } |
@@ -226,12 +226,12 @@ discard block |
||
226 | 226 | $validKeys[$key] = $databaseConnection->fullQuoteStr($value, self::TABLE_NAME); |
227 | 227 | } |
228 | 228 | |
229 | - return (bool) $databaseConnection->exec_DELETEquery( |
|
229 | + return (bool)$databaseConnection->exec_DELETEquery( |
|
230 | 230 | self::TABLE_NAME, |
231 | 231 | 'unique_register_key NOT IN (' . \implode(',', $validKeys) . ')' |
232 | 232 | ); |
233 | 233 | } |
234 | 234 | |
235 | - return (bool) $databaseConnection->exec_TRUNCATEquery(self::TABLE_NAME); |
|
235 | + return (bool)$databaseConnection->exec_TRUNCATEquery(self::TABLE_NAME); |
|
236 | 236 | } |
237 | 237 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $previewLimit = 10; |
36 | 36 | if (isset($configuration['fieldConf']['config']['items'])) { |
37 | - $previewLimit = (int) $configuration['fieldConf']['config']['items']; |
|
37 | + $previewLimit = (int)$configuration['fieldConf']['config']['items']; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $indexService = GeneralUtility::makeInstance(IndexerService::class); |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | $items = []; |
78 | 78 | foreach ($events as $event) { |
79 | 79 | $startDateStamp = $event['start_date'] instanceof \DateTimeInterface ? $event['start_date']->getTimestamp() : $event['start_date']; |
80 | - $startDate = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int) $startDateStamp); |
|
80 | + $startDate = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int)$startDateStamp); |
|
81 | 81 | $endDateStamp = $event['end_date'] instanceof \DateTimeInterface ? $event['end_date']->getTimestamp() : $event['end_date']; |
82 | - $endDate = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int) $endDateStamp); |
|
82 | + $endDate = \strftime(DateTimeUtility::FORMAT_DATE_BACKEND, (int)$endDateStamp); |
|
83 | 83 | $entry = $startDate . ' - ' . $endDate; |
84 | 84 | if (!$event['all_day']) { |
85 | 85 | $start = BackendUtility::time($event['start_time'] % DateTimeUtility::SECONDS_DAY, false); |
86 | - if (AbstractTimeTable::DAY_END === (int) $event['end_time']) { |
|
86 | + if (AbstractTimeTable::DAY_END === (int)$event['end_time']) { |
|
87 | 87 | $end = '"' . TranslateUtility::get('openEndTime') . '"'; |
88 | 88 | } else { |
89 | 89 | $end = BackendUtility::time($event['end_time'] % DateTimeUtility::SECONDS_DAY, false); |