From b41dfccbaee4795fbc13e5382db8f6adec258ca4 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Fri, 10 May 2024 21:49:22 +0100 Subject: [PATCH] Issue #3443117 by bbrala, longwave, quietone: Fix Drupal.Functions.MultiLineFunctionDeclaration coding standard --- composer.lock | 12 +++++----- .../PinnedDevDependencies/composer.json | 2 +- .../Plugin/Attribute/AttributeBase.php | 2 +- .../Component/Plugin/Attribute/Plugin.php | 2 +- .../Discovery/AttributeBridgeDecorator.php | 2 +- .../Discovery/AttributeClassDiscovery.php | 2 +- core/lib/Drupal/Component/Utility/Html.php | 17 ++++++++------ .../Drupal/Core/Action/Attribute/Action.php | 2 +- .../Core/Ajax/TabledragWarningCommand.php | 3 ++- .../Core/Archiver/Attribute/Archiver.php | 3 ++- .../Drupal/Core/Asset/AssetQueryString.php | 2 +- .../Core/Asset/CssCollectionOptimizerLazy.php | 2 +- .../Core/Asset/JsCollectionOptimizerLazy.php | 2 +- .../lib/Drupal/Core/Block/Attribute/Block.php | 2 +- core/lib/Drupal/Core/Cache/VariationCache.php | 2 +- .../Core/Cache/VariationCacheFactory.php | 2 +- .../lib/Drupal/Core/Command/GenerateTheme.php | 4 ++-- .../Config/Action/Attribute/ActionMethod.php | 2 +- .../Plugin/ConfigAction/EntityCreate.php | 2 +- .../Plugin/ConfigAction/EntityMethod.php | 2 +- .../Compiler/RegisterEventSubscribersPass.php | 2 +- .../Core/Display/Attribute/DisplayVariant.php | 2 +- .../Attribute/EntityReferenceSelection.php | 2 +- .../AjaxResponseSubscriber.php | 2 +- .../Drupal/Core/Extension/DatabaseDriver.php | 3 ++- .../InstallProfileUninstallValidator.php | 2 +- .../Core/Installer/Form/SiteSettingsForm.php | 3 ++- .../Core/Mail/Plugin/Mail/SymfonyMailer.php | 3 ++- core/lib/Drupal/Core/Password/PhpPassword.php | 2 +- .../Core/Queue/Attribute/QueueWorker.php | 2 +- .../Core/Session/AccessPolicyProcessor.php | 3 ++- .../Session/CalculatedPermissionsItem.php | 2 +- .../Core/Template/ComponentsTwigExtension.php | 2 +- .../Drupal/Core/Test/EnvironmentCleaner.php | 2 +- .../Drupal/Core/Test/PhpUnitTestRunner.php | 2 +- .../Test/SimpletestTestRunResultsStorage.php | 2 +- .../TestWaitTerminateMiddleware.php | 2 +- core/lib/Drupal/Core/Test/TestRun.php | 2 +- .../Drupal/Core/Theme/ComponentNegotiator.php | 2 +- .../Drupal/Core/Utility/CallableResolver.php | 2 +- .../Core/Validation/Attribute/Constraint.php | 2 +- .../Core/Validation/ExecutionContext.php | 2 +- .../Validation/ExecutionContextFactory.php | 3 ++- .../src/AnnounceFetcher.php | 2 +- .../src/AnnounceRenderer.php | 2 +- .../announcements_feed/src/Announcement.php | 2 +- .../src/Form/ConfigSingleImportForm.php | 2 +- core/modules/config/src/Form/ConfigSync.php | 2 +- .../EventSubscriber/WorkspaceSubscriber.php | 2 +- .../src/Form/FieldStorageReuseForm.php | 2 +- ...FileExtensionSecureConstraintValidator.php | 2 +- .../FileSizeLimitConstraintValidator.php | 2 +- .../FileValidationConstraintValidator.php | 2 +- .../file/src/Validation/FileValidator.php | 2 +- .../src/Attribute/LanguageNegotiation.php | 12 +++++----- .../media/src/Attribute/MediaSource.php | 2 +- .../media/src/Attribute/OEmbedMediaSource.php | 2 +- .../src/Attribute/MigrateField.php | 2 +- .../navigation/src/Form/SettingsForm.php | 2 +- core/modules/search/src/Attribute/Search.php | 2 +- .../system/src/Controller/BatchController.php | 2 +- .../SecurityFileUploadEventSubscriber.php | 2 +- .../src/Form/DevelopmentSettingsForm.php | 2 +- .../src/Form/MenuLinksetSettingsForm.php | 2 +- .../system/src/ModuleAdminLinksHelper.php | 2 +- .../system/src/Routing/AssetRoutes.php | 2 +- .../src/Plugin/Attribute/PluginExample.php | 2 +- .../taxonomy/src/VocabularyListBuilder.php | 12 ++++++---- .../src/Controller/ToolbarController.php | 2 +- .../user/src/ModulePermissionsLinkHelper.php | 2 +- core/modules/user/src/RoleListBuilder.php | 8 ++++--- .../views/src/Attribute/ViewsAccess.php | 2 +- .../src/Attribute/ViewsArgumentDefault.php | 2 +- .../src/Attribute/ViewsArgumentValidator.php | 2 +- .../views/src/Attribute/ViewsCache.php | 2 +- .../views/src/Attribute/ViewsDisplay.php | 2 +- .../src/Attribute/ViewsDisplayExtender.php | 2 +- .../views/src/Attribute/ViewsExposedForm.php | 2 +- .../views/src/Attribute/ViewsPager.php | 2 +- .../views/src/Attribute/ViewsQuery.php | 2 +- core/modules/views/src/Attribute/ViewsRow.php | 2 +- .../views/src/Attribute/ViewsStyle.php | 2 +- .../views/src/Attribute/ViewsWizard.php | 2 +- core/modules/views/src/ViewsConfigUpdater.php | 2 +- .../WorkspacesHtmlEntityFormController.php | 2 +- .../src/EntityQuery/QueryFactory.php | 2 +- .../modules/workspaces/src/EntityTypeInfo.php | 2 +- .../src/Event/WorkspacePublishEvent.php | 2 +- .../Negotiator/SessionWorkspaceNegotiator.php | 2 +- .../workspaces/src/WorkspaceInformation.php | 2 +- .../src/WorkspacesMenuTreeStorage.php | 2 +- core/phpcs.xml.dist | 23 +------------------ .../Attribute/Fixtures/CustomPlugin.php | 2 +- .../Session/AccessPolicyProcessorTest.php | 2 +- 94 files changed, 131 insertions(+), 138 deletions(-) diff --git a/composer.lock b/composer.lock index a8ab3cc28454..de65532619df 100644 --- a/composer.lock +++ b/composer.lock @@ -5242,16 +5242,16 @@ }, { "name": "drupal/coder", - "version": "8.3.23", + "version": "8.3.24", "source": { "type": "git", "url": "https://github.com/pfrenssen/coder.git", - "reference": "1a1613d83c08dac5be593f2775c9eccae1b41805" + "reference": "1a59890f972db5da091354f0191dec1037f7c582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pfrenssen/coder/zipball/1a1613d83c08dac5be593f2775c9eccae1b41805", - "reference": "1a1613d83c08dac5be593f2775c9eccae1b41805", + "url": "https://api.github.com/repos/pfrenssen/coder/zipball/1a59890f972db5da091354f0191dec1037f7c582", + "reference": "1a59890f972db5da091354f0191dec1037f7c582", "shasum": "" }, "require": { @@ -5260,7 +5260,7 @@ "php": ">=7.2", "sirbrillig/phpcs-variable-analysis": "^2.11.7", "slevomat/coding-standard": "^8.11", - "squizlabs/php_codesniffer": "^3.7.1", + "squizlabs/php_codesniffer": "^3.9.1", "symfony/yaml": ">=3.4.0" }, "require-dev": { @@ -5289,7 +5289,7 @@ "issues": "https://www.drupal.org/project/issues/coder", "source": "https://www.drupal.org/project/coder" }, - "time": "2024-01-27T18:13:12+00:00" + "time": "2024-04-21T06:13:24+00:00" }, { "name": "google/protobuf", diff --git a/composer/Metapackage/PinnedDevDependencies/composer.json b/composer/Metapackage/PinnedDevDependencies/composer.json index 07398294462d..b93bfd49a39d 100644 --- a/composer/Metapackage/PinnedDevDependencies/composer.json +++ b/composer/Metapackage/PinnedDevDependencies/composer.json @@ -20,7 +20,7 @@ "composer/xdebug-handler": "3.0.4", "dealerdirect/phpcodesniffer-composer-installer": "v1.0.0", "doctrine/instantiator": "2.0.0", - "drupal/coder": "8.3.23", + "drupal/coder": "8.3.24", "google/protobuf": "v3.25.3", "justinrainbow/json-schema": "v5.2.13", "lullabot/mink-selenium2-driver": "v1.7.2", diff --git a/core/lib/Drupal/Component/Plugin/Attribute/AttributeBase.php b/core/lib/Drupal/Component/Plugin/Attribute/AttributeBase.php index 7ebc93e69c42..fa94d6571b68 100644 --- a/core/lib/Drupal/Component/Plugin/Attribute/AttributeBase.php +++ b/core/lib/Drupal/Component/Plugin/Attribute/AttributeBase.php @@ -24,7 +24,7 @@ abstract class AttributeBase implements AttributeInterface { * The attribute class ID. */ public function __construct( - protected readonly string $id + protected readonly string $id, ) {} /** diff --git a/core/lib/Drupal/Component/Plugin/Attribute/Plugin.php b/core/lib/Drupal/Component/Plugin/Attribute/Plugin.php index af98c93c6a25..75c2562229a8 100644 --- a/core/lib/Drupal/Component/Plugin/Attribute/Plugin.php +++ b/core/lib/Drupal/Component/Plugin/Attribute/Plugin.php @@ -24,7 +24,7 @@ class Plugin extends AttributeBase { */ public function __construct( public readonly string $id, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/lib/Drupal/Component/Plugin/Discovery/AttributeBridgeDecorator.php b/core/lib/Drupal/Component/Plugin/Discovery/AttributeBridgeDecorator.php index 3f354693e95b..3ca88e84d683 100644 --- a/core/lib/Drupal/Component/Plugin/Discovery/AttributeBridgeDecorator.php +++ b/core/lib/Drupal/Component/Plugin/Discovery/AttributeBridgeDecorator.php @@ -21,7 +21,7 @@ class AttributeBridgeDecorator implements DiscoveryInterface { */ public function __construct( protected readonly DiscoveryInterface $decorated, - protected readonly string $pluginDefinitionAttributeName + protected readonly string $pluginDefinitionAttributeName, ) {} /** diff --git a/core/lib/Drupal/Component/Plugin/Discovery/AttributeClassDiscovery.php b/core/lib/Drupal/Component/Plugin/Discovery/AttributeClassDiscovery.php index 6409c7e15313..3477b746cc84 100644 --- a/core/lib/Drupal/Component/Plugin/Discovery/AttributeClassDiscovery.php +++ b/core/lib/Drupal/Component/Plugin/Discovery/AttributeClassDiscovery.php @@ -31,7 +31,7 @@ class AttributeClassDiscovery implements DiscoveryInterface { */ public function __construct( protected readonly array $pluginNamespaces = [], - protected readonly string $pluginDefinitionAttributeName = Plugin::class + protected readonly string $pluginDefinitionAttributeName = Plugin::class, ) { $file_cache_suffix = str_replace('\\', '_', $this->pluginDefinitionAttributeName); $this->fileCache = FileCacheFactory::get('attribute_discovery:' . $this->getFileCacheSuffix($file_cache_suffix)); diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php index 0f810adcecf4..1706b0cde69d 100644 --- a/core/lib/Drupal/Component/Utility/Html.php +++ b/core/lib/Drupal/Component/Utility/Html.php @@ -95,13 +95,16 @@ public static function getClass($class) { * @return string * The cleaned identifier. */ - public static function cleanCssIdentifier($identifier, array $filter = [ - ' ' => '-', - '_' => '-', - '/' => '-', - '[' => '-', - ']' => '', - ]) { + public static function cleanCssIdentifier( + $identifier, + array $filter = [ + ' ' => '-', + '_' => '-', + '/' => '-', + '[' => '-', + ']' => '', + ], + ) { // We could also use strtr() here but its much slower than str_replace(). In // order to keep '__' to stay '__' we first replace it with a different // placeholder after checking that it is not defined as a filter. diff --git a/core/lib/Drupal/Core/Action/Attribute/Action.php b/core/lib/Drupal/Core/Action/Attribute/Action.php index 42e3c2e59e33..1c1cebfc2e06 100644 --- a/core/lib/Drupal/Core/Action/Attribute/Action.php +++ b/core/lib/Drupal/Core/Action/Attribute/Action.php @@ -45,7 +45,7 @@ public function __construct( public readonly ?TranslatableMarkup $category = NULL, public readonly ?string $deriver = NULL, public readonly ?string $confirm_form_route_name = NULL, - public readonly ?string $type = NULL + public readonly ?string $type = NULL, ) {} } diff --git a/core/lib/Drupal/Core/Ajax/TabledragWarningCommand.php b/core/lib/Drupal/Core/Ajax/TabledragWarningCommand.php index e1cc60892e32..3539cd7c113f 100644 --- a/core/lib/Drupal/Core/Ajax/TabledragWarningCommand.php +++ b/core/lib/Drupal/Core/Ajax/TabledragWarningCommand.php @@ -28,7 +28,8 @@ class TabledragWarningCommand implements CommandInterface, CommandWithAttachedAs */ public function __construct( protected string $id, - protected string $tabledrag_instance) {} + protected string $tabledrag_instance, + ) {} /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Archiver/Attribute/Archiver.php b/core/lib/Drupal/Core/Archiver/Attribute/Archiver.php index 07884ad9b37a..6fbbcbd15ebc 100644 --- a/core/lib/Drupal/Core/Archiver/Attribute/Archiver.php +++ b/core/lib/Drupal/Core/Archiver/Attribute/Archiver.php @@ -39,6 +39,7 @@ public function __construct( public readonly ?TranslatableMarkup $title = NULL, public readonly ?TranslatableMarkup $description = NULL, public readonly array $extensions = [], - public readonly ?string $deriver = NULL) {} + public readonly ?string $deriver = NULL, + ) {} } diff --git a/core/lib/Drupal/Core/Asset/AssetQueryString.php b/core/lib/Drupal/Core/Asset/AssetQueryString.php index fa0d6c20805b..7725a8f565d1 100644 --- a/core/lib/Drupal/Core/Asset/AssetQueryString.php +++ b/core/lib/Drupal/Core/Asset/AssetQueryString.php @@ -30,7 +30,7 @@ class AssetQueryString implements AssetQueryStringInterface { */ public function __construct( protected StateInterface $state, - protected TimeInterface $time + protected TimeInterface $time, ) {} /** diff --git a/core/lib/Drupal/Core/Asset/CssCollectionOptimizerLazy.php b/core/lib/Drupal/Core/Asset/CssCollectionOptimizerLazy.php index e55bd58cd2e7..34e549ee4a36 100644 --- a/core/lib/Drupal/Core/Asset/CssCollectionOptimizerLazy.php +++ b/core/lib/Drupal/Core/Asset/CssCollectionOptimizerLazy.php @@ -52,7 +52,7 @@ public function __construct( protected readonly ConfigFactoryInterface $configFactory, protected readonly FileUrlGeneratorInterface $fileUrlGenerator, protected readonly TimeInterface $time, - protected readonly LanguageManagerInterface $languageManager + protected readonly LanguageManagerInterface $languageManager, ) {} /** diff --git a/core/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php b/core/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php index c893507fdba5..647a2c36a017 100644 --- a/core/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php +++ b/core/lib/Drupal/Core/Asset/JsCollectionOptimizerLazy.php @@ -52,7 +52,7 @@ public function __construct( protected readonly ConfigFactoryInterface $configFactory, protected readonly FileUrlGeneratorInterface $fileUrlGenerator, protected readonly TimeInterface $time, - protected readonly LanguageManagerInterface $languageManager + protected readonly LanguageManagerInterface $languageManager, ) {} /** diff --git a/core/lib/Drupal/Core/Block/Attribute/Block.php b/core/lib/Drupal/Core/Block/Attribute/Block.php index 46d5ccc5ca41..d5b6cafb758b 100644 --- a/core/lib/Drupal/Core/Block/Attribute/Block.php +++ b/core/lib/Drupal/Core/Block/Attribute/Block.php @@ -34,7 +34,7 @@ public function __construct( public readonly ?TranslatableMarkup $category = NULL, public readonly array $context_definitions = [], public readonly ?string $deriver = NULL, - public readonly array $forms = [] + public readonly array $forms = [], ) {} } diff --git a/core/lib/Drupal/Core/Cache/VariationCache.php b/core/lib/Drupal/Core/Cache/VariationCache.php index 05a7858c4ef5..6f1bd2d058b5 100644 --- a/core/lib/Drupal/Core/Cache/VariationCache.php +++ b/core/lib/Drupal/Core/Cache/VariationCache.php @@ -25,7 +25,7 @@ class VariationCache implements VariationCacheInterface { public function __construct( protected RequestStack $requestStack, protected CacheBackendInterface $cacheBackend, - protected CacheContextsManager $cacheContextsManager + protected CacheContextsManager $cacheContextsManager, ) {} /** diff --git a/core/lib/Drupal/Core/Cache/VariationCacheFactory.php b/core/lib/Drupal/Core/Cache/VariationCacheFactory.php index d870ed5972f1..4256322a601d 100644 --- a/core/lib/Drupal/Core/Cache/VariationCacheFactory.php +++ b/core/lib/Drupal/Core/Cache/VariationCacheFactory.php @@ -32,7 +32,7 @@ class VariationCacheFactory implements VariationCacheFactoryInterface { public function __construct( protected RequestStack $requestStack, protected CacheFactoryInterface $cacheFactory, - protected CacheContextsManager $cacheContextsManager + protected CacheContextsManager $cacheContextsManager, ) {} /** diff --git a/core/lib/Drupal/Core/Command/GenerateTheme.php b/core/lib/Drupal/Core/Command/GenerateTheme.php index 490dcc97a806..55d344e366a6 100644 --- a/core/lib/Drupal/Core/Command/GenerateTheme.php +++ b/core/lib/Drupal/Core/Command/GenerateTheme.php @@ -234,7 +234,7 @@ private static function loadStarterKitConfig( Extension $theme, string $version, string $name, - string $description + string $description, ): array { $starterkit_config_file = $theme->getPath() . '/' . $theme->getName() . '.starterkit.yml'; if (!file_exists($starterkit_config_file)) { @@ -290,7 +290,7 @@ private static function loadStarterKitConfig( private static function getStarterKitVersion( Extension $theme, - SymfonyStyle $io + SymfonyStyle $io, ): string { $source_version = $theme->info['version'] ?? ''; if ($source_version === '') { diff --git a/core/lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php b/core/lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php index c6abf041d6c2..f5f9b0de5ec9 100644 --- a/core/lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php +++ b/core/lib/Drupal/Core/Config/Action/Attribute/ActionMethod.php @@ -34,7 +34,7 @@ final class ActionMethod { public function __construct( public readonly Exists $exists = Exists::ErrorIfNotExists, public readonly TranslatableMarkup|string $adminLabel = '', - public readonly bool|string $pluralize = TRUE + public readonly bool|string $pluralize = TRUE, ) { } diff --git a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php index ad33645b3ddf..f1e5c54f4d30 100644 --- a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php +++ b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityCreate.php @@ -33,7 +33,7 @@ final class EntityCreate implements ConfigActionPluginInterface, ContainerFactor */ public function __construct( protected readonly ConfigManagerInterface $configManager, - protected readonly Exists $exists + protected readonly Exists $exists, ) { } diff --git a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php index 73189f451167..8b00b4381c16 100644 --- a/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php +++ b/core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php @@ -67,7 +67,7 @@ public function __construct( protected readonly Exists $exists, protected readonly int $numberOfParams, protected readonly int $numberOfRequiredParams, - protected readonly bool $pluralized + protected readonly bool $pluralized, ) { } diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventSubscribersPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventSubscribersPass.php index 3ecc3460cec4..845f0ee6ded9 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventSubscribersPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterEventSubscribersPass.php @@ -18,7 +18,7 @@ class RegisterEventSubscribersPass implements CompilerPassInterface { * The Symfony compiler pass that registers event subscribers. */ public function __construct( - protected RegisterListenersPass $pass + protected RegisterListenersPass $pass, ) {} /** diff --git a/core/lib/Drupal/Core/Display/Attribute/DisplayVariant.php b/core/lib/Drupal/Core/Display/Attribute/DisplayVariant.php index 091dfcf7fed8..59e3d98299ff 100644 --- a/core/lib/Drupal/Core/Display/Attribute/DisplayVariant.php +++ b/core/lib/Drupal/Core/Display/Attribute/DisplayVariant.php @@ -44,7 +44,7 @@ class DisplayVariant extends Plugin { public function __construct( public readonly string $id, public readonly TranslatableMarkup $admin_label, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/lib/Drupal/Core/Entity/Attribute/EntityReferenceSelection.php b/core/lib/Drupal/Core/Entity/Attribute/EntityReferenceSelection.php index 3c20cc60d95e..76b8b950ec7d 100644 --- a/core/lib/Drupal/Core/Entity/Attribute/EntityReferenceSelection.php +++ b/core/lib/Drupal/Core/Entity/Attribute/EntityReferenceSelection.php @@ -59,7 +59,7 @@ public function __construct( public readonly string $group, public readonly int $weight, public readonly array $entity_types = [], - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php index 8e37afbcdf9c..2491b6cd698a 100644 --- a/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/AjaxResponseSubscriber.php @@ -23,7 +23,7 @@ class AjaxResponseSubscriber implements EventSubscriberInterface { */ public function __construct( #[AutowireServiceClosure('ajax_response.attachments_processor')] - protected \Closure $processorClosure + protected \Closure $processorClosure, ) {} /** diff --git a/core/lib/Drupal/Core/Extension/DatabaseDriver.php b/core/lib/Drupal/Core/Extension/DatabaseDriver.php index cb4e7a4a880c..aa468bea79db 100644 --- a/core/lib/Drupal/Core/Extension/DatabaseDriver.php +++ b/core/lib/Drupal/Core/Extension/DatabaseDriver.php @@ -36,7 +36,8 @@ public function __construct( string $root, protected Extension $module, protected string $driverName, - protected array $discoveredModules) { + protected array $discoveredModules, + ) { $this->root = $root; $this->type = 'database_driver'; } diff --git a/core/lib/Drupal/Core/Extension/InstallProfileUninstallValidator.php b/core/lib/Drupal/Core/Extension/InstallProfileUninstallValidator.php index 97eb71f67e12..87673b413a4f 100644 --- a/core/lib/Drupal/Core/Extension/InstallProfileUninstallValidator.php +++ b/core/lib/Drupal/Core/Extension/InstallProfileUninstallValidator.php @@ -27,7 +27,7 @@ public function __construct( protected ThemeExtensionList $themeExtensionList, protected string|false|null $installProfile, protected string $root, - protected string $sitePath + protected string $sitePath, ) { $this->setStringTranslation($string_translation); } diff --git a/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php b/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php index 46cf9e2084c2..81682b8278ea 100644 --- a/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php +++ b/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php @@ -33,7 +33,8 @@ class SiteSettingsForm extends FormBase { public function __construct( protected string $sitePath, protected RendererInterface $renderer, - protected DatabaseDriverList $databaseDriverList) { + protected DatabaseDriverList $databaseDriverList, + ) { } /** diff --git a/core/lib/Drupal/Core/Mail/Plugin/Mail/SymfonyMailer.php b/core/lib/Drupal/Core/Mail/Plugin/Mail/SymfonyMailer.php index 509718dab1e9..c848a0a43108 100644 --- a/core/lib/Drupal/Core/Mail/Plugin/Mail/SymfonyMailer.php +++ b/core/lib/Drupal/Core/Mail/Plugin/Mail/SymfonyMailer.php @@ -93,7 +93,8 @@ public static function create(ContainerInterface $container, array $configuratio */ public function __construct( protected LoggerInterface $logger, - protected ?MailerInterface $mailer = NULL) { + protected ?MailerInterface $mailer = NULL, + ) { } public function format(array $message) { diff --git a/core/lib/Drupal/Core/Password/PhpPassword.php b/core/lib/Drupal/Core/Password/PhpPassword.php index c199de8fd8b7..e854621b6848 100644 --- a/core/lib/Drupal/Core/Password/PhpPassword.php +++ b/core/lib/Drupal/Core/Password/PhpPassword.php @@ -21,7 +21,7 @@ class PhpPassword implements PasswordInterface { */ public function __construct( protected string $algorithm = PASSWORD_DEFAULT, - protected array $options = [] + protected array $options = [], ) { } diff --git a/core/lib/Drupal/Core/Queue/Attribute/QueueWorker.php b/core/lib/Drupal/Core/Queue/Attribute/QueueWorker.php index 98db11692a03..ff96205317d2 100644 --- a/core/lib/Drupal/Core/Queue/Attribute/QueueWorker.php +++ b/core/lib/Drupal/Core/Queue/Attribute/QueueWorker.php @@ -54,7 +54,7 @@ public function __construct( public readonly string $id, public readonly ?TranslatableMarkup $title = NULL, public readonly ?array $cron = NULL, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php b/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php index 4e6849b47adf..6dc0e359bc06 100644 --- a/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php +++ b/core/lib/Drupal/Core/Session/AccessPolicyProcessor.php @@ -23,7 +23,8 @@ public function __construct( protected VariationCacheInterface $variationStatic, protected CacheBackendInterface $static, protected AccountProxyInterface $currentUser, - protected AccountSwitcherInterface $accountSwitcher) { + protected AccountSwitcherInterface $accountSwitcher, + ) { } /** diff --git a/core/lib/Drupal/Core/Session/CalculatedPermissionsItem.php b/core/lib/Drupal/Core/Session/CalculatedPermissionsItem.php index d8e16cfc245a..ea9c9eeb5bfc 100644 --- a/core/lib/Drupal/Core/Session/CalculatedPermissionsItem.php +++ b/core/lib/Drupal/Core/Session/CalculatedPermissionsItem.php @@ -25,7 +25,7 @@ public function __construct( protected array $permissions, protected bool $isAdmin = FALSE, protected string $scope = AccessPolicyInterface::SCOPE_DRUPAL, - protected string|int $identifier = AccessPolicyInterface::SCOPE_DRUPAL + protected string|int $identifier = AccessPolicyInterface::SCOPE_DRUPAL, ) { $this->permissions = $isAdmin ? [] : array_unique($permissions); } diff --git a/core/lib/Drupal/Core/Template/ComponentsTwigExtension.php b/core/lib/Drupal/Core/Template/ComponentsTwigExtension.php index 49e214c6b886..5ff5c7e94b6b 100644 --- a/core/lib/Drupal/Core/Template/ComponentsTwigExtension.php +++ b/core/lib/Drupal/Core/Template/ComponentsTwigExtension.php @@ -27,7 +27,7 @@ final class ComponentsTwigExtension extends AbstractExtension { */ public function __construct( protected ComponentPluginManager $pluginManager, - protected ComponentValidator $componentValidator + protected ComponentValidator $componentValidator, ) {} /** diff --git a/core/lib/Drupal/Core/Test/EnvironmentCleaner.php b/core/lib/Drupal/Core/Test/EnvironmentCleaner.php index 75d362c5f8a8..fa9d7c627b19 100644 --- a/core/lib/Drupal/Core/Test/EnvironmentCleaner.php +++ b/core/lib/Drupal/Core/Test/EnvironmentCleaner.php @@ -32,7 +32,7 @@ public function __construct( protected Connection $testDatabase, protected TestRunResultsStorageInterface $testRunResultsStorage, protected OutputInterface $output, - protected FileSystemInterface $fileSystem + protected FileSystemInterface $fileSystem, ) { } diff --git a/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php index e9103ceb9f47..4aff3a7df3de 100644 --- a/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php +++ b/core/lib/Drupal/Core/Test/PhpUnitTestRunner.php @@ -37,7 +37,7 @@ class PhpUnitTestRunner implements ContainerInjectionInterface { */ public function __construct( protected string $appRoot, - protected string $workingDirectory + protected string $workingDirectory, ) { } diff --git a/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php b/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php index 9d07e8273ac1..28398f9b7381 100644 --- a/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php +++ b/core/lib/Drupal/Core/Test/SimpletestTestRunResultsStorage.php @@ -20,7 +20,7 @@ class SimpletestTestRunResultsStorage implements TestRunResultsStorageInterface * The database connection to use for inserting assertions. */ public function __construct( - protected Connection $connection + protected Connection $connection, ) { } diff --git a/core/lib/Drupal/Core/Test/StackMiddleware/TestWaitTerminateMiddleware.php b/core/lib/Drupal/Core/Test/StackMiddleware/TestWaitTerminateMiddleware.php index 58cc844024c4..be2a675d0209 100644 --- a/core/lib/Drupal/Core/Test/StackMiddleware/TestWaitTerminateMiddleware.php +++ b/core/lib/Drupal/Core/Test/StackMiddleware/TestWaitTerminateMiddleware.php @@ -26,7 +26,7 @@ class TestWaitTerminateMiddleware implements HttpKernelInterface { public function __construct( protected HttpKernelInterface $httpKernel, protected StateInterface $state, - protected LockBackendInterface $lock + protected LockBackendInterface $lock, ) { } diff --git a/core/lib/Drupal/Core/Test/TestRun.php b/core/lib/Drupal/Core/Test/TestRun.php index 1538fb2ed403..5214093ce49e 100644 --- a/core/lib/Drupal/Core/Test/TestRun.php +++ b/core/lib/Drupal/Core/Test/TestRun.php @@ -33,7 +33,7 @@ class TestRun { */ public function __construct( protected TestRunResultsStorageInterface $testRunResultsStorage, - protected int|string $testId + protected int|string $testId, ) { } diff --git a/core/lib/Drupal/Core/Theme/ComponentNegotiator.php b/core/lib/Drupal/Core/Theme/ComponentNegotiator.php index 43cf466c07f4..b6fb43577461 100644 --- a/core/lib/Drupal/Core/Theme/ComponentNegotiator.php +++ b/core/lib/Drupal/Core/Theme/ComponentNegotiator.php @@ -27,7 +27,7 @@ class ComponentNegotiator { */ public function __construct( protected ThemeManagerInterface $themeManager, - protected ModuleExtensionList $moduleExtensionList + protected ModuleExtensionList $moduleExtensionList, ) { } diff --git a/core/lib/Drupal/Core/Utility/CallableResolver.php b/core/lib/Drupal/Core/Utility/CallableResolver.php index b41fedf84ed2..b283be60fe33 100644 --- a/core/lib/Drupal/Core/Utility/CallableResolver.php +++ b/core/lib/Drupal/Core/Utility/CallableResolver.php @@ -43,7 +43,7 @@ class CallableResolver { * The class resolver. */ public function __construct( - protected readonly ClassResolverInterface $classResolver + protected readonly ClassResolverInterface $classResolver, ) { } diff --git a/core/lib/Drupal/Core/Validation/Attribute/Constraint.php b/core/lib/Drupal/Core/Validation/Attribute/Constraint.php index 79a108d18f67..0ba22db6448a 100644 --- a/core/lib/Drupal/Core/Validation/Attribute/Constraint.php +++ b/core/lib/Drupal/Core/Validation/Attribute/Constraint.php @@ -41,7 +41,7 @@ public function __construct( public readonly string $id, public readonly ?TranslatableMarkup $label = NULL, public readonly string|array|false $type = [], - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/lib/Drupal/Core/Validation/ExecutionContext.php b/core/lib/Drupal/Core/Validation/ExecutionContext.php index ad732ea9f927..5e67e0e786f0 100644 --- a/core/lib/Drupal/Core/Validation/ExecutionContext.php +++ b/core/lib/Drupal/Core/Validation/ExecutionContext.php @@ -86,7 +86,7 @@ public function __construct( protected ValidatorInterface $validator, protected mixed $root, protected TranslatorInterface $translator, - protected ?string $translationDomain = NULL + protected ?string $translationDomain = NULL, ) { $this->violations = new ConstraintViolationList(); } diff --git a/core/lib/Drupal/Core/Validation/ExecutionContextFactory.php b/core/lib/Drupal/Core/Validation/ExecutionContextFactory.php index a32873430c6b..af7399a67f96 100644 --- a/core/lib/Drupal/Core/Validation/ExecutionContextFactory.php +++ b/core/lib/Drupal/Core/Validation/ExecutionContextFactory.php @@ -23,7 +23,8 @@ class ExecutionContextFactory implements ExecutionContextFactoryInterface { */ public function __construct( protected TranslatorInterface $translator, - protected ?string $translationDomain = NULL) { + protected ?string $translationDomain = NULL, + ) { } /** diff --git a/core/modules/announcements_feed/src/AnnounceFetcher.php b/core/modules/announcements_feed/src/AnnounceFetcher.php index 8d777284e847..d1479e4211f7 100644 --- a/core/modules/announcements_feed/src/AnnounceFetcher.php +++ b/core/modules/announcements_feed/src/AnnounceFetcher.php @@ -54,7 +54,7 @@ public function __construct( ConfigFactoryInterface $config, KeyValueExpirableFactoryInterface $temp_store, protected LoggerInterface $logger, - protected string $feedUrl + protected string $feedUrl, ) { $this->config = $config->get('announcements_feed.settings'); $this->tempStore = $temp_store->get('announcements_feed'); diff --git a/core/modules/announcements_feed/src/AnnounceRenderer.php b/core/modules/announcements_feed/src/AnnounceRenderer.php index ec19d5e9844c..420c7620e33c 100644 --- a/core/modules/announcements_feed/src/AnnounceRenderer.php +++ b/core/modules/announcements_feed/src/AnnounceRenderer.php @@ -25,7 +25,7 @@ final class AnnounceRenderer { */ public function __construct( protected AnnounceFetcher $announceFetcher, - protected string $feedLink + protected string $feedLink, ) { } diff --git a/core/modules/announcements_feed/src/Announcement.php b/core/modules/announcements_feed/src/Announcement.php index 326f58cca82a..90656d51fe1c 100644 --- a/core/modules/announcements_feed/src/Announcement.php +++ b/core/modules/announcements_feed/src/Announcement.php @@ -41,7 +41,7 @@ public function __construct( public readonly string $date_published, public readonly string $content_html, public readonly string $version, - public readonly bool $featured + public readonly bool $featured, ) { } diff --git a/core/modules/config/src/Form/ConfigSingleImportForm.php b/core/modules/config/src/Form/ConfigSingleImportForm.php index d90c2bb33341..c53eb2254e5f 100644 --- a/core/modules/config/src/Form/ConfigSingleImportForm.php +++ b/core/modules/config/src/Form/ConfigSingleImportForm.php @@ -89,7 +89,7 @@ public function __construct( protected ModuleInstallerInterface $moduleInstaller, protected ThemeHandlerInterface $themeHandler, protected ModuleExtensionList $moduleExtensionList, - protected ThemeExtensionList $themeExtensionList + protected ThemeExtensionList $themeExtensionList, ) { } diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php index 61566d9d6c43..65412c596727 100644 --- a/core/modules/config/src/Form/ConfigSync.php +++ b/core/modules/config/src/Form/ConfigSync.php @@ -77,7 +77,7 @@ public function __construct( protected RendererInterface $renderer, protected ModuleExtensionList $moduleExtensionList, protected ImportStorageTransformer $importTransformer, - protected ThemeExtensionList $themeExtensionList + protected ThemeExtensionList $themeExtensionList, ) { } diff --git a/core/modules/content_moderation/src/EventSubscriber/WorkspaceSubscriber.php b/core/modules/content_moderation/src/EventSubscriber/WorkspaceSubscriber.php index 9e37f0097d7a..dbc6cf65c884 100644 --- a/core/modules/content_moderation/src/EventSubscriber/WorkspaceSubscriber.php +++ b/core/modules/content_moderation/src/EventSubscriber/WorkspaceSubscriber.php @@ -24,7 +24,7 @@ class WorkspaceSubscriber implements EventSubscriberInterface { */ public function __construct( protected readonly EntityTypeManagerInterface $entityTypeManager, - protected readonly ?WorkspaceAssociationInterface $workspaceAssociation + protected readonly ?WorkspaceAssociationInterface $workspaceAssociation, ) {} /** diff --git a/core/modules/field_ui/src/Form/FieldStorageReuseForm.php b/core/modules/field_ui/src/Form/FieldStorageReuseForm.php index 14ca7486a4f1..d81e3d67ae12 100644 --- a/core/modules/field_ui/src/Form/FieldStorageReuseForm.php +++ b/core/modules/field_ui/src/Form/FieldStorageReuseForm.php @@ -56,7 +56,7 @@ public function __construct( protected FieldTypePluginManagerInterface $fieldTypePluginManager, protected EntityFieldManagerInterface $entityFieldManager, protected EntityDisplayRepositoryInterface $entityDisplayRepository, - protected EntityTypeBundleInfoInterface $bundleInfoService + protected EntityTypeBundleInfoInterface $bundleInfoService, ) {} /** diff --git a/core/modules/file/src/Plugin/Validation/Constraint/FileExtensionSecureConstraintValidator.php b/core/modules/file/src/Plugin/Validation/Constraint/FileExtensionSecureConstraintValidator.php index 351a237b77fc..8c9efda9d6ba 100644 --- a/core/modules/file/src/Plugin/Validation/Constraint/FileExtensionSecureConstraintValidator.php +++ b/core/modules/file/src/Plugin/Validation/Constraint/FileExtensionSecureConstraintValidator.php @@ -23,7 +23,7 @@ class FileExtensionSecureConstraintValidator extends BaseFileConstraintValidator * The config factory. */ public function __construct( - protected ConfigFactoryInterface $configFactory + protected ConfigFactoryInterface $configFactory, ) {} /** diff --git a/core/modules/file/src/Plugin/Validation/Constraint/FileSizeLimitConstraintValidator.php b/core/modules/file/src/Plugin/Validation/Constraint/FileSizeLimitConstraintValidator.php index d3886c1cff42..f2b52328667c 100644 --- a/core/modules/file/src/Plugin/Validation/Constraint/FileSizeLimitConstraintValidator.php +++ b/core/modules/file/src/Plugin/Validation/Constraint/FileSizeLimitConstraintValidator.php @@ -25,7 +25,7 @@ class FileSizeLimitConstraintValidator extends BaseFileConstraintValidator imple */ public function __construct( protected AccountInterface $currentUser, - protected EntityTypeManagerInterface $entityTypeManager + protected EntityTypeManagerInterface $entityTypeManager, ) {} /** diff --git a/core/modules/file/src/Plugin/Validation/Constraint/FileValidationConstraintValidator.php b/core/modules/file/src/Plugin/Validation/Constraint/FileValidationConstraintValidator.php index 601bd299e42e..f41bfe9682c3 100644 --- a/core/modules/file/src/Plugin/Validation/Constraint/FileValidationConstraintValidator.php +++ b/core/modules/file/src/Plugin/Validation/Constraint/FileValidationConstraintValidator.php @@ -21,7 +21,7 @@ class FileValidationConstraintValidator extends ConstraintValidator implements C * The file validator. */ public function __construct( - protected FileValidatorInterface $fileValidator + protected FileValidatorInterface $fileValidator, ) {} /** diff --git a/core/modules/file/src/Validation/FileValidator.php b/core/modules/file/src/Validation/FileValidator.php index c649f219be59..301fa3ec669a 100644 --- a/core/modules/file/src/Validation/FileValidator.php +++ b/core/modules/file/src/Validation/FileValidator.php @@ -30,7 +30,7 @@ public function __construct( protected ValidatorInterface $validator, protected ConstraintManager $constraintManager, protected EventDispatcherInterface $eventDispatcher, - protected ModuleHandlerInterface $moduleHandler + protected ModuleHandlerInterface $moduleHandler, ) {} /** diff --git a/core/modules/language/src/Attribute/LanguageNegotiation.php b/core/modules/language/src/Attribute/LanguageNegotiation.php index fb26311008a6..fb3eb779b42a 100644 --- a/core/modules/language/src/Attribute/LanguageNegotiation.php +++ b/core/modules/language/src/Attribute/LanguageNegotiation.php @@ -43,12 +43,12 @@ class LanguageNegotiation extends Plugin { * (optional) The route pointing to the plugin's configuration page. */ public function __construct( - public readonly string $id, - public readonly TranslatableMarkup $name, - public readonly ?array $types = NULL, - public readonly int $weight = 0, - public readonly ?TranslatableMarkup $description = NULL, - public readonly ?string $config_route_name = NULL, + public readonly string $id, + public readonly TranslatableMarkup $name, + public readonly ?array $types = NULL, + public readonly int $weight = 0, + public readonly ?TranslatableMarkup $description = NULL, + public readonly ?string $config_route_name = NULL, ) {} } diff --git a/core/modules/media/src/Attribute/MediaSource.php b/core/modules/media/src/Attribute/MediaSource.php index 13289419f1f3..33769f5b0b71 100644 --- a/core/modules/media/src/Attribute/MediaSource.php +++ b/core/modules/media/src/Attribute/MediaSource.php @@ -81,7 +81,7 @@ public function __construct( public readonly ?string $thumbnail_alt_metadata_attribute = NULL, public readonly ?string $thumbnail_title_metadata_attribute = NULL, public readonly string $default_name_metadata_attribute = 'default_name', - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/media/src/Attribute/OEmbedMediaSource.php b/core/modules/media/src/Attribute/OEmbedMediaSource.php index 3de756bb9d7c..50b9b5a18587 100644 --- a/core/modules/media/src/Attribute/OEmbedMediaSource.php +++ b/core/modules/media/src/Attribute/OEmbedMediaSource.php @@ -80,7 +80,7 @@ public function __construct( public readonly ?string $thumbnail_alt_metadata_attribute = NULL, public readonly ?string $thumbnail_title_metadata_attribute = NULL, public readonly string $default_name_metadata_attribute = 'default_name', - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/migrate_drupal/src/Attribute/MigrateField.php b/core/modules/migrate_drupal/src/Attribute/MigrateField.php index ffb529e98000..ffc646b21222 100644 --- a/core/modules/migrate_drupal/src/Attribute/MigrateField.php +++ b/core/modules/migrate_drupal/src/Attribute/MigrateField.php @@ -68,7 +68,7 @@ public function __construct( public readonly array $type_map = [], public readonly ?string $source_module = NULL, public readonly ?string $destination_module = NULL, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/navigation/src/Form/SettingsForm.php b/core/modules/navigation/src/Form/SettingsForm.php index e71941671b36..ce4f14a5148a 100644 --- a/core/modules/navigation/src/Form/SettingsForm.php +++ b/core/modules/navigation/src/Form/SettingsForm.php @@ -74,7 +74,7 @@ public function __construct( FileSystemInterface $file_system, FileUrlGeneratorInterface $fileUrlGenerator, FileUsageInterface $fileUsage, - RendererInterface $renderer + RendererInterface $renderer, ) { parent::__construct($config_factory, $typed_config_manager); $this->fileSystem = $file_system; diff --git a/core/modules/search/src/Attribute/Search.php b/core/modules/search/src/Attribute/Search.php index efe805c76be9..72e9e64d9bed 100644 --- a/core/modules/search/src/Attribute/Search.php +++ b/core/modules/search/src/Attribute/Search.php @@ -34,7 +34,7 @@ public function __construct( public readonly string $id, public readonly ?TranslatableMarkup $title = NULL, public readonly bool $use_admin_theme = FALSE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/system/src/Controller/BatchController.php b/core/modules/system/src/Controller/BatchController.php index 7041d36427bb..c66317c50a82 100644 --- a/core/modules/system/src/Controller/BatchController.php +++ b/core/modules/system/src/Controller/BatchController.php @@ -22,7 +22,7 @@ class BatchController implements ContainerInjectionInterface { */ public function __construct( protected string $root, - protected BatchStorageInterface $batchStorage + protected BatchStorageInterface $batchStorage, ) { require_once $this->root . '/core/includes/batch.inc'; } diff --git a/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php b/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php index 8dfcd24d6cde..f7736c9ee445 100644 --- a/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php +++ b/core/modules/system/src/EventSubscriber/SecurityFileUploadEventSubscriber.php @@ -21,7 +21,7 @@ class SecurityFileUploadEventSubscriber implements EventSubscriberInterface { * The config factory. */ public function __construct( - protected ConfigFactoryInterface $configFactory + protected ConfigFactoryInterface $configFactory, ) {} /** diff --git a/core/modules/system/src/Form/DevelopmentSettingsForm.php b/core/modules/system/src/Form/DevelopmentSettingsForm.php index efa6ec332003..c5b893b2bd1b 100644 --- a/core/modules/system/src/Form/DevelopmentSettingsForm.php +++ b/core/modules/system/src/Form/DevelopmentSettingsForm.php @@ -25,7 +25,7 @@ class DevelopmentSettingsForm extends FormBase { */ public function __construct( protected KeyValueFactoryInterface $keyValueFactory, - protected DrupalKernelInterface $kernel + protected DrupalKernelInterface $kernel, ) { } diff --git a/core/modules/system/src/Form/MenuLinksetSettingsForm.php b/core/modules/system/src/Form/MenuLinksetSettingsForm.php index 4353a27572d6..febffeff8f7f 100644 --- a/core/modules/system/src/Form/MenuLinksetSettingsForm.php +++ b/core/modules/system/src/Form/MenuLinksetSettingsForm.php @@ -27,7 +27,7 @@ class MenuLinksetSettingsForm extends ConfigFormBase { public function __construct( ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typedConfigManager, - protected readonly RouteBuilderInterface $routerBuilder + protected readonly RouteBuilderInterface $routerBuilder, ) { parent::__construct($config_factory, $typedConfigManager); } diff --git a/core/modules/system/src/ModuleAdminLinksHelper.php b/core/modules/system/src/ModuleAdminLinksHelper.php index 27310cf107a8..fdce3fb30dc1 100644 --- a/core/modules/system/src/ModuleAdminLinksHelper.php +++ b/core/modules/system/src/ModuleAdminLinksHelper.php @@ -28,7 +28,7 @@ class ModuleAdminLinksHelper { */ public function __construct( protected MenuLinkTreeInterface $menuLinkTree, - protected MemoryCacheInterface $memoryCache + protected MemoryCacheInterface $memoryCache, ) {} /** diff --git a/core/modules/system/src/Routing/AssetRoutes.php b/core/modules/system/src/Routing/AssetRoutes.php index ac0424b6fefc..908ef5d8efe0 100644 --- a/core/modules/system/src/Routing/AssetRoutes.php +++ b/core/modules/system/src/Routing/AssetRoutes.php @@ -19,7 +19,7 @@ class AssetRoutes implements ContainerInjectionInterface { * The stream wrapper manager service. */ public function __construct( - protected readonly StreamWrapperManagerInterface $streamWrapperManager + protected readonly StreamWrapperManagerInterface $streamWrapperManager, ) {} /** diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/Attribute/PluginExample.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/Attribute/PluginExample.php index af916bb90dba..6e35a8b34a24 100644 --- a/core/modules/system/tests/modules/plugin_test/src/Plugin/Attribute/PluginExample.php +++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/Attribute/PluginExample.php @@ -20,7 +20,7 @@ class PluginExample extends Plugin { */ public function __construct( public readonly string $id, - public readonly ?string $custom = NULL + public readonly ?string $custom = NULL, ) {} } diff --git a/core/modules/taxonomy/src/VocabularyListBuilder.php b/core/modules/taxonomy/src/VocabularyListBuilder.php index ec1dffc3543a..4f957e0538ae 100644 --- a/core/modules/taxonomy/src/VocabularyListBuilder.php +++ b/core/modules/taxonomy/src/VocabularyListBuilder.php @@ -67,11 +67,13 @@ class VocabularyListBuilder extends DraggableListBuilder { * @param \Drupal\Core\Messenger\MessengerInterface $messenger * The messenger. */ - public function __construct(EntityTypeInterface $entity_type, - AccountInterface $current_user, - EntityTypeManagerInterface $entity_type_manager, - RendererInterface $renderer = NULL, - MessengerInterface $messenger) { + public function __construct( + EntityTypeInterface $entity_type, + AccountInterface $current_user, + EntityTypeManagerInterface $entity_type_manager, + RendererInterface $renderer = NULL, + MessengerInterface $messenger, + ) { parent::__construct($entity_type, $entity_type_manager->getStorage($entity_type->id())); $this->currentUser = $current_user; diff --git a/core/modules/toolbar/src/Controller/ToolbarController.php b/core/modules/toolbar/src/Controller/ToolbarController.php index ed1a7a3aabfd..d3ab0e108191 100644 --- a/core/modules/toolbar/src/Controller/ToolbarController.php +++ b/core/modules/toolbar/src/Controller/ToolbarController.php @@ -24,7 +24,7 @@ class ToolbarController extends ControllerBase implements TrustedCallbackInterfa * The time service. */ public function __construct( - protected TimeInterface $time + protected ?TimeInterface $time = NULL, ) { } diff --git a/core/modules/user/src/ModulePermissionsLinkHelper.php b/core/modules/user/src/ModulePermissionsLinkHelper.php index 4a0d5fbeb40d..5232c2cf8b35 100644 --- a/core/modules/user/src/ModulePermissionsLinkHelper.php +++ b/core/modules/user/src/ModulePermissionsLinkHelper.php @@ -29,7 +29,7 @@ class ModulePermissionsLinkHelper { public function __construct( protected PermissionHandlerInterface $permissionHandler, protected AccessManagerInterface $accessManager, - protected ModuleExtensionList $moduleExtensionList + protected ModuleExtensionList $moduleExtensionList, ) {} /** diff --git a/core/modules/user/src/RoleListBuilder.php b/core/modules/user/src/RoleListBuilder.php index d864a550d02b..24e81e5c1c6a 100644 --- a/core/modules/user/src/RoleListBuilder.php +++ b/core/modules/user/src/RoleListBuilder.php @@ -34,9 +34,11 @@ class RoleListBuilder extends DraggableListBuilder { * @param \Drupal\Core\Messenger\MessengerInterface $messenger * The messenger. */ - public function __construct(EntityTypeInterface $entityType, - EntityStorageInterface $storage, - MessengerInterface $messenger) { + public function __construct( + EntityTypeInterface $entityType, + EntityStorageInterface $storage, + MessengerInterface $messenger, + ) { parent::__construct($entityType, $storage); $this->messenger = $messenger; } diff --git a/core/modules/views/src/Attribute/ViewsAccess.php b/core/modules/views/src/Attribute/ViewsAccess.php index 63be65abcaa7..c2f722e06421 100644 --- a/core/modules/views/src/Attribute/ViewsAccess.php +++ b/core/modules/views/src/Attribute/ViewsAccess.php @@ -48,7 +48,7 @@ public function __construct( public readonly ?array $display_types = NULL, public readonly array $base = [], public readonly bool $no_ui = FALSE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsArgumentDefault.php b/core/modules/views/src/Attribute/ViewsArgumentDefault.php index 71195ab8b247..6d46f31a196e 100644 --- a/core/modules/views/src/Attribute/ViewsArgumentDefault.php +++ b/core/modules/views/src/Attribute/ViewsArgumentDefault.php @@ -37,7 +37,7 @@ public function __construct( public readonly ?TranslatableMarkup $title = NULL, public readonly ?TranslatableMarkup $short_title = NULL, public readonly bool $no_ui = FALSE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsArgumentValidator.php b/core/modules/views/src/Attribute/ViewsArgumentValidator.php index 9c78ecb87b14..ffad54fa8377 100644 --- a/core/modules/views/src/Attribute/ViewsArgumentValidator.php +++ b/core/modules/views/src/Attribute/ViewsArgumentValidator.php @@ -41,7 +41,7 @@ public function __construct( public readonly ?TranslatableMarkup $short_title = NULL, public readonly ?string $entity_type = NULL, public readonly bool $no_ui = FALSE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsCache.php b/core/modules/views/src/Attribute/ViewsCache.php index d40262c2abd1..13d4dad8a4f4 100644 --- a/core/modules/views/src/Attribute/ViewsCache.php +++ b/core/modules/views/src/Attribute/ViewsCache.php @@ -48,7 +48,7 @@ public function __construct( public readonly ?array $display_types = NULL, public readonly array $base = [], public readonly ?bool $no_ui = NULL, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsDisplay.php b/core/modules/views/src/Attribute/ViewsDisplay.php index 27e9cfe7caaa..9bcf7952c938 100644 --- a/core/modules/views/src/Attribute/ViewsDisplay.php +++ b/core/modules/views/src/Attribute/ViewsDisplay.php @@ -83,7 +83,7 @@ public function __construct( public readonly bool $no_ui = FALSE, public readonly bool $register_theme = TRUE, public readonly bool $entity_reference_display = FALSE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsDisplayExtender.php b/core/modules/views/src/Attribute/ViewsDisplayExtender.php index 88b693c9bad2..16265c675a3c 100644 --- a/core/modules/views/src/Attribute/ViewsDisplayExtender.php +++ b/core/modules/views/src/Attribute/ViewsDisplayExtender.php @@ -39,7 +39,7 @@ public function __construct( public readonly ?TranslatableMarkup $short_title = NULL, public readonly ?TranslatableMarkup $help = NULL, public readonly bool $no_ui = FALSE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsExposedForm.php b/core/modules/views/src/Attribute/ViewsExposedForm.php index 6f9be79da820..155ebf7f8150 100644 --- a/core/modules/views/src/Attribute/ViewsExposedForm.php +++ b/core/modules/views/src/Attribute/ViewsExposedForm.php @@ -55,7 +55,7 @@ public function __construct( public readonly array $base = [], public readonly bool $no_ui = FALSE, public readonly bool $register_theme = TRUE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsPager.php b/core/modules/views/src/Attribute/ViewsPager.php index 2a19944ced68..3384d1182257 100644 --- a/core/modules/views/src/Attribute/ViewsPager.php +++ b/core/modules/views/src/Attribute/ViewsPager.php @@ -54,7 +54,7 @@ public function __construct( public readonly array $base = [], public readonly bool $no_ui = FALSE, public readonly bool $register_theme = TRUE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsQuery.php b/core/modules/views/src/Attribute/ViewsQuery.php index c5c99fffc906..9f587fa12716 100644 --- a/core/modules/views/src/Attribute/ViewsQuery.php +++ b/core/modules/views/src/Attribute/ViewsQuery.php @@ -41,7 +41,7 @@ public function __construct( public readonly ?TranslatableMarkup $short_title = NULL, public readonly ?TranslatableMarkup $help = NULL, public readonly bool $no_ui = FALSE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsRow.php b/core/modules/views/src/Attribute/ViewsRow.php index 378188c6b23c..794d02999f83 100644 --- a/core/modules/views/src/Attribute/ViewsRow.php +++ b/core/modules/views/src/Attribute/ViewsRow.php @@ -57,7 +57,7 @@ public function __construct( public readonly ?string $theme = NULL, public readonly bool $no_ui = FALSE, public readonly bool $register_theme = TRUE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsStyle.php b/core/modules/views/src/Attribute/ViewsStyle.php index 36f6f67079f5..dfd758c941ab 100644 --- a/core/modules/views/src/Attribute/ViewsStyle.php +++ b/core/modules/views/src/Attribute/ViewsStyle.php @@ -56,7 +56,7 @@ public function __construct( public readonly array $base = [], public readonly bool $no_ui = FALSE, public readonly bool $register_theme = TRUE, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/Attribute/ViewsWizard.php b/core/modules/views/src/Attribute/ViewsWizard.php index e5ef222bb07b..485dd6391739 100644 --- a/core/modules/views/src/Attribute/ViewsWizard.php +++ b/core/modules/views/src/Attribute/ViewsWizard.php @@ -33,7 +33,7 @@ public function __construct( public readonly string $id, public readonly TranslatableMarkup $title, public readonly ?string $base_table = NULL, - public readonly ?string $deriver = NULL + public readonly ?string $deriver = NULL, ) {} } diff --git a/core/modules/views/src/ViewsConfigUpdater.php b/core/modules/views/src/ViewsConfigUpdater.php index 5e80b06f8b00..da4280100c5d 100644 --- a/core/modules/views/src/ViewsConfigUpdater.php +++ b/core/modules/views/src/ViewsConfigUpdater.php @@ -84,7 +84,7 @@ public function __construct( EntityFieldManagerInterface $entity_field_manager, TypedConfigManagerInterface $typed_config_manager, ViewsData $views_data, - PluginManagerInterface $formatter_plugin_manager + PluginManagerInterface $formatter_plugin_manager, ) { $this->entityTypeManager = $entity_type_manager; $this->entityFieldManager = $entity_field_manager; diff --git a/core/modules/workspaces/src/Controller/WorkspacesHtmlEntityFormController.php b/core/modules/workspaces/src/Controller/WorkspacesHtmlEntityFormController.php index 281d9ae69678..6f9d6d5b6563 100644 --- a/core/modules/workspaces/src/Controller/WorkspacesHtmlEntityFormController.php +++ b/core/modules/workspaces/src/Controller/WorkspacesHtmlEntityFormController.php @@ -27,7 +27,7 @@ public function __construct( protected readonly FormController $entityFormController, protected readonly WorkspaceManagerInterface $workspaceManager, protected readonly WorkspaceInformationInterface $workspaceInfo, - protected readonly TypedDataManagerInterface $typedDataManager + protected readonly TypedDataManagerInterface $typedDataManager, ) {} /** diff --git a/core/modules/workspaces/src/EntityQuery/QueryFactory.php b/core/modules/workspaces/src/EntityQuery/QueryFactory.php index 0594fbc79acc..c14347839b97 100644 --- a/core/modules/workspaces/src/EntityQuery/QueryFactory.php +++ b/core/modules/workspaces/src/EntityQuery/QueryFactory.php @@ -19,7 +19,7 @@ class QueryFactory extends BaseQueryFactory { public function __construct( Connection $connection, protected readonly WorkspaceManagerInterface $workspaceManager, - protected readonly WorkspaceInformationInterface $workspaceInfo + protected readonly WorkspaceInformationInterface $workspaceInfo, ) { $this->connection = $connection; $this->namespaces = QueryBase::getNamespaces($this); diff --git a/core/modules/workspaces/src/EntityTypeInfo.php b/core/modules/workspaces/src/EntityTypeInfo.php index f1c71408df75..4bd7e0c426e9 100644 --- a/core/modules/workspaces/src/EntityTypeInfo.php +++ b/core/modules/workspaces/src/EntityTypeInfo.php @@ -23,7 +23,7 @@ class EntityTypeInfo implements ContainerInjectionInterface { public function __construct( - protected readonly WorkspaceInformationInterface $workspaceInfo + protected readonly WorkspaceInformationInterface $workspaceInfo, ) { } diff --git a/core/modules/workspaces/src/Event/WorkspacePublishEvent.php b/core/modules/workspaces/src/Event/WorkspacePublishEvent.php index e1ca919aada4..a629d905d747 100644 --- a/core/modules/workspaces/src/Event/WorkspacePublishEvent.php +++ b/core/modules/workspaces/src/Event/WorkspacePublishEvent.php @@ -36,7 +36,7 @@ abstract class WorkspacePublishEvent extends Event { */ public function __construct( protected readonly WorkspaceInterface $workspace, - array $published_revision_ids + array $published_revision_ids, ) { $this->publishedRevisionIds = $published_revision_ids; } diff --git a/core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php b/core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php index 8b2e0b9a3812..c312f9b3acde 100644 --- a/core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php +++ b/core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php @@ -16,7 +16,7 @@ class SessionWorkspaceNegotiator implements WorkspaceNegotiatorInterface, Worksp public function __construct( protected readonly AccountInterface $currentUser, protected readonly Session $session, - protected readonly EntityTypeManagerInterface $entityTypeManager + protected readonly EntityTypeManagerInterface $entityTypeManager, ) {} /** diff --git a/core/modules/workspaces/src/WorkspaceInformation.php b/core/modules/workspaces/src/WorkspaceInformation.php index db4684e18800..66fffc39f18c 100644 --- a/core/modules/workspaces/src/WorkspaceInformation.php +++ b/core/modules/workspaces/src/WorkspaceInformation.php @@ -29,7 +29,7 @@ class WorkspaceInformation implements WorkspaceInformationInterface { public function __construct( protected readonly EntityTypeManagerInterface $entityTypeManager, - protected readonly WorkspaceAssociationInterface $workspaceAssociation + protected readonly WorkspaceAssociationInterface $workspaceAssociation, ) {} /** diff --git a/core/modules/workspaces/src/WorkspacesMenuTreeStorage.php b/core/modules/workspaces/src/WorkspacesMenuTreeStorage.php index 989368555980..73a1424f6cf9 100644 --- a/core/modules/workspaces/src/WorkspacesMenuTreeStorage.php +++ b/core/modules/workspaces/src/WorkspacesMenuTreeStorage.php @@ -44,7 +44,7 @@ public function __construct( CacheBackendInterface $menu_cache_backend, CacheTagsInvalidatorInterface $cache_tags_invalidator, string $table, - array $options = [] + array $options = [], ) { parent::__construct($connection, $menu_cache_backend, $cache_tags_invalidator, $table, $options); } diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index f64c4425784f..a5d9f759ec43 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -102,6 +102,7 @@ <rule ref="Drupal.Formatting.SpaceUnaryOperator"/> <rule ref="Drupal.Functions.DiscouragedFunctions"/> <rule ref="Drupal.Functions.FunctionDeclaration"/> + <rule ref="Drupal.Functions.MultiLineFunctionDeclaration"/> <rule ref="Drupal.InfoFiles.AutoAddedKeys"/> <rule ref="Drupal.InfoFiles.ClassFiles"/> <rule ref="Drupal.InfoFiles.DuplicateEntry"/> @@ -175,11 +176,6 @@ <rule ref="Generic.Formatting.DisallowMultipleStatements"/> <rule ref="Generic.Formatting.SpaceAfterCast"/> <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/> - <rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"> - <properties> - <property name="checkClosures" value="true"/> - </properties> - </rule> <rule ref="Generic.NamingConventions.ConstructorName"/> <rule ref="Generic.NamingConventions.UpperCaseConstantName"/> <rule ref="Generic.PHP.DeprecatedFunctions"/> @@ -385,23 +381,6 @@ <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.NoSpaceBeforeArg"> <severity>0</severity> </rule> - <rule ref="Squiz.Functions.MultiLineFunctionDeclaration"/> - <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"> - <severity>0</severity> - </rule> - <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.CloseBracketLine"> - <severity>0</severity> - </rule> - <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace"> - <severity>0</severity> - </rule> - <!-- Standard yet to be finalized on this (https://www.drupal.org/node/1539712). --> - <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.FirstParamSpacing"> - <severity>0</severity> - </rule> - <rule ref="Squiz.Functions.MultiLineFunctionDeclaration.Indent"> - <severity>0</severity> - </rule> <rule ref="Squiz.PHP.LowercasePHPFunctions"/> <rule ref="Squiz.PHP.NonExecutableCode"/> <rule ref="Squiz.Strings.ConcatenationSpacing"> diff --git a/core/tests/Drupal/Tests/Component/Plugin/Attribute/Fixtures/CustomPlugin.php b/core/tests/Drupal/Tests/Component/Plugin/Attribute/Fixtures/CustomPlugin.php index eb9730348178..f908ae15d820 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Attribute/Fixtures/CustomPlugin.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Attribute/Fixtures/CustomPlugin.php @@ -22,7 +22,7 @@ class CustomPlugin extends Plugin { */ public function __construct( public readonly string $id, - public readonly string $title + public readonly string $title, ) {} } diff --git a/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php b/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php index 0e0113c5e50c..a3d0b64d2b56 100644 --- a/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php +++ b/core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php @@ -373,7 +373,7 @@ protected function setUpAccessPolicyProcessor( VariationCacheInterface $variation_cache_static = NULL, CacheBackendInterface $cache_static = NULL, AccountProxyInterface $current_user = NULL, - AccountSwitcherInterface $account_switcher = NULL + AccountSwitcherInterface $account_switcher = NULL, ) { // Prophecy does not accept a willReturn call on a mocked method if said // method has a return type of void. However, without willReturn() or any -- GitLab