Completed
Push — master ( 4c4c73...0db3fc )
by Tim
08:02
created
Classes/Domain/Model/Index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             if (empty($configuration)) {
123 123
                 throw new Exception('No valid configuration for the current index: ' . $this->getUniqueRegisterKey(), 123678123);
124 124
             }
125
-            $this->originalObject = EventUtility::getOriginalRecordByConfiguration($configuration, (int) $this->getForeignUid());
125
+            $this->originalObject = EventUtility::getOriginalRecordByConfiguration($configuration, (int)$this->getForeignUid());
126 126
         }
127 127
 
128 128
         return $this->originalObject;
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      */
256 256
     public function isAllDay()
257 257
     {
258
-        return (bool) $this->allDay;
258
+        return (bool)$this->allDay;
259 259
     }
260 260
 
261 261
     /**
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
      */
366 366
     public function getSysLanguageUid()
367 367
     {
368
-        return (int) $this->_languageUid;
368
+        return (int)$this->_languageUid;
369 369
     }
370 370
 
371 371
     /**
Please login to merge, or discard this patch.
Classes/Domain/Model/Configuration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public function isAllDay()
208 208
     {
209
-        return (bool) $this->allDay;
209
+        return (bool)$this->allDay;
210 210
     }
211 211
 
212 212
     /**
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      */
217 217
     public function setAllDay($allDay)
218 218
     {
219
-        $this->allDay = (bool) $allDay;
219
+        $this->allDay = (bool)$allDay;
220 220
     }
221 221
 
222 222
     /**
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
      */
537 537
     public function isOpenEndTime()
538 538
     {
539
-        return (bool) $this->openEndTime;
539
+        return (bool)$this->openEndTime;
540 540
     }
541 541
 
542 542
     /**
Please login to merge, or discard this patch.
Classes/Service/Url/AbstractUrl.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     protected function getIndexBase($indexUid): string
39 39
     {
40 40
         $indexRepository = HelperUtility::create(IndexRepository::class);
41
-        $index = $indexRepository->findByUid((int) $indexUid);
41
+        $index = $indexRepository->findByUid((int)$indexUid);
42 42
         if (!($index instanceof Index)) {
43 43
             return 'idx-' . $indexUid;
44 44
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
 
51 51
         $base = $originalObject->getRealUrlAliasBase();
52
-        if (!(bool) ConfigurationUtility::get('disableDateInSpeakingUrl')) {
52
+        if (!(bool)ConfigurationUtility::get('disableDateInSpeakingUrl')) {
53 53
             $datePart = $index->isAllDay() ? 'Y-m-d' : 'Y-m-d-' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
54 54
             $dateInfo = $index->getStartDateComplete()
55 55
                 ->format($datePart);
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
             $base .= '-' . $dateInfo;
58 58
         }
59 59
 
60
-        if ((bool) ConfigurationUtility::get('addIndexInSpeakingUrl') || \class_exists(PersistedAliasMapper::class)) {
60
+        if ((bool)ConfigurationUtility::get('addIndexInSpeakingUrl') || \class_exists(PersistedAliasMapper::class)) {
61 61
             $base .= '-' . $indexUid;
62 62
         }
63 63
 
64
-        return (string) $base;
64
+        return (string)$base;
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.
Classes/Service/Url/CoolUri.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      */
60 60
     public function coolUri($xml, $value)
