@@ -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 | /** |
@@ -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 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | // climb thru the events and hide/delete them |
69 | 69 | foreach ($events as $event) { |
70 | - $uid = (int) $event['foreign_uid']; |
|
70 | + $uid = (int)$event['foreign_uid']; |
|
71 | 71 | |
72 | 72 | $model = $repository->findByUid($uid); |
73 | 73 | |
@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | protected function processEvent(EventRepository $repository, Event $model, $modus) |
101 | 101 | { |
102 | 102 | // define the function for the delete-modus. |
103 | - $delete = function ($repository, $model) { |
|
103 | + $delete = function($repository, $model) { |
|
104 | 104 | $repository->remove($model); |
105 | 105 | }; |
106 | 106 | |
107 | 107 | // define the function for the hide-modus. |
108 | - $hide = function ($repository, $model) { |
|
108 | + $hide = function($repository, $model) { |
|
109 | 109 | $model->setHidden(true); |
110 | 110 | $repository->update($model); |
111 | 111 | }; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | protected function findOutdatedEvents($tableName, $waitingPeriod) |
142 | 142 | { |
143 | 143 | // calculate the waiting time |
144 | - $interval = 'P' . (int) $waitingPeriod . 'D'; |
|
144 | + $interval = 'P' . (int)$waitingPeriod . 'D'; |
|
145 | 145 | $now = DateTimeUtility::getNow(); |
146 | 146 | $now->sub(new \DateInterval($interval)); |
147 | 147 |