@@ -48,9 +48,9 @@ |
||
| 48 | 48 | |
| 49 | 49 | $type = GqlEntityRegistry::createEntity(self::class, new InterfaceType([ |
| 50 | 50 | 'name' => static::getName(), |
| 51 | - 'fields' => self::class . '::getFieldDefinitions', |
|
| 51 | + 'fields' => self::class.'::getFieldDefinitions', |
|
| 52 | 52 | 'description' => 'This is the interface implemented by Retour.', |
| 53 | - 'resolveType' => function (array $value) { |
|
| 53 | + 'resolveType' => function(array $value) { |
|
| 54 | 54 | return GqlEntityRegistry::getEntity(RetourGenerator::getName()); |
| 55 | 55 | }, |
| 56 | 56 | ])); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | /** |
| 32 | 32 | * @inheritdoc |
| 33 | 33 | */ |
| 34 | - protected array|bool|int $allowAnonymous = [ |
|
| 34 | + protected array | bool | int $allowAnonymous = [ |
|
| 35 | 35 | 'get-redirects', |
| 36 | 36 | ]; |
| 37 | 37 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | // Protected Properties |
| 43 | 43 | // ========================================================================= |
| 44 | 44 | |
| 45 | - protected array|bool|int $allowAnonymous = []; |
|
| 45 | + protected array | bool | int $allowAnonymous = []; |
|
| 46 | 46 | |
| 47 | 47 | // Public Methods |
| 48 | 48 | // ========================================================================= |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $variables['docsUrl'] = self::DOCUMENTATION_URL; |
| 85 | 85 | $variables['pluginName'] = $pluginName; |
| 86 | 86 | $variables['title'] = $templateTitle; |
| 87 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 87 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 88 | 88 | $variables['crumbs'] = [ |
| 89 | 89 | [ |
| 90 | 90 | 'label' => $pluginName, |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | ], |
| 93 | 93 | [ |
| 94 | 94 | 'label' => $templateTitle, |
| 95 | - 'url' => UrlHelper::cpUrl('retour/redirects' . $siteHandleUri), |
|
| 95 | + 'url' => UrlHelper::cpUrl('retour/redirects'.$siteHandleUri), |
|
| 96 | 96 | ], |
| 97 | 97 | ]; |
| 98 | 98 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
@@ -153,13 +153,13 @@ discard block |
||
| 153 | 153 | if ($redirect->siteId) { |
| 154 | 154 | $site = $sites->getSiteById($redirect->siteId); |
| 155 | 155 | if ($site) { |
| 156 | - MultiSiteHelper::requirePermission('editSite:' . $site->uid); |
|
| 156 | + MultiSiteHelper::requirePermission('editSite:'.$site->uid); |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | if ($siteId) { |
| 160 | 160 | $site = $sites->getSiteById($siteId); |
| 161 | 161 | if ($site) { |
| 162 | - MultiSiteHelper::requirePermission('editSite:' . $site->uid); |
|
| 162 | + MultiSiteHelper::requirePermission('editSite:'.$site->uid); |
|
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | $pluginName = Retour::$settings->pluginName; |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | ], |
| 196 | 196 | [ |
| 197 | 197 | 'label' => $templateTitle, |
| 198 | - 'url' => UrlHelper::cpUrl('retour/edit-redirect/' . $redirectId), |
|
| 198 | + 'url' => UrlHelper::cpUrl('retour/edit-redirect/'.$redirectId), |
|
| 199 | 199 | ], |
| 200 | 200 | ]; |
| 201 | 201 | $variables['docTitle'] = "{$pluginName} - Redirects - {$templateTitle}"; |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | if ($redirectConfig === null) { |
| 254 | 254 | throw new NotFoundHttpException('Redirect not found'); |
| 255 | 255 | } |
| 256 | - $redirectConfig['id'] = (int)$redirectConfig['id']; |
|
| 256 | + $redirectConfig['id'] = (int) $redirectConfig['id']; |
|
| 257 | 257 | // Handle enforcing trailing slashes |
| 258 | 258 | $generalConfig = Craft::$app->getConfig()->getGeneral(); |
| 259 | 259 | if ($generalConfig->addTrailingSlashesToUrls && $redirectConfig['redirectMatchType'] === 'exactmatch') { |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | $variables['docsUrl'] = self::DOCUMENTATION_URL; |
| 338 | 338 | $variables['pluginName'] = $pluginName; |
| 339 | 339 | $variables['title'] = $templateTitle; |
| 340 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 340 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 341 | 341 | $variables['crumbs'] = [ |
| 342 | 342 | [ |
| 343 | 343 | 'label' => $pluginName, |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | ], |
| 346 | 346 | [ |
| 347 | 347 | 'label' => $templateTitle, |
| 348 | - 'url' => UrlHelper::cpUrl('retour/shortlinks' . $siteHandleUri), |
|
| 348 | + 'url' => UrlHelper::cpUrl('retour/shortlinks'.$siteHandleUri), |
|
| 349 | 349 | ], |
| 350 | 350 | ]; |
| 351 | 351 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
@@ -400,13 +400,13 @@ discard block |
||
| 400 | 400 | if (!preg_match('/\.[^\/]+$/', $url) && strpos($url, '?') === false) { |
| 401 | 401 | // If it's a root relative URL, assume it's a site URL |
| 402 | 402 | if (UrlHelper::isRootRelativeUrl($url)) { |
| 403 | - return rtrim($url, '/') . '/'; |
|
| 403 | + return rtrim($url, '/').'/'; |
|
| 404 | 404 | } |
| 405 | 405 | // If the URL matches any of the site's base URLs, assume it's a site URL |
| 406 | 406 | $sites = Craft::$app->getSites()->getAllSites(); |
| 407 | 407 | foreach ($sites as $site) { |
| 408 | 408 | if (strpos($url, $site->getBaseUrl()) === 0) { |
| 409 | - return rtrim($url, '/') . '/'; |
|
| 409 | + return rtrim($url, '/').'/'; |
|
| 410 | 410 | } |
| 411 | 411 | } |
| 412 | 412 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | // Protected Properties |
| 41 | 41 | // ========================================================================= |
| 42 | 42 | |
| 43 | - protected array|bool|int $allowAnonymous = []; |
|
| 43 | + protected array | bool | int $allowAnonymous = []; |
|
| 44 | 44 | |
| 45 | 45 | // Public Methods |
| 46 | 46 | // ========================================================================= |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $variables['docsUrl'] = self::DOCUMENTATION_URL; |
| 85 | 85 | $variables['pluginName'] = $pluginName; |
| 86 | 86 | $variables['title'] = $templateTitle; |
| 87 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 87 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 88 | 88 | $variables['crumbs'] = [ |
| 89 | 89 | [ |
| 90 | 90 | 'label' => $pluginName, |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | ], |
| 93 | 93 | [ |
| 94 | 94 | 'label' => $templateTitle, |
| 95 | - 'url' => UrlHelper::cpUrl('retour/dashboard' . $siteHandleUri), |
|
| 95 | + 'url' => UrlHelper::cpUrl('retour/dashboard'.$siteHandleUri), |
|
| 96 | 96 | ], |
| 97 | 97 | ]; |
| 98 | 98 | $variables['docTitle'] = "{$pluginName} - {$templateTitle}"; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | // Protected Properties |
| 89 | 89 | // ========================================================================= |
| 90 | 90 | |
| 91 | - protected array|bool|int $allowAnonymous = []; |
|
| 91 | + protected array | bool | int $allowAnonymous = []; |
|
| 92 | 92 | |
| 93 | 93 | // Public Methods |
| 94 | 94 | // ========================================================================= |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $csv->setOffset(1); |
| 175 | 175 | $columns = ArrayHelper::filterEmptyStringsFromArray($columns); |
| 176 | 176 | $rowIndex = 1; |
| 177 | - $csv->each(function ($row) use ($headers, $columns, &$rowIndex, &$hasErrors) { |
|
| 177 | + $csv->each(function($row) use ($headers, $columns, &$rowIndex, &$hasErrors) { |
|
| 178 | 178 | $redirectConfig = [ |
| 179 | 179 | 'id' => 0, |
| 180 | 180 | ]; |
@@ -188,9 +188,9 @@ discard block |
||
| 188 | 188 | $index++; |
| 189 | 189 | } |
| 190 | 190 | $redirectDump = print_r($redirectConfig, true); |
| 191 | - Craft::debug("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__); |
|
| 191 | + Craft::debug("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__); |
|
| 192 | 192 | if (!Retour::$plugin->redirects->saveRedirect($redirectConfig)) { |
| 193 | - Craft::info("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__); |
|
| 193 | + Craft::info("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__); |
|
| 194 | 194 | $hasErrors = true; |
| 195 | 195 | } |
| 196 | 196 | $rowIndex++; |
@@ -230,9 +230,9 @@ discard block |
||
| 230 | 230 | $index++; |
| 231 | 231 | } |
| 232 | 232 | $redirectDump = print_r($redirectConfig, true); |
| 233 | - Craft::debug("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__); |
|
| 233 | + Craft::debug("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__); |
|
| 234 | 234 | if (!Retour::$plugin->redirects->saveRedirect($redirectConfig)) { |
| 235 | - Craft::info("-> ROW #$rowIndex contents: " . $redirectDump, __METHOD__); |
|
| 235 | + Craft::info("-> ROW #$rowIndex contents: ".$redirectDump, __METHOD__); |
|
| 236 | 236 | $hasErrors = true; |
| 237 | 237 | } |
| 238 | 238 | $rowIndex++; |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $variables['docsUrl'] = self::DOCUMENTATION_URL; |
| 282 | 282 | $variables['pluginName'] = $pluginName; |
| 283 | 283 | $variables['title'] = $templateTitle; |
| 284 | - $siteHandleUri = Craft::$app->isMultiSite ? '/' . $siteHandle : ''; |
|
| 284 | + $siteHandleUri = Craft::$app->isMultiSite ? '/'.$siteHandle : ''; |
|
| 285 | 285 | $variables['crumbs'] = [ |
| 286 | 286 | [ |
| 287 | 287 | 'label' => $pluginName, |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | ], |
| 290 | 290 | [ |
| 291 | 291 | 'label' => 'Redirects', |
| 292 | - 'url' => UrlHelper::cpUrl('retour/redirects' . $siteHandleUri), |
|
| 292 | + 'url' => UrlHelper::cpUrl('retour/redirects'.$siteHandleUri), |
|
| 293 | 293 | ], |
| 294 | 294 | ]; |
| 295 | 295 | $variables['docTitle'] = "{$pluginName} - Redirects - {$templateTitle}"; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | $file = UploadedFile::getInstanceByName('file'); |
| 300 | 300 | if ($file !== null) { |
| 301 | 301 | $filename = uniqid($file->name, true); |
| 302 | - $filePath = Craft::$app->getPath()->getTempPath() . DIRECTORY_SEPARATOR . $filename; |
|
| 302 | + $filePath = Craft::$app->getPath()->getTempPath().DIRECTORY_SEPARATOR.$filename; |
|
| 303 | 303 | $file->saveAs($filePath, false); |
| 304 | 304 | // Also save the file to the cache as a backup way to access it |
| 305 | 305 | $cache = Craft::$app->getCache(); |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | } |
| 423 | 423 | $csv->insertOne(array_values($columns)); |
| 424 | 424 | $csv->insertAll($data); |
| 425 | - $csv->output($filename . '.csv'); |
|
| 425 | + $csv->output($filename.'.csv'); |
|
| 426 | 426 | exit(0); |
| 427 | 427 | } |
| 428 | 428 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | /** |
| 36 | 36 | * @var bool|array |
| 37 | 37 | */ |
| 38 | - protected array|bool|int $allowAnonymous = [ |
|
| 38 | + protected array | bool | int $allowAnonymous = [ |
|
| 39 | 39 | ]; |
| 40 | 40 | |
| 41 | 41 | // Public Methods |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | 'COUNT(handledByRetour = 1 or null) as handled_cnt', |
| 80 | 80 | ]) |
| 81 | 81 | ->where("hitLastTime >= ( CURDATE() - INTERVAL '{$days}' DAY )"); |
| 82 | - if ((int)$siteId !== 0) { |
|
| 82 | + if ((int) $siteId !== 0) { |
|
| 83 | 83 | $query->andWhere(['siteId' => $siteId]); |
| 84 | 84 | } |
| 85 | 85 | $query |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | "COUNT(CASE WHEN \"handledByRetour\" = true THEN 1 END) as handled_cnt", |
| 98 | 98 | ]) |
| 99 | 99 | ->where("\"hitLastTime\" >= ( CURRENT_TIMESTAMP - INTERVAL '{$days} days' )"); |
| 100 | - if ((int)$siteId !== 0) { |
|
| 100 | + if ((int) $siteId !== 0) { |
|
| 101 | 101 | $query->andWhere(['siteId' => $siteId]); |
| 102 | 102 | } |
| 103 | 103 | $query |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | if ($stats) { |
| 163 | 163 | $data = [ |
| 164 | - (int)$stats, |
|
| 165 | - (int)$handledStats, |
|
| 164 | + (int) $stats, |
|
| 165 | + (int) $handledStats, |
|
| 166 | 166 | ]; |
| 167 | 167 | } |
| 168 | 168 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | // Protected Properties |
| 41 | 41 | // ========================================================================= |
| 42 | 42 | |
| 43 | - protected array|bool|int $allowAnonymous = []; |
|
| 43 | + protected array | bool | int $allowAnonymous = []; |
|
| 44 | 44 | |
| 45 | 45 | // Public Methods |
| 46 | 46 | // ========================================================================= |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @return Response The rendered result |
| 54 | 54 | * @throws ForbiddenHttpException |
| 55 | 55 | */ |
| 56 | - public function actionPluginSettings(Settings|bool|null $settings = null): Response |
|
| 56 | + public function actionPluginSettings(Settings | bool | null $settings = null): Response |
|
| 57 | 57 | { |
| 58 | 58 | $variables = []; |
| 59 | 59 | PermissionHelper::controllerPermissionCheck('retour:settings'); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | Event::on( |
| 242 | 242 | ClearCaches::class, |
| 243 | 243 | ClearCaches::EVENT_REGISTER_CACHE_OPTIONS, |
| 244 | - function (RegisterCacheOptionsEvent $event) { |
|
| 244 | + function(RegisterCacheOptionsEvent $event) { |
|
| 245 | 245 | Craft::debug( |
| 246 | 246 | 'ClearCaches::EVENT_REGISTER_CACHE_OPTIONS', |
| 247 | 247 | __METHOD__ |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | Event::on( |
| 258 | 258 | Plugins::class, |
| 259 | 259 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 260 | - function (PluginEvent $event) { |
|
| 260 | + function(PluginEvent $event) { |
|
| 261 | 261 | if ($event->plugin === $this) { |
| 262 | 262 | // Invalidate our caches after we've been installed |
| 263 | 263 | $this->clearAllCaches(); |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | Event::on( |
| 297 | 297 | CraftVariable::class, |
| 298 | 298 | CraftVariable::EVENT_INIT, |
| 299 | - function (Event $event) { |
|
| 299 | + function(Event $event) { |
|
| 300 | 300 | /** @var CraftVariable $variable */ |
| 301 | 301 | $variable = $event->sender; |
| 302 | 302 | $variable->set('retour', [ |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | } |
| 307 | 307 | ); |
| 308 | 308 | |
| 309 | - $prepareRedirectOnElementChange = function (ElementEvent $event) { |
|
| 309 | + $prepareRedirectOnElementChange = function(ElementEvent $event) { |
|
| 310 | 310 | /** @var Element $element */ |
| 311 | 311 | $element = $event->element; |
| 312 | 312 | if ($element !== null && !$event->isNew && $element->getUrl() !== null && !$element->propagating) { |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | } |
| 328 | 328 | }; |
| 329 | 329 | |
| 330 | - $insertRedirectOnElementChange = function (ElementEvent $event) { |
|
| 330 | + $insertRedirectOnElementChange = function(ElementEvent $event) { |
|
| 331 | 331 | /** @var Element $element */ |
| 332 | 332 | $element = $event->element; |
| 333 | 333 | if ($element !== null && !$event->isNew && $element->getUrl() !== null) { |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | Event::on( |
| 346 | 346 | Elements::class, |
| 347 | 347 | Elements::EVENT_BEFORE_SAVE_ELEMENT, |
| 348 | - static function (ElementEvent $event) use ($prepareRedirectOnElementChange) { |
|
| 348 | + static function(ElementEvent $event) use ($prepareRedirectOnElementChange) { |
|
| 349 | 349 | Craft::debug( |
| 350 | 350 | 'Elements::EVENT_BEFORE_SAVE_ELEMENT', |
| 351 | 351 | __METHOD__ |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | Event::on( |
| 358 | 358 | Elements::class, |
| 359 | 359 | Elements::EVENT_AFTER_SAVE_ELEMENT, |
| 360 | - static function (ElementEvent $event) use ($insertRedirectOnElementChange) { |
|
| 360 | + static function(ElementEvent $event) use ($insertRedirectOnElementChange) { |
|
| 361 | 361 | Craft::debug( |
| 362 | 362 | 'Elements::EVENT_AFTER_SAVE_ELEMENT', |
| 363 | 363 | __METHOD__ |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | Event::on( |
| 370 | 370 | Elements::class, |
| 371 | 371 | Elements::EVENT_BEFORE_UPDATE_SLUG_AND_URI, |
| 372 | - static function (ElementEvent $event) use ($prepareRedirectOnElementChange) { |
|
| 372 | + static function(ElementEvent $event) use ($prepareRedirectOnElementChange) { |
|
| 373 | 373 | Craft::debug( |
| 374 | 374 | 'Elements::EVENT_BEFORE_UPDATE_SLUG_AND_URI', |
| 375 | 375 | __METHOD__ |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | Event::on( |
| 382 | 382 | Elements::class, |
| 383 | 383 | Elements::EVENT_AFTER_UPDATE_SLUG_AND_URI, |
| 384 | - static function (ElementEvent $event) use ($insertRedirectOnElementChange) { |
|
| 384 | + static function(ElementEvent $event) use ($insertRedirectOnElementChange) { |
|
| 385 | 385 | Craft::debug( |
| 386 | 386 | 'Elements::EVENT_AFTER_UPDATE_SLUG_AND_URI', |
| 387 | 387 | __METHOD__ |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | Event::on( |
| 394 | 394 | Plugins::class, |
| 395 | 395 | Plugins::EVENT_AFTER_LOAD_PLUGINS, |
| 396 | - function () { |
|
| 396 | + function() { |
|
| 397 | 397 | // Install these only after all other plugins have loaded |
| 398 | 398 | $request = Craft::$app->getRequest(); |
| 399 | 399 | // Only respond to non-console site requests |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | Event::on( |
| 411 | 411 | Fields::class, |
| 412 | 412 | Fields::EVENT_REGISTER_FIELD_TYPES, |
| 413 | - function (RegisterComponentTypesEvent $event) { |
|
| 413 | + function(RegisterComponentTypesEvent $event) { |
|
| 414 | 414 | $event->types[] = ShortLinkField::class; |
| 415 | 415 | } |
| 416 | 416 | ); |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | Event::on( |
| 419 | 419 | Gql::class, |
| 420 | 420 | Gql::EVENT_REGISTER_GQL_TYPES, |
| 421 | - static function (RegisterGqlTypesEvent $event) { |
|
| 421 | + static function(RegisterGqlTypesEvent $event) { |
|
| 422 | 422 | Craft::debug( |
| 423 | 423 | 'Gql::EVENT_REGISTER_GQL_TYPES', |
| 424 | 424 | __METHOD__ |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | Event::on( |
| 431 | 431 | Gql::class, |
| 432 | 432 | Gql::EVENT_REGISTER_GQL_QUERIES, |
| 433 | - static function (RegisterGqlQueriesEvent $event) { |
|
| 433 | + static function(RegisterGqlQueriesEvent $event) { |
|
| 434 | 434 | Craft::debug( |
| 435 | 435 | 'Gql::EVENT_REGISTER_GQL_QUERIES', |
| 436 | 436 | __METHOD__ |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | Event::on( |
| 446 | 446 | Gql::class, |
| 447 | 447 | Gql::EVENT_REGISTER_GQL_SCHEMA_COMPONENTS, |
| 448 | - static function (RegisterGqlSchemaComponentsEvent $event) { |
|
| 448 | + static function(RegisterGqlSchemaComponentsEvent $event) { |
|
| 449 | 449 | Craft::debug( |
| 450 | 450 | 'Gql::EVENT_REGISTER_GQL_SCHEMA_COMPONENTS', |
| 451 | 451 | __METHOD__ |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | Event::on( |
| 468 | 468 | ErrorHandler::class, |
| 469 | 469 | ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION, |
| 470 | - static function (ExceptionEvent $event) { |
|
| 470 | + static function(ExceptionEvent $event) { |
|
| 471 | 471 | Craft::debug( |
| 472 | 472 | 'ErrorHandler::EVENT_BEFORE_HANDLE_EXCEPTION', |
| 473 | 473 | __METHOD__ |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | Event::on( |
| 506 | 506 | UrlManager::class, |
| 507 | 507 | UrlManager::EVENT_REGISTER_SITE_URL_RULES, |
| 508 | - function (RegisterUrlRulesEvent $event) { |
|
| 508 | + function(RegisterUrlRulesEvent $event) { |
|
| 509 | 509 | Craft::debug( |
| 510 | 510 | 'UrlManager::EVENT_REGISTER_SITE_URL_RULES', |
| 511 | 511 | __METHOD__ |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | Event::on( |
| 540 | 540 | Dashboard::class, |
| 541 | 541 | Dashboard::EVENT_REGISTER_WIDGET_TYPES, |
| 542 | - function (RegisterComponentTypesEvent $event) { |
|
| 542 | + function(RegisterComponentTypesEvent $event) { |
|
| 543 | 543 | $currentUser = Craft::$app->getUser()->getIdentity(); |
| 544 | 544 | if ($currentUser->can('accessPlugin-retour')) { |
| 545 | 545 | $event->types[] = RetourWidget::class; |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | Event::on( |
| 551 | 551 | UrlManager::class, |
| 552 | 552 | UrlManager::EVENT_REGISTER_CP_URL_RULES, |
| 553 | - function (RegisterUrlRulesEvent $event) { |
|
| 553 | + function(RegisterUrlRulesEvent $event) { |
|
| 554 | 554 | Craft::debug( |
| 555 | 555 | 'UrlManager::EVENT_REGISTER_CP_URL_RULES', |
| 556 | 556 | __METHOD__ |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | Event::on( |
| 567 | 567 | UserPermissions::class, |
| 568 | 568 | UserPermissions::EVENT_REGISTER_PERMISSIONS, |
| 569 | - function (RegisterUserPermissionsEvent $event) { |
|
| 569 | + function(RegisterUserPermissionsEvent $event) { |
|
| 570 | 570 | Craft::debug( |
| 571 | 571 | 'UserPermissions::EVENT_REGISTER_PERMISSIONS', |
| 572 | 572 | __METHOD__ |
@@ -26,5 +26,5 @@ |
||
| 26 | 26 | /** |
| 27 | 27 | * @var StaticRedirects|array|null The redirect that was resolved |
| 28 | 28 | */ |
| 29 | - public StaticRedirects|array|null $redirect = null; |
|
| 29 | + public StaticRedirects | array | null $redirect = null; |
|
| 30 | 30 | } |