61 61
     {
62
-        $alias = $this->getIndexBase((int) $value);
62
+        $alias = $this->getIndexBase((int)$value);
63 63
         $alias = $this->prepareBase($alias);
64 64
         $alias = Functions::URLize($alias);
65 65
         $alias = Functions::sanitize_title_with_dashes($alias);
Please login to merge, or discard this patch.
Classes/Service/TimeTable/TimeTimeTable.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         switch ($configuration->getEndDateDynamic()) {
66 66
             case Configuration::END_DYNAMIC_1_DAY:
67
-                $callback = function ($entry) {
67
+                $callback = function($entry) {
68 68
                     if ($entry['start_date'] instanceof \DateTime) {
69 69
                         $entry['end_date'] = clone $entry['start_date'];
70 70
                         $entry['end_date']->modify('+1 day');
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 };
75 75
                 break;
76 76
             case Configuration::END_DYNAMIC_1_WEEK:
77
-                $callback = function ($entry) {
77
+                $callback = function($entry) {
78 78
                     if ($entry['start_date'] instanceof \DateTime) {
79 79
                         $entry['end_date'] = clone $entry['start_date'];
80 80
                         $entry['end_date']->modify('+1 week');
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                 };
85 85
                 break;
86 86
             case Configuration::END_DYNAMIC_END_WEEK:
87
-                $callback = function ($entry) {
87
+                $callback = function($entry) {
88 88
                     if ($entry['start_date'] instanceof \DateTime) {
89 89
                         $entry['end_date'] = clone $entry['start_date'];
90 90
                         $entry['end_date']->modify('monday next week');
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 };
96 96
                 break;
97 97
             case Configuration::END_DYNAMIC_END_MONTH:
98
-                $callback = function ($entry) {
98
+                $callback = function($entry) {
99 99
                     if ($entry['start_date'] instanceof \DateTime) {
100 100
                         $entry['end_date'] = clone $entry['start_date'];
101 101
                         $entry['end_date']->modify('last day of this month');
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
                 break;
107 107
             case Configuration::END_DYNAMIC_END_YEAR:
108 108
 
109
-                $callback = function ($entry) {
109
+                $callback = function($entry) {
110 110
                     if ($entry['start_date'] instanceof \DateTime) {
111 111
                         $entry['end_date'] = clone $entry['start_date'];
112
-                        $entry['end_date']->setDate((int) $entry['end_date']->format('Y'), 12, 31);
112
+                        $entry['end_date']->setDate((int)$entry['end_date']->format('Y'), 12, 31);
113 113
                     }
114 114
 
115 115
                     return $entry;
@@ -383,10 +383,10 @@  discard block
 block discarded – undo
383 383
         // if not set get values from extension configuration
384 384
         if (null === $tillDays && null === $tillDaysPast) {
385 385
             $tillDays = ConfigurationUtility::get('tillDays');
386
-            $tillDays = MathUtility::canBeInterpretedAsInteger($tillDays) ? (int) $tillDays : null;
386
+            $tillDays = MathUtility::canBeInterpretedAsInteger($tillDays) ? (int)$tillDays : null;
387 387
             $tillDaysPast = ConfigurationUtility::get('tillDaysPast');
388
-            $tillDaysPast = MathUtility::canBeInterpretedAsInteger($tillDaysPast) ? (int) $tillDaysPast : null;
389
-            $tillDaysRelative = (bool) ConfigurationUtility::get('tillDaysRelative');
388
+            $tillDaysPast = MathUtility::canBeInterpretedAsInteger($tillDaysPast) ? (int)$tillDaysPast : null;
389
+            $tillDaysRelative = (bool)ConfigurationUtility::get('tillDaysRelative');
390 390
         }
391 391
 
392 392
         // get base date for till tillDate and tillDatePast calculation
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
      */
423 423
     protected function getFrequencyLimitPerItem(): int
424 424
     {
425
-        $maxLimit = (int) ConfigurationUtility::get('frequencyLimitPerItem');
425
+        $maxLimit = (int)ConfigurationUtility::get('frequencyLimitPerItem');
426 426
         if ($maxLimit <= 0) {
427 427
             $maxLimit = 300;
428 428
         }
Please login to merge, or discard this patch.
Classes/Slots/CalMigration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             ->where(
37 37
                 $q->expr()->andX(
38 38
                     $q->expr()->eq('tablenames', $q->quote('tx_cal_event')),
39
-                    $q->expr()->eq('uid_foreign', $q->createNamedParameter((int) $event['uid'], \PDO::PARAM_INT))
39
+                    $q->expr()->eq('uid_foreign', $q->createNamedParameter((int)$event['uid'], \PDO::PARAM_INT))
40 40
                 )
41 41
             );
42 42
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             $importId = CalMigrationUpdate::IMPORT_PREFIX . $selectResult['uid'];
50 50
 
51 51
             $fieldValues = [
52
-                'uid_foreign' => (int) $recordId,
52
+                'uid_foreign' => (int)$recordId,
53 53
                 'tablenames' => $table,
54 54
             ];
55 55
 
Please login to merge, or discard this patch.
Classes/Service/Url/Typo3Route.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $parts = GeneralUtility::trimExplode('-', $value, true);
46 46
 
47
-        return (int) \array_pop($parts);
47
+        return (int)\array_pop($parts);
48 48
     }
49 49
 
50 50
     /**
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     protected function id2alias($value): string
58 58
     {
59
-        $alias = $this->getIndexBase((int) $value);
59
+        $alias = $this->getIndexBase((int)$value);
60 60
 
61 61
         // Because the Slug helper do not remove "/" chars
62 62
         $alias = \str_replace('/', '-', $alias);
@@ -64,6 +64,6 @@  discard block
 block discarded – undo
64 64
         $slugHelper = GeneralUtility::makeInstance(SlugHelper::class, 'pages', 'uid', []);
65 65
         $alias = $slugHelper->sanitize($alias);
66 66
 
67
-        return (string) $alias;
67
+        return (string)$alias;
68 68
     }
69 69
 }
Please login to merge, or discard this patch.
Classes/Service/IndexerService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 // overlays can connect with l10n_paretn to the right default record.
64 64
                 $q->select('uid')
65 65
                     ->from($tableName)
66
-                    ->orderBy((string) $transPointer);
66
+                    ->orderBy((string)$transPointer);
67 67
             } else {
68 68
                 $q->select('uid')
69 69
                     ->from($tableName);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     {
110 110
         // Note: "uid" could be e.g. NEW6273482 in DataHandler process
111 111
         if (MathUtility::canBeInterpretedAsInteger($uid)) {
112
-            return (int) $this->getCurrentItems($tableName, $uid)->rowCount();
112
+            return (int)$this->getCurrentItems($tableName, $uid)->rowCount();
113 113
         }
114 114
 
115 115
         return 0;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 $q->expr()->andX(
139 139
                     $q->expr()->gte('start_date', $q->createNamedParameter(DateTimeUtility::getNow()->format('Y-m-d'))),
140 140
                     $q->expr()->eq('foreign_table', $q->createNamedParameter($table)),
141
-                    $q->expr()->eq('foreign_uid', $q->createNamedParameter((int) $uid, \PDO::PARAM_INT))
141
+                    $q->expr()->eq('foreign_uid', $q->createNamedParameter((int)$uid, \PDO::PARAM_INT))
142 142
                 )
143 143
             )
144 144
             ->addOrderBy('start_date', 'ASC')
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
                     $q->expr()->notIn('unique_register_key', $validKeys)
285 285
                 )->execute();
286 286
 
287
-            return (bool) $q->execute();
287
+            return (bool)$q->execute();
288 288
         }
289 289
 
290
-        return (bool) $db->truncate(self::TABLE_NAME);
290
+        return (bool)$db->truncate(self::TABLE_NAME);
291 291
     }
292 292
 }
Please login to merge, or discard this patch.
Classes/Service/IndexPreparationService.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
         $configurations = GeneralUtility::intExplode(',', $rawRecord['calendarize'], true);
37 37
 
38 38
         $transPointer = $GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'] ?? false; // e.g. l10n_parent
39
-        if ($transPointer && (int) $rawRecord[$transPointer] > 0) {
40
-            $rawOriginalRecord = BackendUtility::getRecord($tableName, (int) $rawRecord[$transPointer]);
39
+        if ($transPointer && (int)$rawRecord[$transPointer] > 0) {
40
+            $rawOriginalRecord = BackendUtility::getRecord($tableName, (int)$rawRecord[$transPointer]);
41 41
             $configurations = GeneralUtility::intExplode(',', $rawOriginalRecord['calendarize'], true);
42 42
         }
43 43
 
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
         $languageField = $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] ?? false; // e.g. sys_language_uid
86 86
         $transPointer = $GLOBALS['TCA'][$tableName]['ctrl']['transOrigPointerField'] ?? false; // e.g. l10n_parent
87 87
 
88
-        if ($transPointer && (int) $record[$transPointer] > 0) {
88
+        if ($transPointer && (int)$record[$transPointer] > 0) {
89 89
             foreach ($neededItems as $key => $value) {
90 90
                 $originalRecord = BackendUtility::getRecord($value['foreign_table'], $value['foreign_uid']);
91 91
 
92 92
                 $searchFor = $value;
93
-                $searchFor['foreign_uid'] = (int) $originalRecord[$transPointer];
93
+                $searchFor['foreign_uid'] = (int)$originalRecord[$transPointer];
94 94
 
95 95
                 $db = HelperUtility::getDatabaseConnection(IndexerService::TABLE_NAME);
96 96
                 $q = $db->createQueryBuilder();
@@ -99,19 +99,19 @@  discard block
 block discarded – undo
99 99
                     if (\is_string($val)) {
100 100
                         $where[] = $q->expr()->eq($field, $q->quote($val));
101 101
                     } else {
102
-                        $where[] = $q->expr()->eq($field, (int) $val);
102
+                        $where[] = $q->expr()->eq($field, (int)$val);
103 103
                     }
104 104
                 }
105 105
 
106 106
                 $result = $q->select('uid')->from(IndexerService::TABLE_NAME)->andWhere(...$where)->execute()->fetch();
107 107
                 if (isset($result['uid'])) {
108
-                    $neededItems[$key]['l10n_parent'] = (int) $result['uid'];
108
+                    $neededItems[$key]['l10n_parent'] = (int)$result['uid'];
109 109
                 }
110 110
             }
111 111
         }
112 112
 
113
-        if ($languageField && 0 !== (int) $record[$languageField]) {
114
-            $language = (int) $record[$languageField];
113
+        if ($languageField && 0 !== (int)$record[$languageField]) {
114
+            $language = (int)$record[$languageField];
115 115
             foreach (\array_keys($neededItems) as $key) {
116 116
                 $neededItems[$key]['sys_language_uid'] = $language;
117 117
             }
@@ -134,16 +134,16 @@  discard block
 block discarded – undo
134 134
 
135 135
         $addFields = [];
136 136
         if (isset($enableFields['disabled'])) {
137
-            $addFields['hidden'] = (int) $record[$enableFields['disabled']];
137
+            $addFields['hidden'] = (int)$record[$enableFields['disabled']];
138 138
         }
139 139
         if (isset($enableFields['starttime'])) {
140
-            $addFields['starttime'] = (int) $record[$enableFields['starttime']];
140
+            $addFields['starttime'] = (int)$record[$enableFields['starttime']];
141 141
         }
142 142
         if (isset($enableFields['endtime'])) {
143
-            $addFields['endtime'] = (int) $record[$enableFields['endtime']];
143
+            $addFields['endtime'] = (int)$record[$enableFields['endtime']];
144 144
         }
145 145
         if (isset($enableFields['fe_group'])) {
146
-            $addFields['fe_group'] = (string) $record[$enableFields['fe_group']];
146
+            $addFields['fe_group'] = (string)$record[$enableFields['fe_group']];
147 147
         }
148 148
 
149 149
         foreach ($neededItems as $key => $value) {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             if ($value instanceof \DateTimeInterface) {
163 163
                 $record[$key] = $value->format('Y-m-d');
164 164
             } elseif (\is_bool($value) || 'start_time' === $key || 'end_time' === $key) {
165
-                $record[$key] = (int) $value;
165
+                $record[$key] = (int)$value;
166 166
             } elseif (null === $value) {
167 167
                 $record[$key] = '';
168 168
             }
Please login to merge, or discard this patch.