@@ -21,7 +21,7 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * Check the constraint and execute the query. |
| 23 | 23 | */ |
| 24 | - public function matchAndExecute(QueryInterface $query, array $constraints = []): array|QueryResultInterface |
|
| 24 | + public function matchAndExecute(QueryInterface $query, array $constraints = []): array | QueryResultInterface |
|
| 25 | 25 | { |
| 26 | 26 | if (!empty($constraints)) { |
| 27 | 27 | $query->matching($query->logicalAnd(...$constraints)); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | switch ($configuration->getEndDateDynamic()) { |
| 59 | 59 | case ConfigurationInterface::END_DYNAMIC_1_DAY: |
| 60 | - $callback = static function ($entry) { |
|
| 60 | + $callback = static function($entry) { |
|
| 61 | 61 | if ($entry['start_date'] instanceof \DateTime) { |
| 62 | 62 | $entry['end_date'] = clone $entry['start_date']; |
| 63 | 63 | $entry['end_date']->modify('+1 day'); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | }; |
| 68 | 68 | break; |
| 69 | 69 | case ConfigurationInterface::END_DYNAMIC_1_WEEK: |
| 70 | - $callback = static function ($entry) { |
|
| 70 | + $callback = static function($entry) { |
|
| 71 | 71 | if ($entry['start_date'] instanceof \DateTime) { |
| 72 | 72 | $entry['end_date'] = clone $entry['start_date']; |
| 73 | 73 | $entry['end_date']->modify('+1 week'); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | }; |
| 78 | 78 | break; |
| 79 | 79 | case ConfigurationInterface::END_DYNAMIC_END_WEEK: |
| 80 | - $callback = static function ($entry) { |
|
| 80 | + $callback = static function($entry) { |
|
| 81 | 81 | if ($entry['start_date'] instanceof \DateTime) { |
| 82 | 82 | $entry['end_date'] = clone $entry['start_date']; |
| 83 | 83 | $entry['end_date']->modify('monday next week'); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | }; |
| 89 | 89 | break; |
| 90 | 90 | case ConfigurationInterface::END_DYNAMIC_END_MONTH: |
| 91 | - $callback = static function ($entry) { |
|
| 91 | + $callback = static function($entry) { |
|
| 92 | 92 | if ($entry['start_date'] instanceof \DateTime) { |
| 93 | 93 | $entry['end_date'] = clone $entry['start_date']; |
| 94 | 94 | $entry['end_date']->modify('last day of this month'); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | }; |
| 99 | 99 | break; |
| 100 | 100 | case ConfigurationInterface::END_DYNAMIC_END_YEAR: |
| 101 | - $callback = static function ($entry) { |
|
| 101 | + $callback = static function($entry) { |
|
| 102 | 102 | if ($entry['start_date'] instanceof \DateTime) { |
| 103 | 103 | $entry['end_date'] = clone $entry['start_date']; |
| 104 | 104 | $entry['end_date']->setDate((int)$entry['end_date']->format('Y'), 12, 31); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | string $recurrence, |
| 59 | 59 | string $day, |
| 60 | 60 | string $modify |
| 61 | - ): \DateTime|false { |
|
| 61 | + ): \DateTime | false { |
|
| 62 | 62 | // clone and reset and move to next month |
| 63 | 63 | $dateTime = clone $date; |
| 64 | 64 | $dateTime->setDate((int)$dateTime->format('Y'), (int)$dateTime->format('m'), 1); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | string $direction, |
| 158 | 158 | array $validDays, |
| 159 | 159 | int $position = 1 |
| 160 | - ): \DateTime|false { |
|
| 160 | + ): \DateTime | false { |
|
| 161 | 161 | if (self::DIRECTION_UP === $direction) { |
| 162 | 162 | $dateTime->setDate((int)$dateTime->format('Y'), (int)$dateTime->format('m'), 1); |
| 163 | 163 | $modify = '+1 day'; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | /** |
| 26 | 26 | * Modify the given datetime by the string modification. |
| 27 | 27 | */ |
| 28 | - public function render(): \DateTime|false |
|
| 28 | + public function render(): \DateTime | false |
|
| 29 | 29 | { |
| 30 | 30 | $dateTime = $this->arguments['dateTime']; |
| 31 | 31 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | /** |
| 24 | 24 | * Get country selection. |
| 25 | 25 | */ |
| 26 | - protected function getCountrySelection(): array|QueryResultInterface |
|
| 26 | + protected function getCountrySelection(): array | QueryResultInterface |
|
| 27 | 27 | { |
| 28 | 28 | if (!ExtensionManagementUtility::isLoaded('static_info_tables')) { |
| 29 | 29 | return []; |
@@ -141,12 +141,12 @@ |
||
| 141 | 141 | protected function processEvent(Repository $repository, AbstractEntity $model, string $mode): void |
| 142 | 142 | { |
| 143 | 143 | // define the function for the delete-mode. |
| 144 | - $delete = static function ($repository, $model) { |
|
| 144 | + $delete = static function($repository, $model) { |
|
| 145 | 145 | $repository->remove($model); |
| 146 | 146 | }; |
| 147 | 147 | |
| 148 | 148 | // define the function for the hide-mode. |
| 149 | - $hide = static function ($repository, $model) { |
|
| 149 | + $hide = static function($repository, $model) { |
|
| 150 | 150 | $model->setHidden(true); |
| 151 | 151 | $repository->update($model); |
| 152 | 152 | }; |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** |
| 16 | 16 | * Configuration cache. |
| 17 | 17 | */ |
| 18 | - protected static ?array $configuration = null; |
|
| 18 | + protected static ? array $configuration = null; |
|
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | 21 | * Get the given configuration value. |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | return array_values( |
| 116 | 116 | array_filter( |
| 117 | 117 | $result, |
| 118 | - static function ($item) { |
|
| 118 | + static function($item) { |
|
| 119 | 119 | return \is_array($item) && VersionState::DELETE_PLACEHOLDER !== ($item['t3ver_state'] ?? false); |
| 120 | 120 | } |
| 121 | 121 | ) |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | /** |
| 171 | 171 | * Reset the DateTime. |
| 172 | 172 | */ |
| 173 | - public static function resetTime(string|\DateTimeInterface $dateTime = null): \DateTime |
|
| 173 | + public static function resetTime(string | \DateTimeInterface $dateTime = null): \DateTime |
|
| 174 | 174 | { |
| 175 | 175 | $dateTime = self::normalizeDateTimeSingle($dateTime); |
| 176 | 176 | $dateTime->setTime(0, 0); |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | * @throws \Exception |
| 185 | 185 | */ |
| 186 | 186 | public static function normalizeDateTimeSingle( |
| 187 | - int|string|\DateTimeInterface $dateInformation = null, |
|
| 187 | + int | string | \DateTimeInterface $dateInformation = null, |
|
| 188 | 188 | \DateTimeZone $timezone = null |
| 189 | 189 | ): \DateTime { |
| 190 | 190 | $timezone = $timezone ?? self::getTimeZone(); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | * |
| 234 | 234 | * @see resetTime() |
| 235 | 235 | */ |
| 236 | - public static function getDayStart(string|\DateTimeInterface $dateInformation): \DateTime |
|
| 236 | + public static function getDayStart(string | \DateTimeInterface $dateInformation): \DateTime |
|
| 237 | 237 | { |
| 238 | 238 | return self::resetTime($dateInformation); |
| 239 | 239 | } |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | /** |
| 242 | 242 | * Get the End of the given day. |
| 243 | 243 | */ |
| 244 | - public static function getDayEnd(string|\DateTimeInterface $dateInformation): \DateTime |
|
| 244 | + public static function getDayEnd(string | \DateTimeInterface $dateInformation): \DateTime |
|
| 245 | 245 | { |
| 246 | 246 | $dateTime = self::resetTime($dateInformation); |
| 247 | 247 | $dateTime->setTime(23, 59, 59); |