From be6d515cad09889002e5d55020b6bdce61c2c804 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Fri, 11 May 2018 10:40:33 +0100 Subject: [PATCH] Issue #2572613 by Malevi4, idebr, pfrenssen, Mile23, RajeevK: Fix 'Drupal.Array.Array.CommaLastItem' coding standard --- core/includes/common.inc | 2 +- core/includes/install.core.inc | 10 +-- core/lib/Drupal/Component/Utility/Html.php | 2 +- .../Drupal/Core/Block/Plugin/Block/Broken.php | 2 +- .../Config/PreExistingConfigException.php | 2 +- .../Config/UnmetDependenciesException.php | 2 +- core/lib/Drupal/Core/Diff/DiffFormatter.php | 8 +-- .../Core/Entity/ContentEntityDeleteForm.php | 2 +- .../Drupal/Core/Entity/ContentEntityForm.php | 2 +- .../Core/Entity/Entity/EntityFormDisplay.php | 4 +- .../Core/Entity/Entity/EntityViewDisplay.php | 4 +- .../Drupal/Core/Entity/EntityDisplayBase.php | 2 +- .../Plugin/DataType/Deriver/EntityDeriver.php | 2 +- .../Routing/DefaultHtmlRouteProvider.php | 2 +- .../Sql/SqlContentEntityStorageSchema.php | 4 +- .../ConfigImportSubscriber.php | 6 +- core/lib/Drupal/Core/Extension/module.api.php | 2 +- .../FieldFormatter/LanguageFormatter.php | 2 +- .../Plugin/Field/FieldType/DecimalItem.php | 4 +- .../Plugin/Field/FieldType/EmailItem.php | 2 +- .../Field/FieldType/EntityReferenceItem.php | 4 +- .../Field/FieldType/NumericItemBase.php | 4 +- .../EntityReferenceAutocompleteWidget.php | 2 +- .../Drupal/Core/Field/PluginSettingsBase.php | 2 +- core/lib/Drupal/Core/Form/FormBuilder.php | 6 +- core/lib/Drupal/Core/Form/form.api.php | 2 +- core/lib/Drupal/Core/Http/ClientFactory.php | 2 +- .../Core/Installer/Form/SiteSettingsForm.php | 2 +- .../DatabaseStorageExpirable.php | 2 +- .../Drupal/Core/Lock/DatabaseLockBackend.php | 6 +- .../Core/Render/Element/SystemCompactLink.php | 2 +- .../Core/Render/MainContent/HtmlRenderer.php | 2 +- core/lib/Drupal/Core/Render/RenderCache.php | 2 +- core/lib/Drupal/Core/Render/Renderer.php | 2 +- .../PrimitiveTypeConstraintValidator.php | 2 +- .../action/src/Form/ActionAdminManageForm.php | 2 +- .../Kernel/Migrate/d6/MigrateActionsTest.php | 2 +- .../Kernel/Migrate/d7/MigrateActionsTest.php | 2 +- .../Kernel/Plugin/Action/EmailActionTest.php | 2 +- .../aggregator/fetcher/DefaultFetcher.php | 2 +- .../migrate/source/d7/BlockedIpsTest.php | 2 +- .../src/BigPipeRegressionTestController.php | 2 +- .../src/BigPipePlaceholderTestCases.php | 14 ++-- .../src/BigPipeTestController.php | 2 +- core/modules/block/block.install | 2 +- core/modules/block/block.post_update.php | 2 +- core/modules/block/src/BlockListBuilder.php | 2 +- .../src/Form/FavoriteAnimalTestForm.php | 2 +- .../modules/block_test/src/Form/TestForm.php | 2 +- .../src/Functional/BlockLanguageTest.php | 2 +- .../block/tests/src/Functional/BlockTest.php | 6 +- .../Plugin/migrate/source/BlockTest.php | 6 +- .../tests/src/Unit/BlockRepositoryTest.php | 12 ++-- .../src/Controller/BlockContentController.php | 2 +- .../src/Plugin/Block/BlockContentBlock.php | 4 +- .../src/Plugin/Derivative/BlockContent.php | 2 +- .../src/Tests/BlockContentTestBase.php | 4 +- .../src/Tests/Views/BlockContentTestBase.php | 2 +- .../Functional/BlockContentCacheTagsTest.php | 2 +- .../Functional/BlockContentCreationTest.php | 10 +-- .../src/Functional/BlockContentSaveTest.php | 2 +- .../src/Functional/BlockContentTestBase.php | 4 +- .../BlockContentTranslationUITest.php | 10 +-- .../src/Functional/BlockContentTypeTest.php | 2 +- .../Functional/Views/BlockContentTestBase.php | 2 +- core/modules/book/book.module | 2 +- .../src/Kernel/Migrate/d7/MigrateBookTest.php | 2 +- .../CKEditorPlugin/DrupalImageCaption.php | 2 +- .../src/Plugin/CKEditorPlugin/Language.php | 2 +- .../src/Plugin/CKEditorPlugin/StylesCombo.php | 2 +- .../ckeditor/src/Plugin/Editor/CKEditor.php | 4 +- .../src/Plugin/CKEditorPlugin/LlamaCss.php | 2 +- .../src/Kernel/CKEditorPluginManagerTest.php | 2 +- .../tests/src/Kernel/CKEditorTest.php | 2 +- .../src/Unit/CKEditorPluginManagerTest.php | 10 +-- core/modules/comment/src/CommentForm.php | 2 +- core/modules/comment/src/CommentTypeForm.php | 2 +- core/modules/comment/src/CommentViewsData.php | 2 +- .../d6/CommentVariablePerCommentType.php | 4 +- .../views/field/StatisticsLastCommentName.php | 6 +- .../comment/src/Tests/CommentPagerTest.php | 2 +- .../tests/src/Functional/CommentAdminTest.php | 4 +- .../tests/src/Functional/CommentCSSTest.php | 2 +- .../src/Functional/CommentNonNodeTest.php | 2 +- .../Functional/CommentTranslationUITest.php | 2 +- .../Views/DefaultViewRecentCommentsTest.php | 2 +- .../src/Kernel/CommentFieldAccessTest.php | 2 +- .../src/Kernel/CommentValidationTest.php | 2 +- .../src/Kernel/Views/CommentUserNameTest.php | 2 +- core/modules/config/src/Form/ConfigSync.php | 6 +- .../src/ConfigOverrider.php | 2 +- .../src/EventSubscriber.php | 2 +- .../ConfigLanguageOverrideWebTest.php | 2 +- .../ConfigSingleImportExportTest.php | 2 +- .../src/ConfigEntityMapper.php | 2 +- .../ConfigTranslationDateFormatUiTest.php | 2 +- .../ConfigTranslationListUiTest.php | 4 +- .../Functional/ConfigTranslationUiTest.php | 2 +- .../source/d6/I18nProfileFieldTest.php | 4 +- .../source/d6/ProfileFieldTranslationTest.php | 4 +- .../src/Unit/ConfigMapperManagerTest.php | 2 +- .../tests/drupal-7.contact.database.php | 2 +- .../src/Functional/ContactPersonalTest.php | 2 +- .../src/Functional/ContactSitewideTest.php | 4 +- .../Functional/Views/ContactFieldsTest.php | 2 +- .../migrate/source/d6/ContactSettingsTest.php | 2 +- .../Form/ContentModerationConfigureForm.php | 4 +- .../ModerationStateConstraintValidator.php | 2 +- .../src/Functional/ModerationFormTest.php | 2 +- .../ViewsModerationStateFilterTest.php | 4 +- .../ContentModerationPermissionsTest.php | 2 +- .../src/Kernel/ContentModerationStateTest.php | 2 +- .../ContentModerationRouteSubscriberTest.php | 14 ++-- .../content_translation.admin.inc | 2 +- .../content_translation.install | 4 +- .../Tests/ContentTranslationUITestBase.php | 6 +- .../ContentTranslationLanguageChangeTest.php | 2 +- .../ContentTranslationSettingsTest.php | 2 +- .../ContentTranslationUISkipTest.php | 2 +- .../ContentTranslationUITestBase.php | 6 +- ...entTranslationUntranslatableFieldsTest.php | 2 +- .../ContentTranslationConfigImportTest.php | 2 +- core/modules/contextual/contextual.module | 2 +- .../Plugin/views/field/ContextualLinks.php | 4 +- .../tests/src/Kernel/ContextualUnitTest.php | 2 +- .../Field/FieldType/DateTimeFieldItemList.php | 8 +-- .../Tests/Views/DateTimeHandlerTestBase.php | 2 +- .../src/Functional/DateTimeFieldTest.php | 8 +-- .../src/Kernel/Views/ArgumentDateTimeTest.php | 2 +- .../Kernel/Views/DateTimeHandlerTestBase.php | 2 +- .../src/Kernel/Views/FilterDateTimeTest.php | 2 +- .../src/Kernel/Views/SortDateTimeTest.php | 2 +- core/modules/dblog/dblog.module | 2 +- .../editor/src/Tests/EditorLoadingTest.php | 8 +-- .../editor/src/Tests/EditorSecurityTest.php | 10 +-- .../src/Tests/EditorUploadImageScaleTest.php | 4 +- .../Tests/QuickEditIntegrationLoadingTest.php | 6 +- .../src/Kernel/QuickEditIntegrationTest.php | 2 +- .../src/Unit/EditorXssFilter/StandardTest.php | 6 +- .../EntityReferenceAdminTest.php | 6 +- .../EntityReferenceFileUploadTest.php | 2 +- core/modules/field/src/Tests/FormTest.php | 4 +- .../src/Tests/Number/NumberFieldTest.php | 18 +++--- .../src/Tests/String/StringFieldTest.php | 2 +- .../src/Tests/reEnableModuleFieldTest.php | 2 +- ...views_entity_reference_plugins-2429191.php | 2 +- .../src/Form/NestedEntityTestForm.php | 2 +- .../src/Plugin/Field/FieldType/TestItem.php | 2 +- .../TestItemWithPreconfiguredOptions.php | 2 +- .../Functional/Boolean/BooleanFieldTest.php | 2 +- .../EntityReferenceXSSTest.php | 2 +- .../EntityReference/Views/SelectionTest.php | 2 +- .../Kernel/Boolean/BooleanFormatterTest.php | 2 +- .../field/tests/src/Kernel/BulkDeleteTest.php | 8 +-- .../EntityReferenceItemTest.php | 2 +- .../tests/src/Kernel/FieldKernelTestBase.php | 2 +- .../tests/src/Kernel/FieldStorageCrudTest.php | 4 +- .../d6/MigrateFieldFormatterSettingsTest.php | 2 +- .../d6/FieldInstancePerFormDisplayTest.php | 2 +- .../d7/FieldInstancePerFormDisplayTest.php | 2 +- .../Kernel/TestItemWithDependenciesTest.php | 2 +- .../src/Unit/FieldConfigEntityUnitTest.php | 6 +- .../field_ui/src/Element/FieldUiTable.php | 2 +- .../field_ui/src/FieldConfigListBuilder.php | 4 +- .../field_ui/src/FieldUiPermissions.php | 4 +- .../src/Form/EntityDisplayFormBase.php | 6 +- .../src/Form/EntityViewDisplayEditForm.php | 4 +- .../field_ui/src/Form/FieldConfigEditForm.php | 2 +- .../src/Form/FieldStorageConfigEditForm.php | 2 +- .../field_ui/src/Tests/ManageDisplayTest.php | 2 +- .../field_ui/src/Tests/ManageFieldsTest.php | 4 +- .../tests/src/Kernel/EntityDisplayTest.php | 8 +-- .../src/Kernel/EntityFormDisplayTest.php | 6 +- .../file/src/Tests/FileFieldWidgetTest.php | 2 +- .../file/src/Tests/SaveUploadFormTest.php | 14 ++-- .../modules/file/src/Tests/SaveUploadTest.php | 10 +-- ...rupal-8.file_formatters_update_2677990.php | 2 +- .../file/tests/src/Kernel/AccessTest.php | 2 +- .../src/Kernel/FileItemValidationTest.php | 8 +-- .../file/tests/src/Kernel/UsageTest.php | 4 +- .../Kernel/Views/FileViewsFieldAccessTest.php | 2 +- .../migrate/cckfield/d6/FileCckTest.php | 2 +- .../migrate/cckfield/d7/FileCckTest.php | 2 +- .../Plugin/migrate/field/d6/FileFieldTest.php | 2 +- .../Plugin/migrate/field/d7/FileFieldTest.php | 2 +- core/modules/filter/filter.module | 2 +- core/modules/filter/src/FilterPermissions.php | 2 +- .../filter/src/FilterProcessResult.php | 2 +- .../filter/src/Plugin/Filter/FilterHtml.php | 2 +- .../filter/tests/src/Kernel/FilterAPITest.php | 10 +-- .../tests/src/Kernel/FilterKernelTest.php | 16 ++--- .../src/Unit/FilterUninstallValidatorTest.php | 2 +- core/modules/forum/forum.views.inc | 2 +- core/modules/forum/src/Form/Overview.php | 2 +- core/modules/forum/src/ForumManager.php | 4 +- core/modules/forum/src/ForumSettingsForm.php | 2 +- .../forum/src/ForumUninstallValidator.php | 2 +- .../Functional/Views/ForumIntegrationTest.php | 6 +- .../update/drupal-8.rest-hal_update_8301.php | Bin 4891 -> 4892 bytes .../Comment/CommentHalJsonTestBase.php | 4 +- .../EntityTest/EntityTestHalJsonAnonTest.php | 2 +- .../Feed/FeedHalJsonTestBase.php | 6 +- .../File/FileUploadHalJsonTestBase.php | 2 +- .../Media/MediaHalJsonAnonTest.php | 2 +- .../Node/NodeHalJsonAnonTest.php | 4 +- .../Kernel/EntityTranslationNormalizeTest.php | 4 +- .../tests/src/Kernel/HalLinkManagerTest.php | 12 ++-- .../hal/tests/src/Kernel/NormalizeTest.php | 2 +- .../Field/FieldFormatter/ImageFormatter.php | 2 +- .../ImageFieldDefaultImagesTest.php | 4 +- .../src/Functional/ImageFieldValidateTest.php | 12 ++-- .../tests/src/Kernel/ImageImportTest.php | 2 +- .../src/Kernel/ImageThemeFunctionTest.php | 2 +- .../language/src/Form/LanguageFormBase.php | 4 +- .../src/Form/NegotiationConfigureForm.php | 2 +- .../LanguageConfigurationElementTest.php | 6 +- .../LanguageNegotiationContentEntityTest.php | 4 +- .../Functional/LanguageUrlRewritingTest.php | 2 +- .../src/Kernel/EntityUrlLanguageTest.php | 4 +- .../src/Kernel/Views/FilterLanguageTest.php | 2 +- .../src/Plugin/Field/FieldType/LinkItem.php | 2 +- .../Plugin/Field/FieldWidget/LinkWidget.php | 2 +- .../src/Tests/Views/LinkViewsTokensTest.php | 2 +- core/modules/locale/locale.batch.inc | 2 +- .../LocaleConfigTranslationImportTest.php | 6 +- .../Functional/LocaleFileSystemFormTest.php | 2 +- .../Functional/LocaleUpdateInterfaceTest.php | 2 +- .../MenuUiJavascriptTest.php | 4 +- .../process/DownloadFunctionalTest.php | 2 +- .../src/Kernel/MigrateConfigRollbackTest.php | 8 +-- .../MigrateRollbackEntityConfigTest.php | 6 +- .../tests/src/Kernel/Plugin/MigrationTest.php | 4 +- .../tests/src/Kernel/process/FileCopyTest.php | 12 ++-- .../tests/src/Unit/MigrateExecutableTest.php | 2 +- .../Unit/MigrateSqlIdMapEnsureTablesTest.php | 4 +- .../tests/src/Unit/process/CallbackTest.php | 4 +- .../tests/src/Unit/process/FormatDateTest.php | 2 +- .../Plugin/migrate/source/d8/ConfigTest.php | 2 +- .../source/d6/VariableTranslationTest.php | 2 +- .../src/Unit/source/d6/i18nVariableTest.php | 2 +- core/modules/node/node.admin.inc | 2 +- core/modules/node/node.api.php | 4 +- core/modules/node/node.module | 4 +- .../modules/node/src/Form/NodePreviewForm.php | 2 +- core/modules/node/src/NodeForm.php | 2 +- core/modules/node/src/NodeTypeListBuilder.php | 2 +- core/modules/node/src/NodeViewBuilder.php | 2 +- core/modules/node/src/NodeViewsData.php | 2 +- .../node/src/Plugin/Search/NodeSearch.php | 4 +- .../node/src/Plugin/views/wizard/Node.php | 2 +- .../node/src/Tests/NodeRevisionsTest.php | 2 +- core/modules/node/src/Tests/NodeTestBase.php | 2 +- core/modules/node/src/Tests/NodeTypeTest.php | 2 +- .../node/src/Tests/PagePreviewTest.php | 2 +- .../src/Functional/NodeAccessFieldTest.php | 2 +- .../src/Functional/NodeAccessMenuLinkTest.php | 2 +- .../NodeAccessRebuildNodeGrantsTest.php | 2 +- .../Functional/NodePreviewAnonymousTest.php | 2 +- .../src/Functional/NodeRevisionsAllTest.php | 6 +- .../tests/src/Functional/NodeTestBase.php | 2 +- .../src/Functional/NodeTranslationUITest.php | 2 +- .../tests/src/Functional/NodeViewTest.php | 2 +- .../src/Functional/Views/FrontPageTest.php | 2 +- .../src/Functional/Views/NodeLanguageTest.php | 2 +- .../d6/MigrateNodeBundleSettingsTest.php | 2 +- .../Kernel/Views/OptionsListFilterTest.php | 6 +- .../tests/src/Functional/PageCacheTest.php | 2 +- core/modules/path/src/Form/PathFormBase.php | 2 +- .../src/Kernel/PathNoCanonicalLinkTest.php | 2 +- .../quickedit/src/QuickEditController.php | 4 +- .../src/Tests/QuickEditLoadingTest.php | 6 +- .../src/Kernel/MetadataGeneratorTest.php | 2 +- .../tests/src/Kernel/QuickEditTestBase.php | 2 +- .../src/Functional/UserAttributesTest.php | 2 +- .../src/ResponsiveImageStyleForm.php | 2 +- .../Tests/ResponsiveImageFieldDisplayTest.php | 2 +- .../src/Tests/ResponsiveImageFieldUiTest.php | 2 +- ...sponsiveImageStyleConfigEntityUnitTest.php | 2 +- core/modules/rest/rest.post_update.php | 2 +- .../rest/src/Entity/RestResourceConfig.php | 2 +- core/modules/rest/src/Tests/RESTTestBase.php | 2 +- .../update/drupal-8.rest-rest_update_8201.php | 2 +- .../update/drupal-8.rest-rest_update_8203.php | 2 +- .../EntityTest/EntityTestResourceTestBase.php | 12 ++-- .../EntityTestTextItemNormalizerTest.php | 2 +- .../Feed/FeedResourceTestBase.php | 60 +++++++++--------- .../Term/TermResourceTestBase.php | 8 +-- .../tests/src/Functional/ResourceTest.php | 2 +- .../Functional/Views/StyleSerializerTest.php | 2 +- .../Kernel/Entity/ConfigDependenciesTest.php | 6 +- core/modules/search/search.module | 2 +- .../search/src/SearchPageListBuilder.php | 6 +- .../src/Tests/SearchPageCacheTagsTest.php | 2 +- .../tests/src/Kernel/SearchMatchTest.php | 2 +- .../Functional/ShortcutTranslationUITest.php | 2 +- .../Plugin/migrate/source/d7/ShortcutTest.php | 2 +- .../src/Form/SimpletestResultsForm.php | 2 +- .../src/Tests/KernelTestBaseTest.php | 4 +- .../Tests/MissingCheckedRequirementsTest.php | 2 +- .../src/Tests/SimpleTestBrowserTest.php | 2 +- core/modules/simpletest/src/WebTestBase.php | 4 +- .../Plugin/Block/StatisticsPopularBlock.php | 2 +- .../src/Functional/StatisticsAttachedTest.php | 2 +- .../src/Controller/DbUpdateController.php | 2 +- .../PrepareModulesEntityUninstallForm.php | 2 +- core/modules/system/src/Form/RegionalForm.php | 4 +- core/modules/system/src/Form/RssFeedsForm.php | 6 +- .../system/src/Form/ThemeSettingsForm.php | 4 +- .../system/src/Tests/Ajax/DialogTest.php | 4 +- .../Common/SimpleTestErrorCollectorTest.php | 2 +- .../src/Tests/Path/UrlAliasFixtures.php | 10 +-- .../system/src/Tests/Session/SessionTest.php | 2 +- .../system/src/Tests/System/HtaccessTest.php | 4 +- .../system/src/Tests/Theme/FunctionsTest.php | 4 +- .../system/src/Tests/Theme/TwigTransTest.php | 4 +- core/modules/system/system.api.php | 2 +- core/modules/system/system.install | 4 +- ...drupal-8.block-context-manager-2354889.php | 2 +- ...local-actions-tasks-into-blocks-507488.php | 4 +- ...drupal-8.page-title-into-block-2476947.php | 4 +- ...en-secondary-local-tasks-block-2569529.php | 2 +- ...pal-8.site-branding-into-block-2005546.php | 4 +- .../drupal-8.stable-base-theme-2575421.php | 2 +- ...l-8.update-test-block-disabled-2513534.php | 2 +- .../src/Controller/AjaxTestController.php | 8 +-- .../ajax_test/src/Form/AjaxTestDialogForm.php | 2 +- .../src/Controller/BatchTestController.php | 4 +- .../database_test/database_test.install | 8 +-- .../src/EarlyRenderingTestController.php | 2 +- .../modules/entity_test/entity_test.module | 2 +- .../ShapeOnlyColorEditableWidget.php | 2 +- .../src/Controller/ErrorTestController.php | 2 +- .../src/Form/FormTestMachineNameForm.php | 4 +- .../src/Form/JsWebAssertTestForm.php | 2 +- .../modules/menu_test/src/TestControllers.php | 6 +- .../src/Controller/PagerTestController.php | 2 +- .../mock_block/MockMenuBlockDeriver.php | 2 +- .../src/TwigExtensionTestController.php | 4 +- .../src/TwigThemeTestController.php | 2 +- .../Datetime/DrupalDateTimeTest.php | 2 +- .../MoveRevisionMetadataFieldsUpdateTest.php | 4 +- .../FileTransfer/FileTransferTest.php | 6 +- .../Form/LanguageSelectElementTest.php | 2 +- .../Functional/Render/AjaxPageStateTest.php | 6 +- .../Update/RecalculatedDependencyTest.php | 2 +- .../src/Kernel/Block/SystemMenuBlockTest.php | 8 +-- .../src/Kernel/Form/ProgrammaticTest.php | 2 +- .../src/Kernel/Scripts/DbCommandBaseTest.php | 8 +-- .../tests/src/Unit/Menu/MenuLinkTreeTest.php | 6 +- .../TermSelection.php | 2 +- .../Plugin/migrate/source/d7/Vocabulary.php | 2 +- core/modules/taxonomy/src/TermViewsData.php | 4 +- .../src/Tests/TermAutocompleteTest.php | 2 +- .../taxonomy/src/VocabularyListBuilder.php | 2 +- .../Views/TaxonomyIndexTidUiTest.php | 2 +- .../src/Functional/VocabularyCrudTest.php | 2 +- .../Migrate/d7/MigrateTaxonomyTermTest.php | 2 +- .../Plugin/Field/FieldType/TelephoneItem.php | 2 +- .../src/Functional/TelephoneFieldTest.php | 2 +- .../src/Plugin/Field/FieldType/TextItem.php | 2 +- core/modules/text/src/Tests/TextFieldTest.php | 8 +-- .../src/Kernel/TextWithSummaryItemTest.php | 2 +- .../tests/src/Unit/Migrate/TextCckTest.php | 4 +- .../src/Unit/Migrate/d6/TextFieldTest.php | 4 +- .../Plugin/migrate/cckfield/TextCckTest.php | 4 +- .../Plugin/migrate/field/d6/TextFieldTest.php | 4 +- core/modules/tour/src/Tests/TourTest.php | 2 +- .../tour/tests/src/Functional/TourTest.php | 4 +- .../Functional/Views/TrackerUserUidTest.php | 2 +- .../migrate/source/d7/TrackerNodeTest.php | 2 +- .../migrate/source/d7/TrackerUserTest.php | 2 +- core/modules/tracker/tracker.views.inc | 2 +- .../src/Controller/UpdateController.php | 2 +- .../modules/update/src/UpdateSettingsForm.php | 2 +- core/modules/update/update.authorize.inc | 2 +- core/modules/update/update.report.inc | 4 +- core/modules/user/src/AccountForm.php | 4 +- core/modules/user/src/AccountSettingsForm.php | 4 +- core/modules/user/src/Entity/User.php | 2 +- .../user/src/Plugin/views/wizard/Users.php | 2 +- core/modules/user/src/UserViewsData.php | 2 +- .../drupal-8.user-email-token-2587275.php | 2 +- .../tests/src/Functional/UserAdminTest.php | 4 +- .../src/Functional/UserMailNotifyTest.php | 2 +- .../Views/HandlerFilterUserNameTest.php | 6 +- .../Kernel/Migrate/d6/MigrateUserRoleTest.php | 6 +- .../migrate/source/ProfileFieldTest.php | 4 +- .../src/Unit/PermissionAccessCheckTest.php | 2 +- .../tests/src/Unit/PermissionHandlerTest.php | 2 +- .../src/Unit/Views/Argument/RolesRidTest.php | 2 +- core/modules/user/user.module | 4 +- core/modules/views/src/Entity/View.php | 2 +- core/modules/views/src/EntityViewsData.php | 2 +- .../views/src/Form/ViewsExposedForm.php | 2 +- .../Derivative/DefaultWizardDeriver.php | 2 +- .../Derivative/ViewsExposedFilterBlock.php | 4 +- .../views/src/Plugin/views/PluginBase.php | 2 +- .../views/argument/ArgumentPluginBase.php | 4 +- .../views/display/DisplayPluginBase.php | 8 +-- .../views/src/Plugin/views/display/Page.php | 4 +- .../src/Plugin/views/field/EntityField.php | 4 +- .../Plugin/views/field/FieldPluginBase.php | 4 +- .../src/Plugin/views/field/PrerenderList.php | 4 +- .../Plugin/views/filter/FilterPluginBase.php | 4 +- .../src/Plugin/views/filter/NumericFilter.php | 2 +- .../src/Plugin/views/filter/StringFilter.php | 2 +- .../src/Plugin/views/join/JoinPluginBase.php | 2 +- .../views/src/Plugin/views/query/Sql.php | 6 +- .../views/relationship/EntityReverse.php | 4 +- .../Plugin/views/wizard/WizardPluginBase.php | 2 +- .../views/src/Tests/FieldApiDataTest.php | 6 +- core/modules/views/src/Tests/ViewTestData.php | 2 +- .../src/Plugin/views/query/QueryTest.php | 2 +- .../views_test_data/views_test_data.install | 2 +- .../tests/src/Functional/DefaultViewsTest.php | 2 +- .../src/Functional/Entity/FieldEntityTest.php | 2 +- .../Entity/FilterEntityBundleTest.php | 2 +- .../tests/src/Functional/GlossaryTest.php | 2 +- .../tests/src/Functional/Handler/AreaTest.php | 4 +- .../src/Functional/Handler/FieldWebTest.php | 12 ++-- .../Functional/Plugin/ArgumentDefaultTest.php | 4 +- .../src/Functional/Plugin/CacheWebTest.php | 6 +- .../ContextualFiltersBlockContextTest.php | 2 +- .../src/Functional/Plugin/DisplayTest.php | 2 +- .../src/Functional/Plugin/ExposedFormTest.php | 10 +-- .../tests/src/Functional/Plugin/PagerTest.php | 2 +- .../src/Functional/Plugin/ViewsBulkTest.php | 4 +- .../ArgumentPlaceholderUpdatePathTest.php | 2 +- .../Functional/Update/BulkFormUpdateTest.php | 2 +- .../Entity/ViewEntityDependenciesTest.php | 20 +++--- .../src/Kernel/Handler/AreaEmptyTest.php | 4 +- .../src/Kernel/Handler/FieldCounterTest.php | 2 +- .../src/Kernel/Handler/FieldFieldTest.php | 6 +- .../src/Kernel/Handler/FieldKernelTest.php | 2 +- .../Kernel/Handler/SortTranslationTest.php | 2 +- .../Kernel/Plugin/ArgumentValidatorTest.php | 4 +- .../Kernel/Plugin/BlockDependenciesTest.php | 4 +- .../tests/src/Kernel/Plugin/CacheTest.php | 12 ++-- .../Plugin/Display/ViewsMenuLinkTest.php | 2 +- .../Kernel/Plugin/FieldOrLanguageJoinTest.php | 6 +- .../tests/src/Kernel/Plugin/JoinTest.php | 10 +-- .../Plugin/RelationshipJoinTestBase.php | 6 +- .../src/Kernel/Plugin/RelationshipTest.php | 8 +-- .../src/Kernel/Plugin/ViewsBlockTest.php | 4 +- .../tests/src/Kernel/ViewStorageTest.php | 14 ++-- .../tests/src/Unit/EntityViewsDataTest.php | 6 +- .../Plugin/Derivative/ViewsLocalTaskTest.php | 2 +- .../tests/src/Unit/Plugin/HandlerBaseTest.php | 2 +- .../tests/src/Unit/Plugin/area/ViewTest.php | 2 +- .../tests/src/Unit/Plugin/field/FieldTest.php | 12 ++-- .../Unit/Plugin/pager/PagerPluginBaseTest.php | 2 +- .../views/field/EntityOperationsUnitTest.php | 4 +- .../Plugin/views/query/SqliteDateSqlTest.php | 2 +- .../views/tests/src/Unit/PluginBaseTest.php | 2 +- .../tests/src/Unit/ViewExecutableTest.php | 6 +- .../views/tests/src/Unit/ViewsTest.php | 2 +- core/modules/views/views.theme.inc | 4 +- core/modules/views_ui/admin.inc | 2 +- .../src/Form/AdvancedSettingsForm.php | 2 +- .../views_ui/src/Form/Ajax/Rearrange.php | 2 +- .../src/Form/Ajax/ReorderDisplays.php | 4 +- core/modules/views_ui/src/Tests/RowUITest.php | 4 +- core/modules/views_ui/src/ViewPreviewForm.php | 2 +- core/modules/views_ui/src/ViewUI.php | 2 +- .../tests/src/Functional/DisplayPathTest.php | 2 +- .../tests/src/Functional/DisplayTest.php | 4 +- .../tests/src/Functional/HandlerTest.php | 10 +-- .../tests/src/Functional/StyleUITest.php | 4 +- .../tests/src/Functional/ViewsUITourTest.php | 2 +- .../tests/src/Unit/ViewListBuilderTest.php | 6 +- core/modules/views_ui/views_ui.module | 2 +- core/modules/views_ui/views_ui.theme.inc | 4 +- .../workflows/src/Form/WorkflowEditForm.php | 8 +-- .../src/Form/WorkflowStateEditForm.php | 8 +-- .../src/Form/WorkflowTransitionEditForm.php | 4 +- .../workflows/src/WorkflowListBuilder.php | 2 +- .../WorkspaceResourceTestBase.php | 2 +- .../src/Kernel/WorkspaceIntegrationTest.php | 2 +- core/phpcs.xml.dist | 6 ++ ...EntityFormFieldValidationFilteringTest.php | 2 +- .../HttpKernel/CorsIntegrationTest.php | 2 +- .../Routing/CaseInsensitivePathTest.php | 8 +-- .../Update/UpdatePathTestBase.php | 2 +- ...CacheabilityMetadataConfigOverrideTest.php | 2 +- .../Core/Config/ConfigDependencyTest.php | 18 +++--- .../Core/Config/ConfigEntityNormalizeTest.php | 2 +- .../Core/Config/ConfigEntityUnitTest.php | 2 +- .../ConfigImportRenameValidationTest.php | 6 +- .../Core/Config/ConfigImporterTest.php | 8 +-- .../Core/Config/ConfigSchemaTest.php | 4 +- .../EntityAutocompleteElementFormTest.php | 6 +- .../Entity/EntityAccessControlHandlerTest.php | 4 +- .../Entity/EntityDefinitionUpdateTest.php | 2 +- .../Core/Entity/EntityLoadByUuidTest.php | 4 +- .../Core/Entity/EntityQueryTest.php | 8 +-- .../Core/Entity/EntityReferenceFieldTest.php | 4 +- .../Core/Entity/FieldSqlStorageTest.php | 2 +- .../FieldWidgetConstraintValidatorTest.php | 2 +- .../Core/Entity/RouteProviderTest.php | 2 +- .../ValidReferenceConstraintValidatorTest.php | 2 +- .../Core/Field/FieldSettingsTest.php | 6 +- .../KernelTests/Core/File/MimeTypeTest.php | 2 +- .../KernelTests/Core/Image/ToolkitGdTest.php | 4 +- .../Core/Render/Element/TableTest.php | 2 +- .../KernelTests/Core/Render/RenderTest.php | 2 +- .../Core/Site/SettingsRewriteTest.php | 2 +- .../TranslationStringTest.php | 2 +- .../KernelTests/Core/Theme/RegistryTest.php | 2 +- .../Theme/ThemeRenderAndAutoescapeTest.php | 2 +- .../Core/Theme/TwigMarkupInterfaceTest.php | 2 +- .../ComplexDataConstraintValidatorTest.php | 4 +- .../Core/TypedData/TypedDataTest.php | 2 +- core/tests/Drupal/Tests/BrowserTestBase.php | 2 +- .../Component/Assertion/InspectorTest.php | 4 +- .../DependencyInjection/ContainerTest.php | 2 +- .../FileSystem/RegexDirectoryIteratorTest.php | 2 +- .../Component/Serialization/YamlTestBase.php | 2 +- .../Tests/Component/Utility/ColorTest.php | 2 +- .../Component/Utility/NestedArrayTest.php | 2 +- .../Tests/Component/Utility/SortArrayTest.php | 44 ++++++------- .../Tests/Component/Utility/XssTest.php | 10 +-- .../Tests/Core/Annotation/TranslationTest.php | 2 +- .../Tests/Core/Asset/AssetResolverTest.php | 4 +- .../Asset/CssCollectionRendererUnitTest.php | 4 +- .../Core/Cache/CacheableMetadataTest.php | 2 +- .../Tests/Core/Command/QuickStartTest.php | 6 +- .../Tests/Core/Common/AttributesTest.php | 2 +- .../Entity/ConfigEntityBaseUnitTest.php | 8 +-- .../Entity/ConfigEntityDependencyTest.php | 2 +- .../Config/Entity/ConfigEntityTypeTest.php | 2 +- .../Config/Entity/Query/QueryFactoryTest.php | 16 ++--- .../Tests/Core/Config/StorageComparerTest.php | 4 +- .../Controller/ControllerResolverTest.php | 2 +- .../Tests/Core/Datetime/DateHelperTest.php | 2 +- .../Compiler/TaggedHandlersPassTest.php | 8 +-- .../DiscoverServiceProvidersTest.php | 2 +- .../Core/DrupalKernel/DrupalKernelTest.php | 12 ++-- .../Core/Entity/BaseFieldDefinitionTest.php | 2 +- .../Core/Entity/EntityFieldManagerTest.php | 4 +- .../Sql/SqlContentEntityStorageSchemaTest.php | 20 +++--- .../Sql/SqlContentEntityStorageTest.php | 4 +- .../EntityReferenceSelectionUnitTest.php | 4 +- .../ExceptionJsonSubscriberTest.php | 4 +- .../RssResponseRelativeUrlFilterTest.php | 2 +- .../Core/Extension/ExtensionListTest.php | 4 +- .../Core/Extension/ModuleHandlerTest.php | 24 +++---- .../Drupal/Tests/Core/File/FileSystemTest.php | 2 +- .../Core/Form/ConfigFormBaseTraitTest.php | 2 +- .../Core/Form/FormAjaxResponseBuilderTest.php | 8 +-- .../Drupal/Tests/Core/Form/FormCacheTest.php | 2 +- .../Core/Form/FormStateDecoratorBaseTest.php | 2 +- .../Tests/Core/Menu/LocalTaskDefaultTest.php | 20 +++--- .../Core/Menu/MenuLinkDefaultFormTest.php | 2 +- .../Core/Menu/StaticMenuLinkOverridesTest.php | 8 +-- .../ParamConverterManagerTest.php | 4 +- .../Core/PathProcessor/PathProcessorTest.php | 6 +- .../Core/Render/BubbleableMetadataTest.php | 6 +- .../Core/Render/Element/MachineNameTest.php | 4 +- .../Core/Render/Element/TableSelectTest.php | 2 +- .../Drupal/Tests/Core/Render/ElementTest.php | 2 +- .../Core/Render/RendererBubblingTest.php | 6 +- .../Core/Render/RendererPlaceholdersTest.php | 2 +- .../Core/Render/RendererRecursionTest.php | 12 ++-- .../Drupal/Tests/Core/Render/RendererTest.php | 16 ++--- .../Tests/Core/Routing/RoutingFixtures.php | 4 +- .../Tests/Core/Template/TwigExtensionTest.php | 4 +- .../Tests/Core/Test/TestDatabaseTest.php | 2 +- .../Tests/Core/Test/TestSuiteBaseTest.php | 4 +- .../RecursiveContextualValidatorTest.php | 6 +- .../Tests/Core/Update/UpdateRegistryTest.php | 30 ++++----- .../Drupal/Tests/Core/Utility/TokenTest.php | 8 +-- 571 files changed, 1127 insertions(+), 1121 deletions(-) diff --git a/core/includes/common.inc b/core/includes/common.inc index de294dfe394..58ede5565c4 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -715,7 +715,7 @@ function drupal_attach_tabledrag(&$element, array $options) { 'subgroup' => NULL, 'source' => NULL, 'hidden' => TRUE, - 'limit' => 0 + 'limit' => 0, ]; $group = $options['group']; diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 890af7a5635..a8af37aa3aa 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2050,7 +2050,7 @@ function install_check_requirements($install_state) { 'severity' => REQUIREMENT_ERROR, 'description' => t('The @drupal installer requires that the %default-file file not be modified in any way from the original download.', [ '@drupal' => drupal_install_profile_distribution_name(), - '%default-file' => $default_file + '%default-file' => $default_file, ]), ]; } @@ -2111,7 +2111,7 @@ function install_check_requirements($install_state) { '@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, '%default_file' => $default_file, - ':install_txt' => base_path() . 'core/INSTALL.txt' + ':install_txt' => base_path() . 'core/INSTALL.txt', ]), ]; } @@ -2129,7 +2129,7 @@ function install_check_requirements($install_state) { 'description' => t('@drupal requires read permissions to %file at all times. The webhosting issues documentation section offers help on this and other topics.', [ '@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, - ':handbook_url' => 'https://www.drupal.org/server-permissions' + ':handbook_url' => 'https://www.drupal.org/server-permissions', ]), ]; } @@ -2142,7 +2142,7 @@ function install_check_requirements($install_state) { 'description' => t('The @drupal installer requires write permissions to %file during the installation process. The webhosting issues documentation section offers help on this and other topics.', [ '@drupal' => drupal_install_profile_distribution_name(), '%file' => $file, - ':handbook_url' => 'https://www.drupal.org/server-permissions' + ':handbook_url' => 'https://www.drupal.org/server-permissions', ]), ]; } @@ -2162,7 +2162,7 @@ function install_check_requirements($install_state) { '%file' => $file, '%default_file' => $default_file, ':install_txt' => base_path() . 'core/INSTALL.txt', - ':handbook_url' => 'https://www.drupal.org/server-permissions' + ':handbook_url' => 'https://www.drupal.org/server-permissions', ]), ]; } diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php index 5beee495b98..6c162ed0953 100644 --- a/core/lib/Drupal/Component/Utility/Html.php +++ b/core/lib/Drupal/Component/Utility/Html.php @@ -124,7 +124,7 @@ class Html { // Identifiers cannot start with a digit, two hyphens, or a hyphen followed by a digit. $identifier = preg_replace([ '/^[0-9]/', - '/^(-[0-9])|^(--)/' + '/^(-[0-9])|^(--)/', ], ['_', '__'], $identifier); return $identifier; } diff --git a/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php b/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php index 0e4732e4995..b7f3a19fffe 100644 --- a/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php +++ b/core/lib/Drupal/Core/Block/Plugin/Block/Broken.php @@ -38,7 +38,7 @@ class Broken extends BlockBase { */ protected function brokenMessage() { $build['message'] = [ - '#markup' => $this->t('This block is broken or missing. You may be missing content or you might need to enable the original module.') + '#markup' => $this->t('This block is broken or missing. You may be missing content or you might need to enable the original module.'), ]; return $build; diff --git a/core/lib/Drupal/Core/Config/PreExistingConfigException.php b/core/lib/Drupal/Core/Config/PreExistingConfigException.php index 31849caf699..a71604e1600 100644 --- a/core/lib/Drupal/Core/Config/PreExistingConfigException.php +++ b/core/lib/Drupal/Core/Config/PreExistingConfigException.php @@ -59,7 +59,7 @@ class PreExistingConfigException extends ConfigException { $message = new FormattableMarkup('Configuration objects (@config_names) provided by @extension already exist in active configuration', [ '@config_names' => implode(', ', static::flattenConfigObjects($config_objects)), - '@extension' => $extension + '@extension' => $extension, ] ); $e = new static($message); diff --git a/core/lib/Drupal/Core/Config/UnmetDependenciesException.php b/core/lib/Drupal/Core/Config/UnmetDependenciesException.php index 6c37c763720..573ec54849a 100644 --- a/core/lib/Drupal/Core/Config/UnmetDependenciesException.php +++ b/core/lib/Drupal/Core/Config/UnmetDependenciesException.php @@ -92,7 +92,7 @@ class UnmetDependenciesException extends ConfigException { $message = new FormattableMarkup('Configuration objects provided by %extension have unmet dependencies: %config_names', [ '%config_names' => static::formatConfigObjectList($config_objects), - '%extension' => $extension + '%extension' => $extension, ] ); $e = new static($message); diff --git a/core/lib/Drupal/Core/Diff/DiffFormatter.php b/core/lib/Drupal/Core/Diff/DiffFormatter.php index 1b3604d589e..52f5550abc9 100644 --- a/core/lib/Drupal/Core/Diff/DiffFormatter.php +++ b/core/lib/Drupal/Core/Diff/DiffFormatter.php @@ -57,7 +57,7 @@ class DiffFormatter extends DiffFormatterBase { [ 'data' => $ybeg + $this->line_stats['offset']['y'], 'colspan' => 2, - ] + ], ]; } @@ -94,7 +94,7 @@ class DiffFormatter extends DiffFormatterBase { [ 'data' => ['#markup' => $line], 'class' => 'diff-context diff-addedline', - ] + ], ]; } @@ -116,7 +116,7 @@ class DiffFormatter extends DiffFormatterBase { [ 'data' => ['#markup' => $line], 'class' => 'diff-context diff-deletedline', - ] + ], ]; } @@ -135,7 +135,7 @@ class DiffFormatter extends DiffFormatterBase { [ 'data' => ['#markup' => $line], 'class' => 'diff-context', - ] + ], ]; } diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php b/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php index c87c08dc0a2..94af017758c 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php @@ -39,7 +39,7 @@ class ContentEntityDeleteForm extends ContentEntityConfirmFormBase { $form['deleted_translations'] = [ '#theme' => 'item_list', '#title' => $this->t('The following @entity-type translations will be deleted:', [ - '@entity-type' => $entity->getEntityType()->getLowercaseLabel() + '@entity-type' => $entity->getEntityType()->getLowercaseLabel(), ]), '#items' => $languages, ]; diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php index 958e26b042f..7aa0669e51d 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -133,7 +133,7 @@ class ContentEntityForm extends EntityForm implements ContentEntityFormInterface '#type' => 'container', '#weight' => 99, '#attributes' => [ - 'class' => ['entity-content-form-footer'] + 'class' => ['entity-content-form-footer'], ], '#optional' => TRUE, ]; diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php index 6c31df58b59..183e428ba34 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php @@ -144,7 +144,7 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn 'form_mode' => $this->originalMode, // No need to prepare, defaults have been merged in setComponent(). 'prepare' => FALSE, - 'configuration' => $configuration + 'configuration' => $configuration, ]); } else { @@ -330,7 +330,7 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn } return [ - 'widgets' => new EntityDisplayPluginCollection($this->pluginManager, $configurations) + 'widgets' => new EntityDisplayPluginCollection($this->pluginManager, $configurations), ]; } diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php index 7c7d62e04da..cd36418d14e 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php @@ -201,7 +201,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn 'view_mode' => $this->originalMode, // No need to prepare, defaults have been merged in setComponent(). 'prepare' => FALSE, - 'configuration' => $configuration + 'configuration' => $configuration, ]); } else { @@ -301,7 +301,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn } return [ - 'formatters' => new EntityDisplayPluginCollection($this->pluginManager, $configurations) + 'formatters' => new EntityDisplayPluginCollection($this->pluginManager, $configurations), ]; } diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php index 5c3788761ee..dbda544ef05 100644 --- a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php @@ -164,7 +164,7 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl // Extra fields are visible by default unless they explicitly say so. if (!isset($definition['visible']) || $definition['visible'] == TRUE) { $this->setComponent($name, [ - 'weight' => $definition['weight'] + 'weight' => $definition['weight'], ]); } else { diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php index 5114c40f8ea..d058eb4372f 100644 --- a/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php +++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php @@ -97,7 +97,7 @@ class EntityDeriver implements ContainerDeriverInterface { if ($bundle !== $entity_type_id) { $this->derivatives[$entity_type_id . ':' . $bundle] = [ 'label' => $bundle_info['label'], - 'constraints' => $this->derivatives[$entity_type_id]['constraints'] + 'constraints' => $this->derivatives[$entity_type_id]['constraints'], ] + $base_plugin_definition; } } diff --git a/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php b/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php index 0a99b331bf0..1415a1aba66 100644 --- a/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php +++ b/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php @@ -258,7 +258,7 @@ class DefaultHtmlRouteProvider implements EntityRouteProviderInterface, EntityHa $route ->setDefaults([ '_entity_form' => "{$entity_type_id}.{$operation}", - '_title_callback' => '\Drupal\Core\Entity\Controller\EntityController::editTitle' + '_title_callback' => '\Drupal\Core\Entity\Controller\EntityController::editTitle', ]) ->setRequirement('_entity_access', "{$entity_type_id}.update") ->setOption('parameters', [ diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 9c123417cad..59cad4423ab 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1168,7 +1168,7 @@ class SqlContentEntityStorageSchema implements DynamicallyFieldableEntityStorage $entity_type_id . '__revision' => [ 'table' => $this->storage->getRevisionTable(), 'columns' => [$revision_key => $revision_key], - ] + ], ], ]; @@ -2043,7 +2043,7 @@ class SqlContentEntityStorageSchema implements DynamicallyFieldableEntityStorage 'size' => 'tiny', 'not null' => TRUE, 'default' => 0, - 'description' => 'A boolean indicating whether this data item has been deleted' + 'description' => 'A boolean indicating whether this data item has been deleted', ], 'entity_id' => $id_schema, 'revision_id' => $revision_id_schema, diff --git a/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php index ea7d29fedfc..6cda3b1859c 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php @@ -214,19 +214,19 @@ class ConfigImportSubscriber extends ConfigImportValidateEventSubscriberBase { if (!isset($core_extension['module'][$owner]) && isset($module_data[$owner])) { $message = $this->t('Configuration %name depends on the %owner module that will not be installed after import.', [ '%name' => $name, - '%owner' => $module_data[$owner]->info['name'] + '%owner' => $module_data[$owner]->info['name'], ]); } elseif (!isset($core_extension['theme'][$owner]) && isset($theme_data[$owner])) { $message = $this->t('Configuration %name depends on the %owner theme that will not be installed after import.', [ '%name' => $name, - '%owner' => $theme_data[$owner]->info['name'] + '%owner' => $theme_data[$owner]->info['name'], ]); } elseif (!isset($core_extension['module'][$owner]) && !isset($core_extension['theme'][$owner])) { $message = $this->t('Configuration %name depends on the %owner extension that will not be installed after import.', [ '%name' => $name, - '%owner' => $owner + '%owner' => $owner, ]); } diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index 45355cc3f6a..32b7d7fdf4a 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -933,7 +933,7 @@ function hook_requirements($phase) { $requirements['drupal'] = [ 'title' => t('Drupal'), 'value' => \Drupal::VERSION, - 'severity' => REQUIREMENT_INFO + 'severity' => REQUIREMENT_INFO, ]; } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php index 43bbaa5309e..43c4c980ee3 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/LanguageFormatter.php @@ -118,7 +118,7 @@ class LanguageFormatter extends StringFormatter { // name. That only depends on formatter settings and no language condition. $languages = $this->getSetting('native_language') ? $this->languageManager->getNativeLanguages(LanguageInterface::STATE_ALL) : $this->languageManager->getLanguages(LanguageInterface::STATE_ALL); return [ - '#plain_text' => $item->language && isset($languages[$item->language->getId()]) ? $languages[$item->language->getId()]->getName() : '' + '#plain_text' => $item->language && isset($languages[$item->language->getId()]) ? $languages[$item->language->getId()]->getName() : '', ]; } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php index 22da3be4202..379ff74db0c 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php @@ -52,7 +52,7 @@ class DecimalItem extends NumericItemBase { 'type' => 'numeric', 'precision' => $field_definition->getSetting('precision'), 'scale' => $field_definition->getSetting('scale'), - ] + ], ], ]; } @@ -98,7 +98,7 @@ class DecimalItem extends NumericItemBase { 'value' => [ 'Regex' => [ 'pattern' => '/^[+-]?((\d+(\.\d*)?)|(\.\d+))$/i', - ] + ], ], ]); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php index ca30ede2681..a6801fc229f 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php @@ -59,7 +59,7 @@ class EmailItem extends FieldItemBase { 'Length' => [ 'max' => Email::EMAIL_MAX_LENGTH, 'maxMessage' => t('%name: the email address can not be longer than @max characters.', ['%name' => $this->getFieldDefinition()->getLabel(), '@max' => Email::EMAIL_MAX_LENGTH]), - ] + ], ], ]); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index 3d839c27097..e1b6c1bf5f8 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -679,8 +679,8 @@ class EntityReferenceItem extends FieldItemBase implements OptionsProviderInterf 'field_storage_config' => [ 'settings' => [ 'target_type' => $entity_type->id(), - ] - ] + ], + ], ]; } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php index 23f5161f28b..50eb767f997 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php @@ -86,7 +86,7 @@ abstract class NumericItemBase extends FieldItemBase { 'Range' => [ 'min' => $min, 'minMessage' => t('%name: the value may be no less than %min.', ['%name' => $label, '%min' => $min]), - ] + ], ], ]); } @@ -98,7 +98,7 @@ abstract class NumericItemBase extends FieldItemBase { 'Range' => [ 'max' => $max, 'maxMessage' => t('%name: the value may be no greater than %max.', ['%name' => $label, '%max' => $max]), - ] + ], ], ]); } diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php index d7f9bded440..493d6a4f674 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php @@ -107,7 +107,7 @@ class EntityReferenceAutocompleteWidget extends WidgetBase { if ($this->getSelectionHandlerSetting('auto_create') && ($bundle = $this->getAutocreateBundle())) { $element['#autocreate'] = [ 'bundle' => $bundle, - 'uid' => ($entity instanceof EntityOwnerInterface) ? $entity->getOwnerId() : \Drupal::currentUser()->id() + 'uid' => ($entity instanceof EntityOwnerInterface) ? $entity->getOwnerId() : \Drupal::currentUser()->id(), ]; } diff --git a/core/lib/Drupal/Core/Field/PluginSettingsBase.php b/core/lib/Drupal/Core/Field/PluginSettingsBase.php index 073bd2c787e..4e38e755f14 100644 --- a/core/lib/Drupal/Core/Field/PluginSettingsBase.php +++ b/core/lib/Drupal/Core/Field/PluginSettingsBase.php @@ -141,7 +141,7 @@ abstract class PluginSettingsBase extends PluginBase implements PluginSettingsIn if (!empty($this->thirdPartySettings)) { // Create dependencies on any modules providing third party settings. return [ - 'module' => array_keys($this->thirdPartySettings) + 'module' => array_keys($this->thirdPartySettings), ]; } return []; diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index b50fe994281..d94b9109b6d 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -778,9 +778,9 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS '#attached' => [ 'placeholders' => [ $placeholder => [ - '#lazy_builder' => ['form_builder:renderFormTokenPlaceholder', [$placeholder]] - ] - ] + '#lazy_builder' => ['form_builder:renderFormTokenPlaceholder', [$placeholder]], + ], + ], ], '#cache' => [ 'max-age' => 0, diff --git a/core/lib/Drupal/Core/Form/form.api.php b/core/lib/Drupal/Core/Form/form.api.php index 4154412eedc..0189bf467ca 100644 --- a/core/lib/Drupal/Core/Form/form.api.php +++ b/core/lib/Drupal/Core/Form/form.api.php @@ -129,7 +129,7 @@ function callback_batch_finished($success, $results, $operations) { $error_operation = reset($operations); $message = t('An error occurred while processing %error_operation with arguments: @arguments', [ '%error_operation' => $error_operation[0], - '@arguments' => print_r($error_operation[1], TRUE) + '@arguments' => print_r($error_operation[1], TRUE), ]); \Drupal::messenger()->addError($message); } diff --git a/core/lib/Drupal/Core/Http/ClientFactory.php b/core/lib/Drupal/Core/Http/ClientFactory.php index 3dcf35374eb..e429bbb9cda 100644 --- a/core/lib/Drupal/Core/Http/ClientFactory.php +++ b/core/lib/Drupal/Core/Http/ClientFactory.php @@ -58,7 +58,7 @@ class ClientFactory { 'http' => NULL, 'https' => NULL, 'no' => [], - ] + ], ]; $config = NestedArray::mergeDeep($default_config, Settings::get('http_client_config', []), $config); diff --git a/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php b/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php index 300def99319..651e9f58e80 100644 --- a/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php +++ b/core/lib/Drupal/Core/Installer/Form/SiteSettingsForm.php @@ -124,7 +124,7 @@ class SiteSettingsForm extends FormBase { $form['settings'][$key]['#states'] = [ 'visible' => [ ':input[name=driver]' => ['value' => $key], - ] + ], ]; } diff --git a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php index c6514962d63..aab333acde6 100644 --- a/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php +++ b/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php @@ -63,7 +63,7 @@ class DatabaseStorageExpirable extends DatabaseStorage implements KeyValueStoreE 'SELECT name, value FROM {' . $this->connection->escapeTable($this->table) . '} WHERE collection = :collection AND expire > :now', [ ':collection' => $this->collection, - ':now' => REQUEST_TIME + ':now' => REQUEST_TIME, ])->fetchAllKeyed(); return array_map([$this->serializer, 'decode'], $values); } diff --git a/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php b/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php index 8afcefe21f7..cf2ac5f992d 100644 --- a/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php +++ b/core/lib/Drupal/Core/Lock/DatabaseLockBackend.php @@ -251,20 +251,20 @@ class DatabaseLockBackend extends LockBackendAbstract { 'type' => 'varchar_ascii', 'length' => 255, 'not null' => TRUE, - 'default' => '' + 'default' => '', ], 'value' => [ 'description' => 'A value for the semaphore.', 'type' => 'varchar_ascii', 'length' => 255, 'not null' => TRUE, - 'default' => '' + 'default' => '', ], 'expire' => [ 'description' => 'A Unix timestamp with microseconds indicating when the semaphore should expire.', 'type' => 'float', 'size' => 'big', - 'not null' => TRUE + 'not null' => TRUE, ], ], 'indexes' => [ diff --git a/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php index 89f39a8460c..60b72776716 100644 --- a/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php +++ b/core/lib/Drupal/Core/Render/Element/SystemCompactLink.php @@ -65,7 +65,7 @@ class SystemCompactLink extends Link { $element['#url'] = BaseUrl::fromRoute('system.admin_compact_page', ['mode' => 'off']); $element['#options'] = [ 'attributes' => ['title' => t('Expand layout to include descriptions.')], - 'query' => \Drupal::destination()->getAsArray() + 'query' => \Drupal::destination()->getAsArray(), ]; } else { diff --git a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php index 5966668af35..13e9c7675f3 100644 --- a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php +++ b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php @@ -226,7 +226,7 @@ class HtmlRenderer implements MainContentRendererInterface { return $this->renderer->render($main_content, FALSE); }); $main_content = $this->renderCache->getCacheableRenderArray($main_content) + [ - '#title' => isset($main_content['#title']) ? $main_content['#title'] : NULL + '#title' => isset($main_content['#title']) ? $main_content['#title'] : NULL, ]; } diff --git a/core/lib/Drupal/Core/Render/RenderCache.php b/core/lib/Drupal/Core/Render/RenderCache.php index 9ac338124cd..20e4b0c142b 100644 --- a/core/lib/Drupal/Core/Render/RenderCache.php +++ b/core/lib/Drupal/Core/Render/RenderCache.php @@ -259,7 +259,7 @@ class RenderCache implements RenderCacheInterface { '#cache' => [ 'keys' => $elements['#cache']['keys'], 'contexts' => $redirect_cacheability_updated->getCacheContexts(), - ] + ], ]; $cid = $this->createCacheID($recalculated_cid_pseudo_element); // Ensure the about-to-be-cached data uses the merged cache contexts. diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index bae83de7461..5e1b8d1b8dd 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -326,7 +326,7 @@ class Renderer implements RendererInterface { // automatically by the Renderer. Adding them as though they are // supported allows us to avoid throwing an exception 100% of the time. '#weight', - '#printed' + '#printed', ]; $unsupported_keys = array_diff(array_keys($elements), $supported_keys); if (count($unsupported_keys)) { diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php index f71e2e11420..be11f800497 100644 --- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php +++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidator.php @@ -73,7 +73,7 @@ class PrimitiveTypeConstraintValidator extends ConstraintValidator { if (!$valid) { // @todo: Provide a good violation message for each problem. $this->context->addViolation($constraint->message, [ - '%value' => is_object($value) ? get_class($value) : (is_array($value) ? 'Array' : (string) $value) + '%value' => is_object($value) ? get_class($value) : (is_array($value) ? 'Array' : (string) $value), ]); } } diff --git a/core/modules/action/src/Form/ActionAdminManageForm.php b/core/modules/action/src/Form/ActionAdminManageForm.php index 627e1ed327e..51fdfabdb3b 100644 --- a/core/modules/action/src/Form/ActionAdminManageForm.php +++ b/core/modules/action/src/Form/ActionAdminManageForm.php @@ -72,7 +72,7 @@ class ActionAdminManageForm extends FormBase { '#empty_option' => $this->t('- Select -'), ]; $form['parent']['actions'] = [ - '#type' => 'actions' + '#type' => 'actions', ]; $form['parent']['actions']['submit'] = [ '#type' => 'submit', diff --git a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php index 1737715f8a5..928b3c9b812 100644 --- a/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php +++ b/core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php @@ -40,7 +40,7 @@ class MigrateActionsTest extends MigrateDrupal6TestBase { $this->assertEntity('send_e_mail', 'Send e-mail', 'system', [ "recipient" => "test@example.com", "subject" => "Drupal migration test", - "message" => "Drupal migration test" + "message" => "Drupal migration test", ]); $this->assertEntity('redirect_to_url', 'Redirect to URL', 'system', ["url" => "https://www.drupal.org"]); diff --git a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php index 1601449d674..47049f33c6e 100644 --- a/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php +++ b/core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php @@ -40,7 +40,7 @@ class MigrateActionsTest extends MigrateDrupal7TestBase { $this->assertEntity('send_e_mail', 'Send e-mail', 'system', [ "recipient" => "test@example.com", "subject" => "Drupal migration test", - "message" => "Drupal migration test" + "message" => "Drupal migration test", ]); $this->assertEntity('redirect_to_url', 'Redirect to URL', 'system', ["url" => "https://www.drupal.org"]); diff --git a/core/modules/action/tests/src/Kernel/Plugin/Action/EmailActionTest.php b/core/modules/action/tests/src/Kernel/Plugin/Action/EmailActionTest.php index 925fb3fcd04..a47f9b35f74 100644 --- a/core/modules/action/tests/src/Kernel/Plugin/Action/EmailActionTest.php +++ b/core/modules/action/tests/src/Kernel/Plugin/Action/EmailActionTest.php @@ -36,7 +36,7 @@ class EmailActionTest extends KernelTestBase { $configuration = [ 'recipient' => 'test@example.com', 'subject' => 'Test subject', - 'message' => 'Test message' + 'message' => 'Test message', ]; $plugin_manager ->createInstance('action_send_email_action', $configuration) diff --git a/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php b/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php index 3df80a32588..d55cab2664e 100644 --- a/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php +++ b/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php @@ -100,7 +100,7 @@ class DefaultFetcher implements FetcherInterface, ContainerFactoryPluginInterfac 'allow_redirects' => [ 'on_redirect' => function (RequestInterface $request, ResponseInterface $response, UriInterface $uri) use (&$actual_uri) { $actual_uri = (string) $uri; - } + }, ], ])->send($request); diff --git a/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php b/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php index 267cc3447c1..2ce7820a7db 100644 --- a/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php +++ b/core/modules/ban/tests/src/Kernel/Plugin/migrate/source/d7/BlockedIpsTest.php @@ -27,7 +27,7 @@ class BlockedIpsTest extends MigrateSqlSourceTestBase { [ 'iid' => 1, 'ip' => '127.0.0.1', - ] + ], ]; $tests[0]['expected_data'] = [ [ diff --git a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php index 50e618bee1e..20bedcb3831 100644 --- a/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php +++ b/core/modules/big_pipe/tests/modules/big_pipe_regression_test/src/BigPipeRegressionTestController.php @@ -39,7 +39,7 @@ class BigPipeRegressionTestController { public static function currentTime() { return [ '#markup' => '', - '#cache' => ['max-age' => 0] + '#cache' => ['max-age' => 0], ]; } diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php index e3da529ea46..f274356139d 100644 --- a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php +++ b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipePlaceholderTestCases.php @@ -52,7 +52,7 @@ class BigPipePlaceholderTestCases { [ '#lazy_builder' => [ 'Drupal\Core\Render\Element\StatusMessages::renderMessages', - [NULL] + [NULL], ], ] ); @@ -129,7 +129,7 @@ class BigPipePlaceholderTestCases { [ '#lazy_builder' => [ 'route_processor_csrf:renderPlaceholderCsrfToken', - ['admin/config/user-interface/shortcut/manage/default/add-link-inline'] + ['admin/config/user-interface/shortcut/manage/default/add-link-inline'], ], ] ); @@ -155,14 +155,14 @@ class BigPipePlaceholderTestCases { '#attached' => [ 'placeholders' => [ ' ['#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::helloOrYarhar', []]], - ] + ], ], ], ' [ 'hello_or_yarhar', - [] + [], ], ] ); @@ -188,9 +188,9 @@ class BigPipePlaceholderTestCases { '#pre_render' => [ '\Drupal\big_pipe_test\BigPipeTestController::currentTime', ], - ] - ] - ] + ], + ], + ], ], '', [ diff --git a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php index 2405aff5d1c..baa5f708f05 100644 --- a/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php +++ b/core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php @@ -91,7 +91,7 @@ class BigPipeTestController { public static function currentTime() { return [ '#markup' => '', - '#cache' => ['max-age' => 0] + '#cache' => ['max-age' => 0], ]; } diff --git a/core/modules/block/block.install b/core/modules/block/block.install index 6545a1997a5..50b27585f36 100644 --- a/core/modules/block/block.install +++ b/core/modules/block/block.install @@ -73,7 +73,7 @@ function block_update_8001() { // their own updates. $update_backup[$block->get('id')] = [ 'missing_context_ids' => $backup_values, - 'status' => $block->get('status') + 'status' => $block->get('status'), ]; } } diff --git a/core/modules/block/block.post_update.php b/core/modules/block/block.post_update.php index d5f0852a3cc..0d49ead480b 100644 --- a/core/modules/block/block.post_update.php +++ b/core/modules/block/block.post_update.php @@ -60,7 +60,7 @@ function block_post_update_disable_blocks_with_missing_contexts() { foreach ($blocks as $disabled_block_id => $disabled_block) { $message .= '
  • ' . t('@label (Visibility: @plugin_ids)', [ '@label' => $disabled_block->get('settings')['label'], - '@plugin_ids' => implode(', ', array_intersect_key($condition_plugin_id_label_map, array_flip(array_keys($block_update_8001[$disabled_block_id]['missing_context_ids'])))) + '@plugin_ids' => implode(', ', array_intersect_key($condition_plugin_id_label_map, array_flip(array_keys($block_update_8001[$disabled_block_id]['missing_context_ids'])))), ]) . '
  • '; } $message .= ''; diff --git a/core/modules/block/src/BlockListBuilder.php b/core/modules/block/src/BlockListBuilder.php index facd02443c1..c1ccc504dbc 100644 --- a/core/modules/block/src/BlockListBuilder.php +++ b/core/modules/block/src/BlockListBuilder.php @@ -222,7 +222,7 @@ class BlockListBuilder extends ConfigEntityListBuilder implements FormInterface '#theme_wrappers' => [ 'container' => [ '#attributes' => ['class' => 'region-title__action'], - ] + ], ], '#prefix' => $title, '#type' => 'link', diff --git a/core/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php b/core/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php index a86db68dfcf..d262f445df5 100644 --- a/core/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php +++ b/core/modules/block/tests/modules/block_test/src/Form/FavoriteAnimalTestForm.php @@ -25,7 +25,7 @@ class FavoriteAnimalTestForm extends FormBase { public function buildForm(array $form, FormStateInterface $form_state) { $form['favorite_animal'] = [ '#type' => 'textfield', - '#title' => $this->t('Your favorite animal.') + '#title' => $this->t('Your favorite animal.'), ]; $form['submit_animal'] = [ diff --git a/core/modules/block/tests/modules/block_test/src/Form/TestForm.php b/core/modules/block/tests/modules/block_test/src/Form/TestForm.php index 7619d842d14..55b13f78258 100644 --- a/core/modules/block/tests/modules/block_test/src/Form/TestForm.php +++ b/core/modules/block/tests/modules/block_test/src/Form/TestForm.php @@ -25,7 +25,7 @@ class TestForm extends FormBase { public function buildForm(array $form, FormStateInterface $form_state) { $form['email'] = [ '#type' => 'email', - '#title' => $this->t('Your .com email address.') + '#title' => $this->t('Your .com email address.'), ]; $form['show'] = [ diff --git a/core/modules/block/tests/src/Functional/BlockLanguageTest.php b/core/modules/block/tests/src/Functional/BlockLanguageTest.php index cf1b87720a2..8f963e17e64 100644 --- a/core/modules/block/tests/src/Functional/BlockLanguageTest.php +++ b/core/modules/block/tests/src/Functional/BlockLanguageTest.php @@ -164,7 +164,7 @@ class BlockLanguageTest extends BrowserTestBase { // Change visibility to now depend on content language for this block. $edit = [ - 'visibility[language][context_mapping][language]' => '@language.current_language_context:language_content' + 'visibility[language][context_mapping][language]' => '@language.current_language_context:language_content', ]; $this->drupalPostForm('admin/structure/block/manage/' . $block_id, $edit, t('Save block')); diff --git a/core/modules/block/tests/src/Functional/BlockTest.php b/core/modules/block/tests/src/Functional/BlockTest.php index 7518c82dc13..53b48662cd2 100644 --- a/core/modules/block/tests/src/Functional/BlockTest.php +++ b/core/modules/block/tests/src/Functional/BlockTest.php @@ -146,7 +146,7 @@ class BlockTest extends BlockTestBase { $block_name = 'system_powered_by_block'; $add_url = Url::fromRoute('block.admin_add', [ 'plugin_id' => $block_name, - 'theme' => $default_theme + 'theme' => $default_theme, ]); $links = $this->xpath('//a[contains(@href, :href)]', [':href' => $add_url->toString()]); $this->assertEqual(1, count($links), 'Found one matching link.'); @@ -537,14 +537,14 @@ class BlockTest extends BlockTestBase { $this->assertEqual($block->getVisibility()['user_role']['roles'], [ $role1->id() => $role1->id(), - $role2->id() => $role2->id() + $role2->id() => $role2->id(), ]); $role1->delete(); $block = Block::load($block->id()); $this->assertEqual($block->getVisibility()['user_role']['roles'], [ - $role2->id() => $role2->id() + $role2->id() => $role2->id(), ]); } diff --git a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php index d37f8c79642..66c2679bb05 100644 --- a/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php +++ b/core/modules/block/tests/src/Kernel/Plugin/migrate/source/BlockTest.php @@ -87,7 +87,7 @@ class BlockTest extends MigrateSqlSourceTestBase { 'schema_version' => '6055', 'weight' => '0', 'info' => 'a:0:{}', - ] + ], ]; // The expected results. @@ -104,7 +104,7 @@ class BlockTest extends MigrateSqlSourceTestBase { 'pages' => '', 'title' => 'Test Title 01', 'cache' => -1, - 'roles' => [2] + 'roles' => [2], ], [ 'bid' => 2, @@ -118,7 +118,7 @@ class BlockTest extends MigrateSqlSourceTestBase { 'pages' => '', 'title' => 'Test Title 02', 'cache' => -1, - 'roles' => [2] + 'roles' => [2], ], ]; return $tests; diff --git a/core/modules/block/tests/src/Unit/BlockRepositoryTest.php b/core/modules/block/tests/src/Unit/BlockRepositoryTest.php index 5584b0bfdda..f522b2b8422 100644 --- a/core/modules/block/tests/src/Unit/BlockRepositoryTest.php +++ b/core/modules/block/tests/src/Unit/BlockRepositoryTest.php @@ -118,21 +118,21 @@ class BlockRepositoryTest extends UnitTestCase { public function providerBlocksConfig() { $blocks_config = [ 'block1' => [ - AccessResult::allowed(), 'top', 0 + AccessResult::allowed(), 'top', 0, ], // Test a block without access. 'block2' => [ - AccessResult::forbidden(), 'bottom', 0 + AccessResult::forbidden(), 'bottom', 0, ], // Test some blocks in the same region with specific weight. 'block4' => [ - AccessResult::allowed(), 'bottom', 5 + AccessResult::allowed(), 'bottom', 5, ], 'block3' => [ - AccessResult::allowed(), 'bottom', 5 + AccessResult::allowed(), 'bottom', 5, ], 'block5' => [ - AccessResult::allowed(), 'bottom', -5 + AccessResult::allowed(), 'bottom', -5, ], ]; @@ -142,7 +142,7 @@ class BlockRepositoryTest extends UnitTestCase { 'top' => ['block1'], 'center' => [], 'bottom' => ['block5', 'block3', 'block4'], - ] + ], ]; return $test_cases; } diff --git a/core/modules/block_content/src/Controller/BlockContentController.php b/core/modules/block_content/src/Controller/BlockContentController.php index ff10ff0558f..08408a16b00 100644 --- a/core/modules/block_content/src/Controller/BlockContentController.php +++ b/core/modules/block_content/src/Controller/BlockContentController.php @@ -103,7 +103,7 @@ class BlockContentController extends ControllerBase { */ public function addForm(BlockContentTypeInterface $block_content_type, Request $request) { $block = $this->blockContentStorage->create([ - 'type' => $block_content_type->id() + 'type' => $block_content_type->id(), ]); if (($theme = $request->query->get('theme')) && in_array($theme, array_keys($this->themeHandler->listInfo()))) { // We have navigated to this page from the block library and will keep track diff --git a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php index 5e09be8b58e..54f7ad58e1d 100644 --- a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php +++ b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php @@ -190,9 +190,9 @@ class BlockContentBlock extends BlockBase implements ContainerFactoryPluginInter return [ '#markup' => $this->t('Block with uuid %uuid does not exist. Add custom block.', [ '%uuid' => $this->getDerivativeId(), - ':url' => $this->urlGenerator->generate('block_content.add_page') + ':url' => $this->urlGenerator->generate('block_content.add_page'), ]), - '#access' => $this->account->hasPermission('administer blocks') + '#access' => $this->account->hasPermission('administer blocks'), ]; } } diff --git a/core/modules/block_content/src/Plugin/Derivative/BlockContent.php b/core/modules/block_content/src/Plugin/Derivative/BlockContent.php index 25806c5f132..ac82a6c39ca 100644 --- a/core/modules/block_content/src/Plugin/Derivative/BlockContent.php +++ b/core/modules/block_content/src/Plugin/Derivative/BlockContent.php @@ -51,7 +51,7 @@ class BlockContent extends DeriverBase implements ContainerDeriverInterface { $this->derivatives[$block_content->uuid()] = $base_plugin_definition; $this->derivatives[$block_content->uuid()]['admin_label'] = $block_content->label(); $this->derivatives[$block_content->uuid()]['config_dependencies']['content'] = [ - $block_content->getConfigDependencyName() + $block_content->getConfigDependencyName(), ]; } return parent::getDerivativeDefinitions($base_plugin_definition); diff --git a/core/modules/block_content/src/Tests/BlockContentTestBase.php b/core/modules/block_content/src/Tests/BlockContentTestBase.php index f277f53d7fc..a60ab91d4bf 100644 --- a/core/modules/block_content/src/Tests/BlockContentTestBase.php +++ b/core/modules/block_content/src/Tests/BlockContentTestBase.php @@ -34,7 +34,7 @@ abstract class BlockContentTestBase extends WebTestBase { * @var array */ protected $permissions = [ - 'administer blocks' + 'administer blocks', ]; /** @@ -83,7 +83,7 @@ abstract class BlockContentTestBase extends WebTestBase { $block_content = BlockContent::create([ 'info' => $title, 'type' => $bundle, - 'langcode' => 'en' + 'langcode' => 'en', ]); if ($block_content && $save === TRUE) { $block_content->save(); diff --git a/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php b/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php index ea48e377539..0e3fbfeeb00 100644 --- a/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php +++ b/core/modules/block_content/src/Tests/Views/BlockContentTestBase.php @@ -99,7 +99,7 @@ abstract class BlockContentTestBase extends ViewTestBase { $values += [ 'id' => $id, 'label' => $id, - 'revision' => FALSE + 'revision' => FALSE, ]; $bundle = BlockContentType::create($values); $status = $bundle->save(); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php index 59f111b9658..68350092850 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentCacheTagsTest.php @@ -29,7 +29,7 @@ class BlockContentCacheTagsTest extends EntityCacheTagsTestBase { $block_content_type = BlockContentType::create([ 'id' => 'basic', 'label' => 'basic', - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); block_content_add_body_field($block_content_type->id()); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php index 7447f33a628..46768d694b2 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentCreationTest.php @@ -29,7 +29,7 @@ class BlockContentCreationTest extends BlockContentTestBase { */ protected $permissions = [ 'administer blocks', - 'administer block_content display' + 'administer block_content display', ]; /** @@ -55,7 +55,7 @@ class BlockContentCreationTest extends BlockContentTestBase { // Check that the Basic block has been created. $this->assertRaw(format_string('@block %name has been created.', [ '@block' => 'basic', - '%name' => $edit['info[0][value]'] + '%name' => $edit['info[0][value]'], ]), 'Basic block created.'); // Check that the view mode setting is hidden because only one exists. @@ -74,7 +74,7 @@ class BlockContentCreationTest extends BlockContentTestBase { // Check that the Basic block has been created. $this->assertRaw(format_string('A custom block with block description %value already exists.', [ - '%value' => $edit['info[0][value]'] + '%value' => $edit['info[0][value]'], ])); $this->assertResponse(200); } @@ -104,7 +104,7 @@ class BlockContentCreationTest extends BlockContentTestBase { // Check that the Basic block has been created. $this->assertRaw(format_string('@block %name has been created.', [ '@block' => 'basic', - '%name' => $edit['info[0][value]'] + '%name' => $edit['info[0][value]'], ]), 'Basic block created.'); // Save our block permanently @@ -156,7 +156,7 @@ class BlockContentCreationTest extends BlockContentTestBase { // Check that the Basic block has been created. $this->assertRaw(format_string('A custom block with block description %value already exists.', [ - '%value' => $edit['info[0][value]'] + '%value' => $edit['info[0][value]'], ])); $this->assertResponse(200); } diff --git a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php index 0f7ae5a2e68..fe730e8a0c4 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentSaveTest.php @@ -39,7 +39,7 @@ class BlockContentSaveTest extends BlockContentTestBase { 'info' => $info, 'body' => ['value' => $this->randomMachineName(32)], 'type' => 'basic', - 'id' => $test_id + 'id' => $test_id, ]; $block = BlockContent::create($block_array); $block->enforceIsNew(TRUE); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php index 1fdd0ef5617..c8c32fdacfb 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php @@ -31,7 +31,7 @@ abstract class BlockContentTestBase extends BrowserTestBase { * @var array */ protected $permissions = [ - 'administer blocks' + 'administer blocks', ]; /** @@ -80,7 +80,7 @@ abstract class BlockContentTestBase extends BrowserTestBase { $block_content = BlockContent::create([ 'info' => $title, 'type' => $bundle, - 'langcode' => 'en' + 'langcode' => 'en', ]); if ($block_content && $save === TRUE) { $block_content->save(); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php index ccf5b32cc45..6fc5f1af013 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php @@ -23,7 +23,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase { 'content_translation', 'block', 'field_ui', - 'block_content' + 'block_content', ]; /** @@ -59,7 +59,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase { $bundle = BlockContentType::create([ 'id' => $this->bundle, 'label' => $this->bundle, - 'revision' => FALSE + 'revision' => FALSE, ]); $bundle->save(); } @@ -72,7 +72,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase { 'translate any entity', 'access administration pages', 'administer blocks', - 'administer block_content fields' + 'administer block_content fields', ]); } @@ -95,7 +95,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase { $block_content = BlockContent::create([ 'info' => $title, 'type' => $bundle, - 'langcode' => 'en' + 'langcode' => 'en', ]); $block_content->save(); return $block_content; @@ -161,7 +161,7 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase { $bundle = BlockContentType::create([ 'id' => $disabled_bundle, 'label' => $disabled_bundle, - 'revision' => FALSE + 'revision' => FALSE, ]); $bundle->save(); diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php index 8105d3fd009..b707c83a92c 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php @@ -29,7 +29,7 @@ class BlockContentTypeTest extends BlockContentTestBase { */ protected $permissions = [ 'administer blocks', - 'administer block_content fields' + 'administer block_content fields', ]; /** diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php index 0ddcfbc137b..dd14a4266cb 100644 --- a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php +++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php @@ -94,7 +94,7 @@ abstract class BlockContentTestBase extends ViewTestBase { $values += [ 'id' => $id, 'label' => $id, - 'revision' => FALSE + 'revision' => FALSE, ]; $bundle = BlockContentType::create($values); $status = $bundle->save(); diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 1b40475c1d2..b5d5515969f 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -111,7 +111,7 @@ function book_node_links_alter(array &$links, NodeInterface $node, array &$conte 'type' => 'html', 'node' => $node->id(), ]), - 'attributes' => ['title' => t('Show a printer-friendly version of this book page and its sub-pages.')] + 'attributes' => ['title' => t('Show a printer-friendly version of this book page and its sub-pages.')], ]; } } diff --git a/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php b/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php index e8505212dc8..1d0e25365ae 100644 --- a/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php +++ b/core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php @@ -38,7 +38,7 @@ class MigrateBookTest extends MigrateDrupal7TestBase { 'd7_user', 'd7_node_type', 'd7_node', - 'd7_book' + 'd7_book', ]); } diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php index 64e764ebf56..45b97e77bc1 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php @@ -70,7 +70,7 @@ class DrupalImageCaption extends PluginBase implements CKEditorPluginInterface, */ public function getCssFiles(Editor $editor) { return [ - drupal_get_path('module', 'ckeditor') . '/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css' + drupal_get_path('module', 'ckeditor') . '/css/plugins/drupalimagecaption/ckeditor.drupalimagecaption.css', ]; } diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php index ffae4096cf2..0cc6b58e693 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php @@ -128,7 +128,7 @@ class Language extends CKEditorPluginBase implements CKEditorPluginConfigurableI */ public function getCssFiles(Editor $editor) { return [ - drupal_get_path('module', 'ckeditor') . '/css/plugins/language/ckeditor.language.css' + drupal_get_path('module', 'ckeditor') . '/css/plugins/language/ckeditor.language.css', ]; } diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php index 2f14bca89a9..5e45bde7774 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/StylesCombo.php @@ -157,7 +157,7 @@ class StylesCombo extends CKEditorPluginBase implements CKEditorPluginConfigurab ]; if (!empty($classes)) { $configured_style['attributes'] = [ - 'class' => implode(' ', array_map('trim', $classes)) + 'class' => implode(' ', array_map('trim', $classes)), ]; } $styles_set[] = $configured_style; diff --git a/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php index 49ab1b30dd3..ee4a4d0edb8 100644 --- a/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php +++ b/core/modules/ckeditor/src/Plugin/Editor/CKEditor.php @@ -210,8 +210,8 @@ class CKEditor extends EditorBase implements ContainerFactoryPluginInterface { 0 => [ 'name' => 'All existing buttons', 'items' => $all_buttons, - ] - ] + ], + ], ], ], 'plugins' => $settings['plugins'], diff --git a/core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php b/core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php index e0901dc84ff..1312658d70e 100644 --- a/core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php +++ b/core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php @@ -32,7 +32,7 @@ class LlamaCss extends Llama implements CKEditorPluginButtonsInterface, CKEditor */ public function getCssFiles(Editor $editor) { return [ - drupal_get_path('module', 'ckeditor_test') . '/css/llama.css' + drupal_get_path('module', 'ckeditor_test') . '/css/llama.css', ]; } diff --git a/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php b/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php index eb02d37adad..5664728ec30 100644 --- a/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php +++ b/core/modules/ckeditor/tests/src/Kernel/CKEditorPluginManagerTest.php @@ -151,7 +151,7 @@ class CKEditorPluginManagerTest extends KernelTestBase { // Case 2: CKEditor iframe instance CSS file. $expected = [ - 'llama_css' => [drupal_get_path('module', 'ckeditor_test') . '/css/llama.css'] + 'llama_css' => [drupal_get_path('module', 'ckeditor_test') . '/css/llama.css'], ]; $this->assertIdentical($expected, $this->manager->getCssFiles($editor), 'Iframe instance CSS file found.'); } diff --git a/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php b/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php index 4f1da318340..de4c23fe839 100644 --- a/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php +++ b/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php @@ -50,7 +50,7 @@ class CKEditorTest extends KernelTestBase { 'status' => 1, 'settings' => [ 'allowed_html' => '


    ', - ] + ], ], ], ]); diff --git a/core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php b/core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php index 6b9f9af87e3..dfa1f163f7e 100644 --- a/core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php +++ b/core/modules/ckeditor/tests/src/Unit/CKEditorPluginManagerTest.php @@ -20,7 +20,7 @@ class CKEditorPluginManagerTest extends UnitTestCase { return [ 'empty' => [ [], - [] + [], ], '1 row, 1 group' => [ [ @@ -28,9 +28,9 @@ class CKEditorPluginManagerTest extends UnitTestCase { [ // Group 1. ['name' => 'Formatting', 'items' => ['Bold', 'Italic']], - ] + ], ], - ['Bold', 'Italic'] + ['Bold', 'Italic'], ], '1 row, >1 groups' => [ [ @@ -42,7 +42,7 @@ class CKEditorPluginManagerTest extends UnitTestCase { ['name' => 'Linking', 'items' => ['Link']], ], ], - ['Bold', 'Italic', 'Link'] + ['Bold', 'Italic', 'Link'], ], '2 rows, 1 group each' => [ [ @@ -76,7 +76,7 @@ class CKEditorPluginManagerTest extends UnitTestCase { ['name' => 'Advanced', 'items' => ['Llama']], ], ], - ['Bold', 'Italic', 'Link', 'Source', 'Llama'] + ['Bold', 'Italic', 'Link', 'Source', 'Llama'], ], ]; } diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php index 69c508ae038..2c7da35b248 100644 --- a/core/modules/comment/src/CommentForm.php +++ b/core/modules/comment/src/CommentForm.php @@ -379,7 +379,7 @@ class CommentForm extends ContentEntityForm { // Add a log entry. $logger->notice('Comment posted: %subject.', [ '%subject' => $comment->getSubject(), - 'link' => $this->l(t('View'), $comment->urlInfo()->setOption('fragment', 'comment-' . $comment->id())) + 'link' => $this->l(t('View'), $comment->urlInfo()->setOption('fragment', 'comment-' . $comment->id())), ]); // Explain the approval queue if necessary. diff --git a/core/modules/comment/src/CommentTypeForm.php b/core/modules/comment/src/CommentTypeForm.php index 401ce8f25f6..fd7125846c6 100644 --- a/core/modules/comment/src/CommentTypeForm.php +++ b/core/modules/comment/src/CommentTypeForm.php @@ -111,7 +111,7 @@ class CommentTypeForm extends EntityForm { '#default_value' => $comment_type->getTargetEntityTypeId(), '#title' => t('Target entity type'), '#options' => $options, - '#description' => t('The target entity type can not be changed after the comment type has been created.') + '#description' => t('The target entity type can not be changed after the comment type has been created.'), ]; } else { diff --git a/core/modules/comment/src/CommentViewsData.php b/core/modules/comment/src/CommentViewsData.php index ead61c1a33c..9a344a65be0 100644 --- a/core/modules/comment/src/CommentViewsData.php +++ b/core/modules/comment/src/CommentViewsData.php @@ -214,7 +214,7 @@ class CommentViewsData extends EntityViewsData { [ 'field' => 'entity_type', 'value' => $type, - 'table' => 'comment_field_data' + 'table' => 'comment_field_data', ], ], ], diff --git a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php index 03e95657e7c..7534df3183c 100644 --- a/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php +++ b/core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php @@ -31,7 +31,7 @@ class CommentVariablePerCommentType extends CommentVariable { $return['comment'] = [ 'comment_type' => 'comment', 'label' => $this->t('Default comments'), - 'description' => $this->t('Allows commenting on content') + 'description' => $this->t('Allows commenting on content'), ]; } else { @@ -39,7 +39,7 @@ class CommentVariablePerCommentType extends CommentVariable { $return['comment_no_subject'] = [ 'comment_type' => 'comment_no_subject', 'label' => $this->t('Comments without subject field'), - 'description' => $this->t('Allows commenting on content, comments without subject field') + 'description' => $this->t('Allows commenting on content, comments without subject field'), ]; } } diff --git a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php index f88c0498d3d..b8200c1c7f7 100644 --- a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php +++ b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php @@ -32,9 +32,9 @@ class StatisticsLastCommentName extends FieldPluginBase { [ 'field' => 'uid', 'operator' => '!=', - 'value' => '0' - ] - ] + 'value' => '0', + ], + ], ]; $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $definition); diff --git a/core/modules/comment/src/Tests/CommentPagerTest.php b/core/modules/comment/src/Tests/CommentPagerTest.php index 5bbf49c2b47..de45c86cdb1 100644 --- a/core/modules/comment/src/Tests/CommentPagerTest.php +++ b/core/modules/comment/src/Tests/CommentPagerTest.php @@ -329,7 +329,7 @@ class CommentPagerTest extends CommentTestBase { 'settings' => [ 'pager_id' => 1, 'view_mode' => 'default', - ] + ], ]) ->save(); diff --git a/core/modules/comment/tests/src/Functional/CommentAdminTest.php b/core/modules/comment/tests/src/Functional/CommentAdminTest.php index 9e26be4f088..2c8cb172e37 100644 --- a/core/modules/comment/tests/src/Functional/CommentAdminTest.php +++ b/core/modules/comment/tests/src/Functional/CommentAdminTest.php @@ -57,7 +57,7 @@ class CommentAdminTest extends CommentTestBase { 'comment_body' => $body, 'entity_id' => $this->node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', ]); $this->drupalLogout(); @@ -145,7 +145,7 @@ class CommentAdminTest extends CommentTestBase { 'comment_body' => $body, 'entity_id' => $this->node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', ]); $this->drupalLogout(); diff --git a/core/modules/comment/tests/src/Functional/CommentCSSTest.php b/core/modules/comment/tests/src/Functional/CommentCSSTest.php index e17534a721c..c281f63ce38 100644 --- a/core/modules/comment/tests/src/Functional/CommentCSSTest.php +++ b/core/modules/comment/tests/src/Functional/CommentCSSTest.php @@ -23,7 +23,7 @@ class CommentCSSTest extends CommentTestBase { // Allow anonymous users to see comments. user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, [ 'access comments', - 'access content' + 'access content', ]); } diff --git a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php index 7580bb20307..d404747844b 100644 --- a/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php +++ b/core/modules/comment/tests/src/Functional/CommentNonNodeTest.php @@ -253,7 +253,7 @@ class CommentNonNodeTest extends BrowserTestBase { */ public function testCommentFunctionality() { $limited_user = $this->drupalCreateUser([ - 'administer entity_test fields' + 'administer entity_test fields', ]); $this->drupalLogin($limited_user); // Test that default field exists. diff --git a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php index daac938fa3b..f6bec9c7d35 100644 --- a/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php +++ b/core/modules/comment/tests/src/Functional/CommentTranslationUITest.php @@ -99,7 +99,7 @@ class CommentTranslationUITest extends ContentTranslationUITestBase { $node = $this->drupalCreateNode([ 'type' => $node_type, $field_name => [ - ['status' => CommentItemInterface::OPEN] + ['status' => CommentItemInterface::OPEN], ], ]); $values['entity_id'] = $node->id(); diff --git a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php index 5cb96805141..4085f4f47bf 100644 --- a/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php +++ b/core/modules/comment/tests/src/Functional/Views/DefaultViewRecentCommentsTest.php @@ -119,7 +119,7 @@ class DefaultViewRecentCommentsTest extends ViewTestBase { $map = [ 'subject' => 'subject', 'cid' => 'cid', - 'comment_field_data_created' => 'created' + 'comment_field_data_created' => 'created', ]; $expected_result = []; foreach (array_values($this->commentsCreated) as $key => $comment) { diff --git a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php index bb072458899..c17f247dff0 100644 --- a/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentFieldAccessTest.php @@ -202,7 +202,7 @@ class CommentFieldAccessTest extends EntityKernelTestBase { // Generate permutations. $combinations = [ 'comment' => [$comment1, $comment2, $comment3, $comment4], - 'user' => [$comment_admin_user, $comment_enabled_user, $comment_no_edit_user, $comment_disabled_user, $anonymous_user] + 'user' => [$comment_admin_user, $comment_enabled_user, $comment_no_edit_user, $comment_disabled_user, $anonymous_user], ]; $permutations = $this->generatePermutations($combinations); diff --git a/core/modules/comment/tests/src/Kernel/CommentValidationTest.php b/core/modules/comment/tests/src/Kernel/CommentValidationTest.php index 98b771513b9..1d81d55ecec 100644 --- a/core/modules/comment/tests/src/Kernel/CommentValidationTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentValidationTest.php @@ -51,7 +51,7 @@ class CommentValidationTest extends EntityKernelTestBase { 'type' => 'comment', 'settings' => [ 'comment_type' => 'comment', - ] + ], ])->save(); // Create a page node type. diff --git a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php index 2fb8c745706..2144ebd94aa 100644 --- a/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php +++ b/core/modules/comment/tests/src/Kernel/Views/CommentUserNameTest.php @@ -118,7 +118,7 @@ class CommentUserNameTest extends ViewsKernelTestBase { 'field' => 'name', 'id' => 'name', 'plugin_id' => 'field', - 'type' => 'comment_username' + 'type' => 'comment_username', ], 'subject' => [ 'table' => 'comment_field_data', diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php index c82467947af..475c4a4a637 100644 --- a/core/modules/config/src/Form/ConfigSync.php +++ b/core/modules/config/src/Form/ConfigSync.php @@ -214,12 +214,12 @@ class ConfigSync extends FormBase { sort($change_list); $message = [ [ - '#markup' => $this->t('The following items in your active configuration have changes since the last import that may be lost on the next import.') + '#markup' => $this->t('The following items in your active configuration have changes since the last import that may be lost on the next import.'), ], [ '#theme' => 'item_list', '#items' => $change_list, - ] + ], ]; $this->messenger()->addWarning($this->renderer->renderPlain($message)); } @@ -295,7 +295,7 @@ class ConfigSync extends FormBase { 'class' => ['use-ajax'], 'data-dialog-type' => 'modal', 'data-dialog-options' => json_encode([ - 'width' => 700 + 'width' => 700, ]), ], ]; diff --git a/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php b/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php index 8d21ee4e832..9d48e0b1b96 100644 --- a/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php +++ b/core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php @@ -18,7 +18,7 @@ class ConfigOverrider implements ConfigFactoryOverrideInterface { return [ 'config_test.dynamic.test_1' => [ 'label' => 'Overridden label', - ] + ], ]; } diff --git a/core/modules/config/tests/config_events_test/src/EventSubscriber.php b/core/modules/config/tests/config_events_test/src/EventSubscriber.php index b36a0db7a18..0cdc4416c31 100644 --- a/core/modules/config/tests/config_events_test/src/EventSubscriber.php +++ b/core/modules/config/tests/config_events_test/src/EventSubscriber.php @@ -40,7 +40,7 @@ class EventSubscriber implements EventSubscriberInterface { 'event_name' => $name, 'current_config_data' => $config->get(), 'original_config_data' => $config->getOriginal(), - 'raw_config_data' => $config->getRawData() + 'raw_config_data' => $config->getRawData(), ]); } diff --git a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php index 092ad2b377f..c7e0b27d444 100644 --- a/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php +++ b/core/modules/config/tests/src/Functional/ConfigLanguageOverrideWebTest.php @@ -21,7 +21,7 @@ class ConfigLanguageOverrideWebTest extends BrowserTestBase { public static $modules = [ 'block', 'language', - 'system' + 'system', ]; /** diff --git a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php index 4170e250be2..69a7ed74ea2 100644 --- a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php +++ b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php @@ -177,7 +177,7 @@ EOD; // object. $this->assertRaw(t('Are you sure you want to update the %name @type?', [ '%name' => 'second', - '@type' => 'test configuration' + '@type' => 'test configuration', ])); $this->drupalPostForm(NULL, [], t('Confirm')); $entity = $storage->load('second'); diff --git a/core/modules/config_translation/src/ConfigEntityMapper.php b/core/modules/config_translation/src/ConfigEntityMapper.php index 2ae30959332..ab226a8754d 100644 --- a/core/modules/config_translation/src/ConfigEntityMapper.php +++ b/core/modules/config_translation/src/ConfigEntityMapper.php @@ -263,7 +263,7 @@ class ConfigEntityMapper extends ConfigNamesMapper { $parameters += [ $this->entityType => [ 'type' => 'entity:' . $this->entityType, - ] + ], ]; $route->setOption('parameters', $parameters); } diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php index 95af49eea92..7cbeb57746a 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationDateFormatUiTest.php @@ -15,7 +15,7 @@ class ConfigTranslationDateFormatUiTest extends BrowserTestBase { public static $modules = [ 'language', 'config_translation', - 'system' + 'system', ]; protected function setUp() { diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php index 20ee969b8e1..1d0116dc999 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php @@ -189,7 +189,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { $block_content_type = BlockContentType::create([ 'id' => mb_strtolower($this->randomMachineName(16)), 'label' => $this->randomMachineName(), - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); @@ -395,7 +395,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { $block_content_type = BlockContentType::create([ 'id' => 'basic', 'label' => 'Basic', - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); $field = FieldConfig::create([ diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php index 84faaec66bb..64fde483e00 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php @@ -907,7 +907,7 @@ class ConfigTranslationUiTest extends BrowserTestBase { $expected = [ 'kitten', 'llama', - 'elephant' + 'elephant', ]; $actual = $config_factory ->getEditable('config_translation_test.content') diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php index b783accf976..c13a1b73f23 100644 --- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/I18nProfileFieldTest.php @@ -42,8 +42,8 @@ class I18nProfileFieldTest extends MigrateSqlSourceTestBase { 'lid' => 11, 'objectid' => 'profile_love_migrations', 'type' => 'field', - 'property' => 'explanation' - ] + 'property' => 'explanation', + ], ], 'locales_target' => [ [ diff --git a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php index 02cdd9909c3..3eb5880ed7c 100644 --- a/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php +++ b/core/modules/config_translation/tests/src/Kernel/Plugin/migrate/source/d6/ProfileFieldTranslationTest.php @@ -41,8 +41,8 @@ class ProfileFieldTranslationTest extends MigrateSqlSourceTestBase { 'lid' => 11, 'objectid' => 'profile_love_migrations', 'type' => 'field', - 'property' => 'explanation' - ] + 'property' => 'explanation', + ], ], 'locales_target' => [ [ diff --git a/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php b/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php index e72c61f6dc1..4315f81b2d1 100644 --- a/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php +++ b/core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php @@ -118,7 +118,7 @@ class ConfigMapperManagerTest extends UnitTestCase { $this->getElement(['iii' => 'jjj']), ]), ]), - FALSE + FALSE, ], [ $this->getNestedElement([ diff --git a/core/modules/contact/tests/drupal-7.contact.database.php b/core/modules/contact/tests/drupal-7.contact.database.php index bd36384d7ea..e63ee29d169 100644 --- a/core/modules/contact/tests/drupal-7.contact.database.php +++ b/core/modules/contact/tests/drupal-7.contact.database.php @@ -21,7 +21,7 @@ db_insert('contact')->fields([ 'recipients', 'reply', 'weight', - 'selected' + 'selected', ]) ->values([ 'category' => 'Upgrade test', diff --git a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php index 747b8e62e01..2a406eb8de3 100644 --- a/core/modules/contact/tests/src/Functional/ContactPersonalTest.php +++ b/core/modules/contact/tests/src/Functional/ContactPersonalTest.php @@ -98,7 +98,7 @@ class ContactPersonalTest extends BrowserTestBase { $placeholders = [ '@sender_name' => $this->webUser->username, '@sender_email' => $this->webUser->getEmail(), - '@recipient_name' => $this->contactUser->getUsername() + '@recipient_name' => $this->contactUser->getUsername(), ]; $this->assertRaw(new FormattableMarkup('@sender_name (@sender_email) sent @recipient_name an email.', $placeholders)); // Ensure an unescaped version of the email does not exist anywhere. diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php index b42b9606462..2c881b01806 100644 --- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php +++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php @@ -100,7 +100,7 @@ class ContactSitewideTest extends BrowserTestBase { // field_ui enabled admin/structure/contact/manage/personal/fields exists. // @todo: See https://www.drupal.org/node/2031223 for the above. $edit_link = $this->xpath('//a[@href=:href]', [ - ':href' => \Drupal::url('entity.contact_form.edit_form', ['contact_form' => 'personal']) + ':href' => \Drupal::url('entity.contact_form.edit_form', ['contact_form' => 'personal']), ]); $this->assertTrue(empty($edit_link), format_string('No link containing href %href found.', ['%href' => 'admin/structure/contact/manage/personal'] @@ -405,7 +405,7 @@ class ContactSitewideTest extends BrowserTestBase { 'administer contact forms', 'administer permissions', 'administer users', - 'access site reports' + 'access site reports', ]); $this->drupalLogin($admin_user); diff --git a/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php b/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php index c66b5ad5d4c..fd9b1ce8db8 100644 --- a/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php +++ b/core/modules/contact/tests/src/Functional/Views/ContactFieldsTest.php @@ -34,7 +34,7 @@ class ContactFieldsTest extends ViewTestBase { $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => strtolower($this->randomMachineName()), 'entity_type' => 'contact_message', - 'type' => 'text' + 'type' => 'text', ]); $this->fieldStorage->save(); diff --git a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php index 72ea7f26949..6d6afa36d3e 100644 --- a/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php +++ b/core/modules/contact/tests/src/Kernel/Plugin/migrate/source/d6/ContactSettingsTest.php @@ -37,7 +37,7 @@ class ContactSettingsTest extends MigrateSqlSourceTestBase { 'reply' => '', 'weight' => '0', 'selected' => '1', - ] + ], ]; $tests[0]['expected_data'] = [ [ diff --git a/core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php b/core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php index 6006c9abcbb..274b9f8e378 100644 --- a/core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php +++ b/core/modules/content_moderation/src/Form/ContentModerationConfigureForm.php @@ -68,7 +68,7 @@ class ContentModerationConfigureForm extends WorkflowTypeConfigureFormBase imple $header = [ 'type' => $this->t('Items'), - 'operations' => $this->t('Operations') + 'operations' => $this->t('Operations'), ]; $form['entity_types_container'] = [ '#type' => 'details', @@ -108,7 +108,7 @@ class ContentModerationConfigureForm extends WorkflowTypeConfigureFormBase imple 'label' => $this->t('@bundle types', ['@bundle' => $entity_type->getLabel()]), 'entity_type_id' => $entity_type->id(), 'selected_bundles' => $selected_bundles_list, - ] + ], ], 'operations' => [ '#type' => 'operations', diff --git a/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php b/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php index 4b879737dae..65fc2a0c509 100644 --- a/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php +++ b/core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php @@ -98,7 +98,7 @@ class ModerationStateConstraintValidator extends ConstraintValidator implements if (!$original_state->canTransitionTo($new_state->id())) { $this->context->addViolation($constraint->message, [ '%from' => $original_state->label(), - '%to' => $new_state->label() + '%to' => $new_state->label(), ]); } } diff --git a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php index 76d25f2c85f..6b2af349779 100644 --- a/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ModerationFormTest.php @@ -473,7 +473,7 @@ class ModerationFormTest extends ModerationStateTestBase { 'edit own moderated_content content', 'use editorial transition create_new_draft', 'use editorial transition publish', - 'use editorial transition archive' + 'use editorial transition archive', ]); $this->drupalLogin($user); $paths = [ diff --git a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php index e5b296d7f45..175554f8990 100644 --- a/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php +++ b/core/modules/content_moderation/tests/src/Functional/ViewsModerationStateFilterTest.php @@ -201,11 +201,11 @@ class ViewsModerationStateFilterTest extends ViewTestBase { return [ 'view on base table, filter on base table' => [ 'test_content_moderation_state_filter_base_table', - 'Content: Moderation state' + 'Content: Moderation state', ], 'view on base table, filter on revision table' => [ 'test_content_moderation_state_filter_base_table_filter_on_revision', - 'Content revision: Moderation state' + 'Content revision: Moderation state', ], ]; } diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php index f17e4ac83c6..b2abed2b01d 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php @@ -89,7 +89,7 @@ class ContentModerationPermissionsTest extends KernelTestBase { ], ], ], - [] + [], ], ]; } diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php index ef63472146a..279d4b4e6f7 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php @@ -520,7 +520,7 @@ class ContentModerationStateTest extends KernelTestBase { $this->assertEquals([ 'entity_test_no_bundle', 'entity_test_rev', - 'node' + 'node', ], $workflow->getTypePlugin()->getEntityTypes()); // Delete the node type and ensure it is removed from the workflow. diff --git a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php index e043656deac..d59bfca0362 100644 --- a/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php +++ b/core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php @@ -78,7 +78,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { ], 'Entity parameter on an entity form' => [ [ - '_entity_form' => 'entity_test_rev.edit' + '_entity_form' => 'entity_test_rev.edit', ], [ 'entity_test_rev' => [ @@ -94,7 +94,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { ], 'Entity form with no operation' => [ [ - '_entity_form' => 'entity_test_rev' + '_entity_form' => 'entity_test_rev', ], [ 'entity_test_rev' => [ @@ -110,7 +110,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { ], 'Non-moderated entity form' => [ [ - '_entity_form' => 'entity_test_mulrev' + '_entity_form' => 'entity_test_mulrev', ], [ 'entity_test_mulrev' => [ @@ -120,7 +120,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { ], 'Multiple entity parameters on an entity form' => [ [ - '_entity_form' => 'entity_test_rev.edit' + '_entity_form' => 'entity_test_rev.edit', ], [ 'entity_test_rev' => [ @@ -142,7 +142,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { ], 'Overridden load_latest_revision flag does not change' => [ [ - '_entity_form' => 'entity_test_rev.edit' + '_entity_form' => 'entity_test_rev.edit', ], [ 'entity_test_rev' => [ @@ -153,7 +153,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { ], 'Non-revisionable entity type will not change' => [ [ - '_entity_form' => 'entity_test.edit' + '_entity_form' => 'entity_test.edit', ], [ 'entity_test' => [ @@ -165,7 +165,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase { ], 'Overridden load_latest_revision flag does not change with multiple parameters' => [ [ - '_entity_form' => 'entity_test_rev.edit' + '_entity_form' => 'entity_test_rev.edit', ], [ 'entity_test_rev' => [ diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc index 998359d9ddb..a75470211c5 100644 --- a/core/modules/content_translation/content_translation.admin.inc +++ b/core/modules/content_translation/content_translation.admin.inc @@ -65,7 +65,7 @@ function content_translation_field_sync_widget(FieldDefinitionInterface $field, // does not get lost. $element[key($options)]['#attached']['drupalSettings']['contentTranslationDependentOptions'] = [ 'dependent_selectors' => [ - $element_name => $require_all_groups_for_translation + $element_name => $require_all_groups_for_translation, ], ]; $element[key($options)]['#attached']['library'][] = 'content_translation/drupal.content_translation.admin'; diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install index 93a99682211..bc948e1a3ae 100644 --- a/core/modules/content_translation/content_translation.install +++ b/core/modules/content_translation/content_translation.install @@ -20,14 +20,14 @@ function content_translation_install() { // Translation works when at least two languages are added. if (count(\Drupal::languageManager()->getLanguages()) < 2) { $t_args = [ - ':language_url' => Url::fromRoute('entity.configurable_language.collection')->toString() + ':language_url' => Url::fromRoute('entity.configurable_language.collection')->toString(), ]; $message = t('This site has only a single language enabled. Add at least one more language in order to translate content.', $t_args); \Drupal::messenger()->addWarning($message); } // Point the user to the content translation settings. $t_args = [ - ':settings_url' => Url::fromRoute('language.content_settings_page')->toString() + ':settings_url' => Url::fromRoute('language.content_settings_page')->toString(), ]; $message = t('Enable translation for content types, taxonomy vocabularies, accounts, or any other element you wish to translate.', $t_args); \Drupal::messenger()->addWarning($message); diff --git a/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php b/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php index 8cb3a4ff4e8..ae833955dbe 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php @@ -112,7 +112,7 @@ abstract class ContentTranslationUITestBase extends ContentTranslationTestBase { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $this->drupalPostForm($add_url, $this->getEditValues($values, $langcode), $this->getFormSubmitActionForNewTranslation($entity, $langcode)); @@ -176,7 +176,7 @@ abstract class ContentTranslationUITestBase extends ContentTranslationTestBase { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); // This does not save anything, it merely reloads the form and fills in the // fields with the values from the different source language. @@ -190,7 +190,7 @@ abstract class ContentTranslationUITestBase extends ContentTranslationTestBase { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $source_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $this->drupalPostForm($add_url, $edit, $this->getFormSubmitActionForNewTranslation($entity, $langcode)); $storage->resetCache([$this->entityId]); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php index 6d42a1a0fa6..1bf836aaca8 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php @@ -140,7 +140,7 @@ class ContentTranslationLanguageChangeTest extends NodeTestBase { $this->assertRaw('Edit Article english_title | Drupal'); $edit = [ 'langcode[0][value]' => 'en', - 'field_image_field[0][alt]' => 'alternative_text' + 'field_image_field[0][alt]' => 'alternative_text', ]; $this->drupalPostForm(NULL, $edit, t('Save (this translation)')); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php index f15a8f9bc8d..52a92300078 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationSettingsTest.php @@ -154,7 +154,7 @@ class ContentTranslationSettingsTest extends BrowserTestBase { 'settings[node][article][settings][language][langcode]' => 'current_interface', 'settings[node][article][settings][language][language_alterable]' => TRUE, 'settings[node][article][translatable]' => TRUE, - 'settings[node][article][fields][title]' => TRUE + 'settings[node][article][fields][title]' => TRUE, ]; $this->assertSettings('node', NULL, TRUE, $edit); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php index 77c176e78e8..97d0b00f5da 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUISkipTest.php @@ -25,7 +25,7 @@ class ContentTranslationUISkipTest extends BrowserTestBase { $admin_user = $this->drupalCreateUser([ 'translate any entity', 'administer content translation', - 'administer languages' + 'administer languages', ]); $this->drupalLogin($admin_user); // Visit the content translation. diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php index bfa93dc8e23..7e7bf1f84b0 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUITestBase.php @@ -109,7 +109,7 @@ abstract class ContentTranslationUITestBase extends ContentTranslationTestBase { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $this->drupalPostForm($add_url, $this->getEditValues($values, $langcode), $this->getFormSubmitActionForNewTranslation($entity, $langcode)); @@ -173,7 +173,7 @@ abstract class ContentTranslationUITestBase extends ContentTranslationTestBase { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); // This does not save anything, it merely reloads the form and fills in the // fields with the values from the different source language. @@ -187,7 +187,7 @@ abstract class ContentTranslationUITestBase extends ContentTranslationTestBase { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $source_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $this->drupalPostForm($add_url, $edit, $this->getFormSubmitActionForNewTranslation($entity, $langcode)); $storage->resetCache([$this->entityId]); diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php index b44919aa4f1..ab70fef920a 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationUntranslatableFieldsTest.php @@ -59,7 +59,7 @@ class ContentTranslationUntranslatableFieldsTest extends ContentTranslationPendi $add_url = Url::fromRoute("entity.{$this->entityTypeId}.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => 'en', - 'target' => 'it' + 'target' => 'it', ]); $this->drupalGet($add_url); $this->assertNotEmpty($this->xpath($field_xpath)); diff --git a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php index b8776a26a1b..44e816089ec 100644 --- a/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php +++ b/core/modules/content_translation/tests/src/Kernel/ContentTranslationConfigImportTest.php @@ -74,7 +74,7 @@ class ContentTranslationConfigImportTest extends KernelTestBase { 'langcode' => 'en', 'status' => TRUE, 'dependencies' => [ - 'module' => ['content_translation'] + 'module' => ['content_translation'], ], 'id' => $config_id, 'target_entity_type_id' => 'entity_test_mul', diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index a814c391f11..b9d61b76d2e 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -86,7 +86,7 @@ function contextual_help($route_name, RouteMatchInterface $route_match) { $sample_picture = [ '#theme' => 'image', '#uri' => 'core/misc/icons/bebebe/pencil.svg', - '#alt' => t('contextual links button') + '#alt' => t('contextual links button'), ]; $sample_picture = \Drupal::service('renderer')->render($sample_picture); $output .= '

  • ' . t('Hovering over the area of interest will temporarily make the contextual links button visible (which looks like a pencil in most themes, and is normally displayed in the upper right corner of the area). The icon typically looks like this: @picture', ['@picture' => $sample_picture]) . '
  • '; diff --git a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php index de30f5c4247..338d5d704fc 100644 --- a/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php +++ b/core/modules/contextual/src/Plugin/views/field/ContextualLinks.php @@ -130,8 +130,8 @@ class ContextualLinks extends FieldPluginBase { [], [ 'contextual-views-field-links' => UrlHelper::encodePath(Json::encode($links)), - ] - ] + ], + ], ]; $element = [ diff --git a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php index f42bf20f80d..0e5f721375f 100644 --- a/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php +++ b/core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php @@ -65,7 +65,7 @@ class ContextualUnitTest extends KernelTestBase { 'links' => [ 'views_ui_edit' => [ 'route_parameters' => [ - 'view' => 'frontpage' + 'view' => 'frontpage', ], 'metadata' => [ 'location' => 'page', diff --git a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php index c0c66b7ca10..2af64d7bb9e 100644 --- a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php +++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php @@ -51,9 +51,9 @@ class DateTimeFieldItemList extends FieldItemList { '#states' => [ 'visible' => [ ':input[id="edit-default-value-input-default-date-type"]' => ['value' => static::DEFAULT_VALUE_CUSTOM], - ] - ] - ] + ], + ], + ], ]; return $element; @@ -112,7 +112,7 @@ class DateTimeFieldItemList extends FieldItemList { [ 'value' => $value, 'date' => $date, - ] + ], ]; } return $default_value; diff --git a/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php b/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php index 854352eb5bd..a89687ad151 100644 --- a/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php +++ b/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php @@ -49,7 +49,7 @@ abstract class DateTimeHandlerTestBase extends HandlerTestBase { // Add a date field to page nodes. $node_type = NodeType::create([ 'type' => 'page', - 'name' => 'page' + 'name' => 'page', ]); $node_type->save(); $fieldStorage = FieldStorageConfig::create([ diff --git a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php index 72ef1283198..89a7605df3b 100644 --- a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php +++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php @@ -189,7 +189,7 @@ class DateTimeFieldTest extends DateTestBase { ->setComponent($field_name, $this->displayOptions) ->save(); $expected = new FormattableMarkup($this->displayOptions['settings']['past_format'], [ - '@interval' => $this->dateFormatter->formatTimeDiffSince($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]) + '@interval' => $this->dateFormatter->formatTimeDiffSince($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]), ]); $output = $this->renderTestEntity($id); $this->assertContains((string) $expected, $output, new FormattableMarkup('Formatted date field using datetime_time_ago format displayed as %expected in %timezone.', [ @@ -213,7 +213,7 @@ class DateTimeFieldTest extends DateTestBase { ->setComponent($field_name, $this->displayOptions) ->save(); $expected = new FormattableMarkup($this->displayOptions['settings']['future_format'], [ - '@interval' => $this->dateFormatter->formatTimeDiffUntil($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]) + '@interval' => $this->dateFormatter->formatTimeDiffUntil($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]), ]); $output = $this->renderTestEntity($id); $this->assertContains((string) $expected, $output, new FormattableMarkup('Formatted date field using datetime_time_ago format displayed as %expected in %timezone.', [ @@ -341,7 +341,7 @@ class DateTimeFieldTest extends DateTestBase { ->setComponent($field_name, $this->displayOptions) ->save(); $expected = new FormattableMarkup($this->displayOptions['settings']['past_format'], [ - '@interval' => $this->dateFormatter->formatTimeDiffSince($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]) + '@interval' => $this->dateFormatter->formatTimeDiffSince($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]), ]); $output = $this->renderTestEntity($id); $this->assertContains((string) $expected, $output, new FormattableMarkup('Formatted date field using datetime_time_ago format displayed as %expected.', ['%expected' => $expected])); @@ -362,7 +362,7 @@ class DateTimeFieldTest extends DateTestBase { ->setComponent($field_name, $this->displayOptions) ->save(); $expected = new FormattableMarkup($this->displayOptions['settings']['future_format'], [ - '@interval' => $this->dateFormatter->formatTimeDiffUntil($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]) + '@interval' => $this->dateFormatter->formatTimeDiffUntil($timestamp, ['granularity' => $this->displayOptions['settings']['granularity']]), ]); $output = $this->renderTestEntity($id); $this->assertContains((string) $expected, $output, new FormattableMarkup('Formatted date field using datetime_time_ago format displayed as %expected.', ['%expected' => $expected])); diff --git a/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php index 8261b27793f..f9b8c5c8867 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/ArgumentDateTimeTest.php @@ -38,7 +38,7 @@ class ArgumentDateTimeTest extends DateTimeHandlerTestBase { 'type' => 'page', 'field_date' => [ 'value' => $date, - ] + ], ]); $node->save(); $this->nodes[] = $node; diff --git a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php index de236c9080c..59035516417 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php +++ b/core/modules/datetime/tests/src/Kernel/Views/DateTimeHandlerTestBase.php @@ -57,7 +57,7 @@ abstract class DateTimeHandlerTestBase extends ViewsKernelTestBase { // Add a date field to page nodes. $node_type = NodeType::create([ 'type' => 'page', - 'name' => 'page' + 'name' => 'page', ]); $node_type->save(); $fieldStorage = FieldStorageConfig::create([ diff --git a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php index 7cb0fa040ab..1e6369cd240 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/FilterDateTimeTest.php @@ -59,7 +59,7 @@ class FilterDateTimeTest extends DateTimeHandlerTestBase { 'type' => 'page', 'field_date' => [ 'value' => $date, - ] + ], ]); $node->save(); $this->nodes[] = $node; diff --git a/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php b/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php index 7375c4db29e..16e888abee1 100644 --- a/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php +++ b/core/modules/datetime/tests/src/Kernel/Views/SortDateTimeTest.php @@ -39,7 +39,7 @@ class SortDateTimeTest extends DateTimeHandlerTestBase { 'type' => 'page', 'field_date' => [ 'value' => $date, - ] + ], ]); $node->save(); $this->nodes[] = $node; diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module index 700ceeaa6bd..bc04ce8fe4e 100644 --- a/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module @@ -103,7 +103,7 @@ function dblog_form_system_logging_settings_alter(&$form, FormStateInterface $fo '#title' => t('Database log messages to keep'), '#default_value' => \Drupal::configFactory()->getEditable('dblog.settings')->get('row_limit'), '#options' => [0 => t('All')] + array_combine($row_limits, $row_limits), - '#description' => t('The maximum number of messages to keep in the database log. Requires a cron maintenance task.', [':cron' => \Drupal::url('system.status')]) + '#description' => t('The maximum number of messages to keep in the database log. Requires a cron maintenance task.', [':cron' => \Drupal::url('system.status')]), ]; $form['#submit'][] = 'dblog_logging_settings_submit'; diff --git a/core/modules/editor/src/Tests/EditorLoadingTest.php b/core/modules/editor/src/Tests/EditorLoadingTest.php index b8dd074d499..dca641ae0cd 100644 --- a/core/modules/editor/src/Tests/EditorLoadingTest.php +++ b/core/modules/editor/src/Tests/EditorLoadingTest.php @@ -118,7 +118,7 @@ class EditorLoadingTest extends WebTestBase { 'directory' => 'inline-images', 'max_size' => '', 'max_dimensions' => ['width' => '', 'height' => ''], - ] + ], ]); $editor->save(); @@ -202,7 +202,7 @@ class EditorLoadingTest extends WebTestBase { $this->drupalCreateNode([ 'type' => 'article', 'body' => [ - ['value' => $this->randomMachineName(32), 'format' => 'full_html'] + ['value' => $this->randomMachineName(32), 'format' => 'full_html'], ], ]); @@ -234,7 +234,7 @@ class EditorLoadingTest extends WebTestBase { 'directory' => 'inline-images', 'max_size' => '', 'max_dimensions' => ['width' => '', 'height' => ''], - ] + ], ]); $editor->save(); @@ -242,7 +242,7 @@ class EditorLoadingTest extends WebTestBase { $this->drupalCreateNode([ 'type' => 'page', 'field_text' => [ - ['value' => $this->randomMachineName(32), 'format' => 'full_html'] + ['value' => $this->randomMachineName(32), 'format' => 'full_html'], ], ]); diff --git a/core/modules/editor/src/Tests/EditorSecurityTest.php b/core/modules/editor/src/Tests/EditorSecurityTest.php index f3c2995b405..a5ea925af6e 100644 --- a/core/modules/editor/src/Tests/EditorSecurityTest.php +++ b/core/modules/editor/src/Tests/EditorSecurityTest.php @@ -93,7 +93,7 @@ class EditorSecurityTest extends WebTestBase { 'status' => 1, 'settings' => [ 'allowed_html' => '


    ', - ] + ], ], ], ]); @@ -108,7 +108,7 @@ class EditorSecurityTest extends WebTestBase { 'status' => 1, 'settings' => [ 'allowed_html' => '


    ', - ] + ], ], ], ]); @@ -128,7 +128,7 @@ class EditorSecurityTest extends WebTestBase { 'status' => 1, 'settings' => [ 'allowed_html' => '


    ', - ] + ], ], ], ]); @@ -209,9 +209,9 @@ class EditorSecurityTest extends WebTestBase { $this->drupalCreateNode([ 'type' => 'article', 'body' => [ - ['value' => self::$sampleContent, 'format' => $sample['format']] + ['value' => self::$sampleContent, 'format' => $sample['format']], ], - 'uid' => $sample['author'] + 'uid' => $sample['author'], ]); } } diff --git a/core/modules/editor/src/Tests/EditorUploadImageScaleTest.php b/core/modules/editor/src/Tests/EditorUploadImageScaleTest.php index 100fb4fdc54..a4a22339ded 100644 --- a/core/modules/editor/src/Tests/EditorUploadImageScaleTest.php +++ b/core/modules/editor/src/Tests/EditorUploadImageScaleTest.php @@ -51,9 +51,9 @@ class EditorUploadImageScaleTest extends WebTestBase { 'max_size' => '', 'max_dimensions' => [ 'width' => NULL, - 'height' => NULL + 'height' => NULL, ], - ] + ], ])->save(); // Create admin user. diff --git a/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php b/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php index a4515d56730..5496378eaa3 100644 --- a/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php +++ b/core/modules/editor/src/Tests/QuickEditIntegrationLoadingTest.php @@ -57,8 +57,8 @@ class QuickEditIntegrationLoadingTest extends WebTestBase { 0 => [ 'value' => '

    Do you also love Drupal?

    ', 'format' => 'filtered_html', - ] - ] + ], + ], ]); } @@ -73,7 +73,7 @@ class QuickEditIntegrationLoadingTest extends WebTestBase { $users = [ $this->drupalCreateUser(static::$basicPermissions), $this->drupalCreateUser(array_merge(static::$basicPermissions, ['edit any article content'])), - $this->drupalCreateUser(array_merge(static::$basicPermissions, ['access in-place editing'])) + $this->drupalCreateUser(array_merge(static::$basicPermissions, ['access in-place editing'])), ]; // Now test with each of the 3 users with insufficient permissions. diff --git a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php index 276f5592255..16c0773e7c9 100644 --- a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php +++ b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php @@ -221,7 +221,7 @@ class QuickEditIntegrationTest extends QuickEditTestBase { [ 'command' => 'editorGetUntransformedText', 'data' => 'Test', - ] + ], ]; $ajax_response_attachments_processor = \Drupal::service('ajax_response.attachments_processor'); diff --git a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php index 35820a093b6..40a43fbef20 100644 --- a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php +++ b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php @@ -583,20 +583,20 @@ xss:ex/*XSS*//*/*/pression(alert("XSS"))\'>', 'Pink Fairy Armadillo

    ', ], ], - ] + ], ]); $crazy_format->save(); @@ -183,10 +183,10 @@ class FilterAPITest extends EntityKernelTestBase { 'a' => ['href' => TRUE], 'em' => TRUE, ], - ] + ], ], ], - ] + ], ]); $very_restricted_html_format->save(); $this->assertIdentical( @@ -220,7 +220,7 @@ class FilterAPITest extends EntityKernelTestBase { 'allowed_html' => ' ', ], ], - ] + ], ]); $nonsensical_restricted_html->save(); $this->assertIdentical( @@ -416,7 +416,7 @@ class FilterAPITest extends EntityKernelTestBase { 'allowed_html' => '

    ', ], ], - ] + ], ]); $crazy_format->save(); // Use config to directly load the configuration and check that only enabled diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php index 1838cfea79f..b8626aedae4 100644 --- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php @@ -195,7 +195,7 @@ class FilterKernelTest extends KernelTestBase { 'allowed_html' => '', 'filter_html_help' => 1, 'filter_html_nofollow' => 0, - ] + ], ]); $test_with_html_filter = function ($input) use ($filter, $html_filter, $renderer) { return $renderer->executeInRenderContext(new RenderContext(), function () use ($input, $filter, $html_filter) { @@ -410,7 +410,7 @@ class FilterKernelTest extends KernelTestBase { 'allowed_html' => '


      1. ', 'filter_html_help' => 1, 'filter_html_nofollow' => 0, - ] + ], ]); // HTML filter is not able to secure some tags, these should never be @@ -465,7 +465,7 @@ class FilterKernelTest extends KernelTestBase { 'allowed_html' => '

          1. ', 'filter_html_help' => 1, 'filter_html_nofollow' => 0, - ] + ], ]); $f = (string) $filter->process('
            link', Language::LANGCODE_NOT_SPECIFIED); $this->assertNormalized($f, 'link', 'HTML filter keeps explicitly allowed attributes, and removes attributes that are not explicitly allowed.'); @@ -477,7 +477,7 @@ class FilterKernelTest extends KernelTestBase { 'allowed_html' => '

              1. ', 'filter_html_help' => 1, 'filter_html_nofollow' => 0, - ] + ], ]); $f = (string) $filter->process('
                link', Language::LANGCODE_NOT_SPECIFIED); $this->assertIdentical($f, 'link', 'HTML filter removes allowed attributes that do not have an explicitly allowed value.'); @@ -500,7 +500,7 @@ class FilterKernelTest extends KernelTestBase { 'allowed_html' => '', 'filter_html_help' => 1, 'filter_html_nofollow' => 1, - ] + ], ]); // Test if the rel="nofollow" attribute is added, even if we try to prevent @@ -548,7 +548,7 @@ class FilterKernelTest extends KernelTestBase { $filter->setConfiguration([ 'settings' => [ 'filter_url_length' => 496, - ] + ], ]); // @todo Possible categories: @@ -841,7 +841,7 @@ www.example.com with a newline in comments --> $filter->setConfiguration([ 'settings' => [ 'filter_url_length' => 20, - ] + ], ]); $tests = [ 'www.trimmed.com/d/ff.ext?a=1&b=2#a1' => [ @@ -923,7 +923,7 @@ www.example.com with a newline in comments --> $filter->setConfiguration([ 'settings' => [ 'filter_url_length' => 496, - ] + ], ]); $path = __DIR__ . '/../..'; diff --git a/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php b/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php index 85de742eb64..65a8357942c 100644 --- a/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php +++ b/core/modules/filter/tests/src/Unit/FilterUninstallValidatorTest.php @@ -157,7 +157,7 @@ class FilterUninstallValidatorTest extends UnitTestCase { ]); $expected = [ - 'Provides a filter plugin that is in use in the following filter formats: Filter Format 1 Label, Filter Format 2 Label' + 'Provides a filter plugin that is in use in the following filter formats: Filter Format 1 Label, Filter Format 2 Label', ]; $reasons = $this->filterUninstallValidator->validate($this->randomMachineName()); $this->assertSame($expected, $this->castSafeStrings($reasons)); diff --git a/core/modules/forum/forum.views.inc b/core/modules/forum/forum.views.inc index 156596234bf..1058153067c 100644 --- a/core/modules/forum/forum.views.inc +++ b/core/modules/forum/forum.views.inc @@ -93,7 +93,7 @@ function forum_views_data() { 'id' => 'date', ], 'sort' => [ - 'id' => 'date' + 'id' => 'date', ], 'filter' => [ 'id' => 'date', diff --git a/core/modules/forum/src/Form/Overview.php b/core/modules/forum/src/Form/Overview.php index efc92664181..27335d61d9e 100644 --- a/core/modules/forum/src/Form/Overview.php +++ b/core/modules/forum/src/Form/Overview.php @@ -94,7 +94,7 @@ class Overview extends OverviewTerms { // Use the existing taxonomy overview submit handler. $form['terms']['#empty'] = $this->t('No containers or forums available. Add container or Add forum.', [ ':container' => $this->url('forum.add_container'), - ':forum' => $this->url('forum.add_forum') + ':forum' => $this->url('forum.add_forum'), ]); return $form; } diff --git a/core/modules/forum/src/ForumManager.php b/core/modules/forum/src/ForumManager.php index 05cd8607607..1ecd3b68fa3 100644 --- a/core/modules/forum/src/ForumManager.php +++ b/core/modules/forum/src/ForumManager.php @@ -184,7 +184,7 @@ class ForumManager implements ForumManagerInterface { 'cid', 'last_comment_uid', 'last_comment_timestamp', - 'comment_count' + 'comment_count', ]); $query->join('forum_index', 'f', 'f.nid = n.nid'); @@ -435,7 +435,7 @@ class ForumManager implements ForumManagerInterface { 'container' => 1, 'parents' => [], 'isIndex' => TRUE, - 'vid' => $vid + 'vid' => $vid, ]); // Load the tree below. diff --git a/core/modules/forum/src/ForumSettingsForm.php b/core/modules/forum/src/ForumSettingsForm.php index f017f21b396..87a13bef7b5 100644 --- a/core/modules/forum/src/ForumSettingsForm.php +++ b/core/modules/forum/src/ForumSettingsForm.php @@ -52,7 +52,7 @@ class ForumSettingsForm extends ConfigFormBase { 1 => $this->t('Date - newest first'), 2 => $this->t('Date - oldest first'), 3 => $this->t('Posts - most active first'), - 4 => $this->t('Posts - least active first') + 4 => $this->t('Posts - least active first'), ]; $form['forum_order'] = [ '#type' => 'radios', diff --git a/core/modules/forum/src/ForumUninstallValidator.php b/core/modules/forum/src/ForumUninstallValidator.php index 8ee0310fe90..24ae880264a 100644 --- a/core/modules/forum/src/ForumUninstallValidator.php +++ b/core/modules/forum/src/ForumUninstallValidator.php @@ -67,7 +67,7 @@ class ForumUninstallValidator implements ModuleUninstallValidatorInterface { } else { $reasons[] = $this->t('To uninstall Forum, first delete all %vocabulary terms', [ - '%vocabulary' => $vocabulary->label() + '%vocabulary' => $vocabulary->label(), ]); } } diff --git a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php index 4114db5efc1..992500e1f9d 100644 --- a/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php +++ b/core/modules/forum/tests/src/Functional/Views/ForumIntegrationTest.php @@ -71,17 +71,17 @@ class ForumIntegrationTest extends ViewTestBase { $expected_result[] = [ 'nid' => $nodes[0]->id(), 'sticky' => NodeInterface::STICKY, - 'comment_count' => 1. + 'comment_count' => 1., ]; $expected_result[] = [ 'nid' => $nodes[1]->id(), 'sticky' => NodeInterface::NOT_STICKY, - 'comment_count' => 2. + 'comment_count' => 2., ]; $expected_result[] = [ 'nid' => $nodes[2]->id(), 'sticky' => NodeInterface::NOT_STICKY, - 'comment_count' => 3. + 'comment_count' => 3., ]; $column_map = [ 'nid' => 'nid', diff --git a/core/modules/hal/tests/fixtures/update/drupal-8.rest-hal_update_8301.php b/core/modules/hal/tests/fixtures/update/drupal-8.rest-hal_update_8301.php index 842e52afd66df0e62f70a8de1a4284910674e235..cccd707bb83941f397d2c68ceac0c740a0921bc1 100644 GIT binary patch delta 30 kcmbQOHb-p(o3NM;mx4m9CXmpzORY#vE-gvb(6r_P0CzbDod5s; delta 29 jcmbQEHd}22o3JRCfESElJhTwB`Z;aQX*u diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php index 1939e04364b..53c2dd71ac9 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonTestBase.php @@ -90,7 +90,7 @@ abstract class CommentHalJsonTestBase extends CommentResourceTestBase { ], ], 'uuid' => [ - ['value' => $commented_entity->uuid()] + ['value' => $commented_entity->uuid()], ], ], ], @@ -105,7 +105,7 @@ abstract class CommentHalJsonTestBase extends CommentResourceTestBase { ], ], 'uuid' => [ - ['value' => $author->uuid()] + ['value' => $author->uuid()], ], 'lang' => 'en', ], diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php index eff0b97e8c2..7d9c28227de 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityTest/EntityTestHalJsonAnonTest.php @@ -68,7 +68,7 @@ class EntityTestHalJsonAnonTest extends EntityTestResourceTestBase { ], ], 'uuid' => [ - ['value' => $author->uuid()] + ['value' => $author->uuid()], ], 'lang' => 'en', ], diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php index 43181323e32..76f1d6fe9ef 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/Feed/FeedHalJsonTestBase.php @@ -35,10 +35,10 @@ abstract class FeedHalJsonTestBase extends FeedResourceTestBase { return $normalization + [ '_links' => [ 'self' => [ - 'href' => $this->baseUrl . '/aggregator/sources/1?_format=hal_json' + 'href' => $this->baseUrl . '/aggregator/sources/1?_format=hal_json', ], 'type' => [ - 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed' + 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed', ], ], ]; @@ -51,7 +51,7 @@ abstract class FeedHalJsonTestBase extends FeedResourceTestBase { return parent::getNormalizedPostEntity() + [ '_links' => [ 'type' => [ - 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed' + 'href' => $this->baseUrl . '/rest/type/aggregator_feed/aggregator_feed', ], ], ]; diff --git a/core/modules/hal/tests/src/Functional/EntityResource/File/FileUploadHalJsonTestBase.php b/core/modules/hal/tests/src/Functional/EntityResource/File/FileUploadHalJsonTestBase.php index 58df16bcf28..7694ea6cbf6 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/File/FileUploadHalJsonTestBase.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/File/FileUploadHalJsonTestBase.php @@ -54,7 +54,7 @@ abstract class FileUploadHalJsonTestBase extends FileUploadResourceTestBase { 'href' => $this->baseUrl . '/rest/type/file/file', ], $this->baseUrl . '/rest/relation/file/file/uid' => [ - ['href' => $this->baseUrl . '/user/' . $this->account->id() . '?_format=hal_json'] + ['href' => $this->baseUrl . '/user/' . $this->account->id() . '?_format=hal_json'], ], ], '_embedded' => [ diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php index c5ca04a7bd4..99445b719e0 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/Media/MediaHalJsonAnonTest.php @@ -180,7 +180,7 @@ class MediaHalJsonAnonTest extends MediaResourceTestBase { 'href' => $this->baseUrl . '/rest/type/file/file', ], $this->baseUrl . '/rest/relation/file/file/uid' => [ - ['href' => $this->baseUrl . '/user/' . $owner->id() . '?_format=hal_json'] + ['href' => $this->baseUrl . '/user/' . $owner->id() . '?_format=hal_json'], ], ], '_embedded' => [ diff --git a/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php index e218a73a420..9f73c26c781 100644 --- a/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php +++ b/core/modules/hal/tests/src/Functional/EntityResource/Node/NodeHalJsonAnonTest.php @@ -84,7 +84,7 @@ class NodeHalJsonAnonTest extends NodeResourceTestBase { ], ], 'uuid' => [ - ['value' => $author->uuid()] + ['value' => $author->uuid()], ], ], ], @@ -99,7 +99,7 @@ class NodeHalJsonAnonTest extends NodeResourceTestBase { ], ], 'uuid' => [ - ['value' => $author->uuid()] + ['value' => $author->uuid()], ], 'lang' => 'en', ], diff --git a/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php b/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php index 3e27ef637bb..2ebff202470 100644 --- a/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php +++ b/core/modules/hal/tests/src/Kernel/EntityTranslationNormalizeTest.php @@ -51,7 +51,7 @@ class EntityTranslationNormalizeTest extends NormalizerTestBase { 'sticky' => 0, 'body' => [ 'value' => $this->randomMachineName(), - 'format' => $this->randomMachineName() + 'format' => $this->randomMachineName(), ], 'revision_log' => $this->randomString(), ]); @@ -59,7 +59,7 @@ class EntityTranslationNormalizeTest extends NormalizerTestBase { 'title' => 'German title', 'body' => [ 'value' => $this->randomMachineName(), - 'format' => $this->randomMachineName() + 'format' => $this->randomMachineName(), ], ]); $node->save(); diff --git a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php index 50f887d1f85..05a6b39f1ee 100644 --- a/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php +++ b/core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php @@ -72,10 +72,10 @@ class HalLinkManagerTest extends KernelTestBase { public function providerTestGetTypeUri() { $serialization_context_collecting_cacheability = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata() + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata(), ]; $expected_serialization_context_cacheability_url_site = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => (new CacheableMetadata())->setCacheContexts(['url.site']) + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => (new CacheableMetadata())->setCacheContexts(['url.site']), ]; $base_test_case = [ @@ -166,10 +166,10 @@ class HalLinkManagerTest extends KernelTestBase { public function providerTestGetRelationUri() { $serialization_context_collecting_cacheability = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata() + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata(), ]; $expected_serialization_context_cacheability_url_site = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => (new CacheableMetadata())->setCacheContexts(['url.site']) + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => (new CacheableMetadata())->setCacheContexts(['url.site']), ]; $field_name = $this->randomMachineName(); @@ -252,7 +252,7 @@ class HalLinkManagerTest extends KernelTestBase { 'entity_type_id' => 'node', 'entity_type' => \Drupal::entityTypeManager()->getDefinition('node'), 'bundle' => 'page', - 'field_name' => 'field_ref' + 'field_name' => 'field_ref', ], $internal_ids); } @@ -261,7 +261,7 @@ class HalLinkManagerTest extends KernelTestBase { */ public function testHalLinkManagersSetLinkDomain() { $serialization_context = [ - CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata() + CacheableNormalizerInterface::SERIALIZATION_CONTEXT_CACHEABILITY => new CacheableMetadata(), ]; /* @var \Drupal\rest\LinkManager\LinkManager $link_manager */ diff --git a/core/modules/hal/tests/src/Kernel/NormalizeTest.php b/core/modules/hal/tests/src/Kernel/NormalizeTest.php index ffea170ba20..6c93f23607a 100644 --- a/core/modules/hal/tests/src/Kernel/NormalizeTest.php +++ b/core/modules/hal/tests/src/Kernel/NormalizeTest.php @@ -70,7 +70,7 @@ class NormalizeTest extends NormalizerTestBase { 'name' => $this->randomMachineName(), 'field_test_entity_reference' => [ 'target_id' => $target_entity_en->id(), - ] + ], ]; $entity = EntityTest::create($values); diff --git a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php index a00d9e27f0c..77714d23883 100644 --- a/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php +++ b/core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php @@ -115,7 +115,7 @@ class ImageFormatter extends ImageFormatterBase implements ContainerFactoryPlugi '#empty_option' => t('None (original image)'), '#options' => $image_styles, '#description' => $description_link->toRenderable() + [ - '#access' => $this->currentUser->hasPermission('administer image styles') + '#access' => $this->currentUser->hasPermission('administer image styles'), ], ]; $link_types = [ diff --git a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php index a06e0d7eec6..66899fb8257 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php @@ -374,7 +374,7 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase { 'settings' => [ 'default_image' => [ 'uuid' => 100000, - ] + ], ], ]); $field_storage->save(); @@ -389,7 +389,7 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase { 'settings' => [ 'default_image' => [ 'uuid' => 100000, - ] + ], ], ]); $field->save(); diff --git a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php index c69a7136f12..aa9441e0454 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php @@ -81,27 +81,27 @@ class ImageFieldValidateTest extends ImageFieldTestBase { ]; $min_resolution = [ 'width' => 50, - 'height' => 50 + 'height' => 50, ]; $max_resolution = [ 'width' => 100, - 'height' => 100 + 'height' => 100, ]; $no_height_min_resolution = [ 'width' => 50, - 'height' => NULL + 'height' => NULL, ]; $no_height_max_resolution = [ 'width' => 100, - 'height' => NULL + 'height' => NULL, ]; $no_width_min_resolution = [ 'width' => NULL, - 'height' => 50 + 'height' => 50, ]; $no_width_max_resolution = [ 'width' => NULL, - 'height' => 100 + 'height' => 100, ]; $field_settings = [ 0 => $this->getFieldSettings($min_resolution, $max_resolution), diff --git a/core/modules/image/tests/src/Kernel/ImageImportTest.php b/core/modules/image/tests/src/Kernel/ImageImportTest.php index 14eeaa3f2b0..9cf69570b68 100644 --- a/core/modules/image/tests/src/Kernel/ImageImportTest.php +++ b/core/modules/image/tests/src/Kernel/ImageImportTest.php @@ -22,7 +22,7 @@ class ImageImportTest extends KernelTestBase { */ public function testImport() { $style = ImageStyle::create([ - 'name' => 'test' + 'name' => 'test', ]); $style->addImageEffect(['id' => 'image_module_test_null']); diff --git a/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php index 7abe47e47a7..0e6e3f2815b 100644 --- a/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php +++ b/core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php @@ -127,7 +127,7 @@ class ImageThemeFunctionTest extends KernelTestBase { ':fragment' => '#' . $fragment, ':url' => $url, ':width' => $image->getWidth(), - ':height' => $image->getHeight() + ':height' => $image->getHeight(), ]); $this->assertEqual(count($elements), 1, 'theme_image_formatter() correctly renders a link fragment.'); } diff --git a/core/modules/language/src/Form/LanguageFormBase.php b/core/modules/language/src/Form/LanguageFormBase.php index 8c8f5fac699..d30c4b69228 100644 --- a/core/modules/language/src/Form/LanguageFormBase.php +++ b/core/modules/language/src/Form/LanguageFormBase.php @@ -50,11 +50,11 @@ abstract class LanguageFormBase extends EntityForm { $form['langcode_view'] = [ '#type' => 'item', '#title' => $this->t('Language code'), - '#markup' => $language->id() + '#markup' => $language->id(), ]; $form['langcode'] = [ '#type' => 'value', - '#value' => $language->id() + '#value' => $language->id(), ]; } else { diff --git a/core/modules/language/src/Form/NegotiationConfigureForm.php b/core/modules/language/src/Form/NegotiationConfigureForm.php index 21c08c92b19..0b22bc70a49 100644 --- a/core/modules/language/src/Form/NegotiationConfigureForm.php +++ b/core/modules/language/src/Form/NegotiationConfigureForm.php @@ -235,7 +235,7 @@ class NegotiationConfigureForm extends ConfigFormBase { '#attributes' => ['class' => ['language-customization-checkbox']], '#attached' => [ 'library' => [ - 'language/drupal.language.admin' + 'language/drupal.language.admin', ], ], ]; diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php index 87ad05bfd14..0f3dd1f0baa 100644 --- a/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php +++ b/core/modules/language/tests/src/Functional/LanguageConfigurationElementTest.php @@ -170,7 +170,7 @@ class LanguageConfigurationElementTest extends BrowserTestBase { $this->assertTrue($configuration->isLanguageAlterable(), 'The alterable language configuration has been saved on the Article content type.'); // Update the article content type by changing the title label. $edit = [ - 'title_label' => 'Name' + 'title_label' => 'Name', ]; $this->drupalPostForm('admin/structure/types/manage/article', $edit, t('Save content type')); // Check that we still have the settings for the updated node type. @@ -189,7 +189,7 @@ class LanguageConfigurationElementTest extends BrowserTestBase { if ($this->profile != 'standard') { $this->drupalCreateContentType([ 'type' => 'article', - 'name' => 'Article' + 'name' => 'Article', ]); } $admin_user = $this->drupalCreateUser(['administer content types']); @@ -240,7 +240,7 @@ class LanguageConfigurationElementTest extends BrowserTestBase { $this->assertTrue($configuration->isLanguageAlterable(), 'The alterable language configuration has been saved on the Country vocabulary.'); // Update the vocabulary. $edit = [ - 'name' => 'Nation' + 'name' => 'Nation', ]; $this->drupalPostForm('admin/structure/taxonomy/manage/country', $edit, t('Save')); // Check that we still have the settings for the updated vocabulary. diff --git a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php index 27785c09529..3ac94062523 100644 --- a/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php +++ b/core/modules/language/tests/src/Functional/LanguageNegotiationContentEntityTest.php @@ -90,7 +90,7 @@ class LanguageNegotiationContentEntityTest extends BrowserTestBase { $config->set('configurable', [LanguageInterface::TYPE_INTERFACE, LanguageInterface::TYPE_CONTENT]); $config->set('negotiation.language_content.enabled', [ LanguageNegotiationUrl::METHOD_ID => 0, - LanguageNegotiationContentEntity::METHOD_ID => 1 + LanguageNegotiationContentEntity::METHOD_ID => 1, ]); $config->save(); @@ -105,7 +105,7 @@ class LanguageNegotiationContentEntityTest extends BrowserTestBase { // language-url. $config->set('negotiation.language_content.enabled', [ LanguageNegotiationContentEntity::METHOD_ID => 0, - LanguageNegotiationUrl::METHOD_ID => 1 + LanguageNegotiationUrl::METHOD_ID => 1, ]); $config->save(); diff --git a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php index 7021aa0027f..07eec52514d 100644 --- a/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php +++ b/core/modules/language/tests/src/Functional/LanguageUrlRewritingTest.php @@ -108,7 +108,7 @@ class LanguageUrlRewritingTest extends BrowserTestBase { $edit = [ 'language_negotiation_url_part' => LanguageNegotiationUrl::CONFIG_DOMAIN, 'domain[en]' => $base_url_host, - 'domain[fr]' => $language_domain + 'domain[fr]' => $language_domain, ]; $this->drupalPostForm('admin/config/regional/language/detection/url', $edit, t('Save configuration')); // Rebuild the container so that the new language gets picked up by services diff --git a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php index fb62f48158d..8154e42a46a 100644 --- a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php +++ b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php @@ -74,7 +74,7 @@ class EntityUrlLanguageTest extends LanguageTestBase { $config->set('configurable', [LanguageInterface::TYPE_INTERFACE, LanguageInterface::TYPE_CONTENT]); $config->set('negotiation.language_content.enabled', [ LanguageNegotiationContentEntity::METHOD_ID => 0, - LanguageNegotiationUrl::METHOD_ID => 1 + LanguageNegotiationUrl::METHOD_ID => 1, ]); $config->save(); @@ -98,7 +98,7 @@ class EntityUrlLanguageTest extends LanguageTestBase { // where the language-content-entity is turned off. $config->set('negotiation.language_content.enabled', [ LanguageNegotiationUrl::METHOD_ID => 0, - LanguageNegotiationContentEntity::METHOD_ID => 1 + LanguageNegotiationContentEntity::METHOD_ID => 1, ]); $config->save(); diff --git a/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php b/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php index c94d623e939..004207281cd 100644 --- a/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php +++ b/core/modules/language/tests/src/Kernel/Views/FilterLanguageTest.php @@ -48,7 +48,7 @@ class FilterLanguageTest extends LanguageTestBase { 'en', 'xx-lolspeak', 'und', - 'zxx' + 'zxx', ]; $this->assertIdentical(array_keys($view->filter['langcode']->getValueOptions()), $expected); diff --git a/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php index 5d772a98cee..8fa765e0b6c 100644 --- a/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php +++ b/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php @@ -32,7 +32,7 @@ class LinkItem extends FieldItemBase implements LinkItemInterface { public static function defaultFieldSettings() { return [ 'title' => DRUPAL_OPTIONAL, - 'link_type' => LinkItemInterface::LINK_GENERIC + 'link_type' => LinkItemInterface::LINK_GENERIC, ] + parent::defaultFieldSettings(); } diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php index 7570fe92414..3a124138f84 100644 --- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php @@ -252,7 +252,7 @@ class LinkWidget extends WidgetBase { } $element['title']['#states']['required'] = [ - ':input[name="' . $selector . '[' . $delta . '][uri]"]' => ['filled' => TRUE] + ':input[name="' . $selector . '[' . $delta . '][uri]"]' => ['filled' => TRUE], ]; } } diff --git a/core/modules/link/src/Tests/Views/LinkViewsTokensTest.php b/core/modules/link/src/Tests/Views/LinkViewsTokensTest.php index 968c02f8306..f3ff80a1bc0 100644 --- a/core/modules/link/src/Tests/Views/LinkViewsTokensTest.php +++ b/core/modules/link/src/Tests/Views/LinkViewsTokensTest.php @@ -45,7 +45,7 @@ class LinkViewsTokensTest extends ViewTestBase { // Create Basic page node type. $this->drupalCreateContentType([ 'type' => 'page', - 'name' => 'Basic page' + 'name' => 'Basic page', ]); // Create a field. diff --git a/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc index c9cfdd5cb03..284b7fc6969 100644 --- a/core/modules/locale/locale.batch.inc +++ b/core/modules/locale/locale.batch.inc @@ -242,7 +242,7 @@ function locale_translation_http_check($uri) { 'allow_redirects' => [ 'on_redirect' => function (RequestInterface $request, ResponseInterface $response, UriInterface $request_uri) use (&$actual_uri) { $actual_uri = (string) $request_uri; - } + }, ], ])->head($uri); $result = []; diff --git a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php index 2550031ea65..058d9ddf8e7 100644 --- a/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php @@ -131,7 +131,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase { $expected = [ 'translatable_no_default' => 'This translation is preserved', 'translatable_default_with_translation' => 'This translation is preserved', - 'translatable_default_with_no_translation' => 'This translation is preserved' + 'translatable_default_with_no_translation' => 'This translation is preserved', ]; $this->assertEqual($expected, $override->get()); } @@ -204,7 +204,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase { $expected = [ 'translatable_default_with_translation' => 'Locale can translate Afrikaans', 'translatable_no_default' => 'This translation is preserved', - 'translatable_default_with_no_translation' => 'This translation is preserved' + 'translatable_default_with_no_translation' => 'This translation is preserved', ]; $this->assertEqual($expected, $override->get()); @@ -226,7 +226,7 @@ class LocaleConfigTranslationImportTest extends BrowserTestBase { $override = \Drupal::languageManager()->getLanguageConfigOverride('af', 'locale_test_translate.settings'); $expected = [ 'translatable_no_default' => 'This translation is preserved', - 'translatable_default_with_no_translation' => 'This translation is preserved' + 'translatable_default_with_no_translation' => 'This translation is preserved', ]; $this->assertEqual($expected, $override->get()); } diff --git a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php index ee496e248a2..c38da43d77f 100644 --- a/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleFileSystemFormTest.php @@ -45,7 +45,7 @@ class LocaleFileSystemFormTest extends BrowserTestBase { // The setting should persist. $translation_path = $this->publicFilesDirectory . '/translations_changed'; $fields = [ - 'translation_path' => $translation_path + 'translation_path' => $translation_path, ]; $this->drupalPostForm(NULL, $fields, t('Save configuration')); $this->drupalGet('admin/config/media/file-system'); diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php index 170605e96ab..0ab558503c7 100644 --- a/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleUpdateInterfaceTest.php @@ -85,7 +85,7 @@ class LocaleUpdateInterfaceTest extends LocaleUpdateBase { $release_details = new FormattableMarkup('@module (@version). @info', [ '@module' => 'Locale test translate', '@version' => '1.3-dev', - '@info' => t('File not found at %local_path', ['%local_path' => 'core/modules/locale/tests/test.de.po']) + '@info' => t('File not found at %local_path', ['%local_path' => 'core/modules/locale/tests/test.de.po']), ]); $this->assertRaw($release_details->__toString(), 'Release details'); diff --git a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php index b8f4109b42f..6ce4ccc713d 100644 --- a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php +++ b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php @@ -41,7 +41,7 @@ class MenuUiJavascriptTest extends JavascriptTestBase { $block = $this->drupalPlaceBlock('system_menu_block:' . $menu->id(), [ 'label' => 'Custom menu', - 'provider' => 'system' + 'provider' => 'system', ]); $this->addMenuLink('', '/', $menu->id()); @@ -150,7 +150,7 @@ class MenuUiJavascriptTest extends JavascriptTestBase { $this->assertMenuLink([ 'menu_name' => $menu_id, 'children' => [], - 'parent' => $parent + 'parent' => $parent, ], $menu_link->getPluginId()); return $menu_link; diff --git a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php index ccbebff3079..5e890a0e6a0 100644 --- a/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php +++ b/core/modules/migrate/tests/src/Functional/process/DownloadFunctionalTest.php @@ -41,7 +41,7 @@ class DownloadFunctionalTest extends BrowserTestBase { 'uri' => [ 'plugin' => 'download', 'source' => ['url', 'uri'], - ] + ], ], 'destination' => [ 'plugin' => 'entity:file', diff --git a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php index 14e50b95145..27aa45bcceb 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateConfigRollbackTest.php @@ -34,7 +34,7 @@ class MigrateConfigRollbackTest extends MigrateTestBase { $ids = [ 'id' => [ - 'type' => 'string' + 'type' => 'string', ], ]; $definition = [ @@ -100,12 +100,12 @@ class MigrateConfigRollbackTest extends MigrateTestBase { $ids = [ 'id' => [ - 'type' => 'string' + 'type' => 'string', ], 'language' => [ - 'type' => 'string' - ] + 'type' => 'string', + ], ]; $definition = [ 'id' => 'i18n_config', diff --git a/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php b/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php index a63995922dc..d43ad8af586 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateRollbackEntityConfigTest.php @@ -83,14 +83,14 @@ class MigrateRollbackEntityConfigTest extends MigrateTestBase { 'name' => '1', 'language' => 'fr', 'property' => 'name', - 'translation' => 'fr - categories' + 'translation' => 'fr - categories', ], [ 'id' => '2', 'name' => '2', 'language' => 'fr', 'property' => 'name', - 'translation' => 'fr - tags' + 'translation' => 'fr - tags', ], ]; $ids = [ @@ -106,7 +106,7 @@ class MigrateRollbackEntityConfigTest extends MigrateTestBase { 'ids' => $ids, 'constants' => [ 'name' => 'name', - ] + ], ], 'process' => [ 'vid' => 'id', diff --git a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php index 287860a36a0..2cb6f672df9 100644 --- a/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php +++ b/core/modules/migrate/tests/src/Kernel/Plugin/MigrationTest.php @@ -39,7 +39,7 @@ class MigrationTest extends KernelTestBase { 'f1' => 'bar', 'f2' => [ 'plugin' => 'migration', - 'migration' => 'm1' + 'migration' => 'm1', ], 'f3' => [ 'plugin' => 'sub_process', @@ -52,7 +52,7 @@ class MigrationTest extends KernelTestBase { ], 'f4' => [ 'plugin' => 'migration_lookup', - 'migration' => 'm3' + 'migration' => 'm3', ], 'f5' => [ 'plugin' => 'sub_process', diff --git a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php index 644371e5f5d..cdc12955359 100644 --- a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php @@ -50,17 +50,17 @@ class FileCopyTest extends FileTestBase { // Test a local to local copy. [ $this->root . '/core/modules/simpletest/files/image-test.jpg', - 'public://file1.jpg' + 'public://file1.jpg', ], // Test a temporary file using an absolute path. [ $file_absolute, - 'temporary://test.jpg' + 'temporary://test.jpg', ], // Test a temporary file using a relative path. [ $file_absolute, - 'temporary://core/modules/simpletest/files/test.jpg' + 'temporary://core/modules/simpletest/files/test.jpg', ], ]; foreach ($data_sets as $data) { @@ -113,17 +113,17 @@ class FileCopyTest extends FileTestBase { // Test a local to local copy. [ $local_file, - 'public://file1.jpg' + 'public://file1.jpg', ], // Test a temporary file using an absolute path. [ $file_1_absolute, - 'temporary://test.jpg' + 'temporary://test.jpg', ], // Test a temporary file using a relative path. [ $file_2_absolute, - 'temporary://core/modules/simpletest/files/test.jpg' + 'temporary://core/modules/simpletest/files/test.jpg', ], ]; foreach ($data_sets as $data) { diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php index f199562b6b3..8f33ba6db15 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php @@ -384,7 +384,7 @@ class MigrateExecutableTest extends MigrateTestCase { public function testProcessRow() { $expected = [ 'test' => 'test destination', - 'test1' => 'test1 destination' + 'test1' => 'test1 destination', ]; foreach ($expected as $key => $value) { $plugins[$key][0] = $this->getMock('Drupal\migrate\Plugin\MigrateProcessInterface'); diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php index 3c3cba8859d..1a33974471e 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php @@ -28,7 +28,7 @@ class MigrateSqlIdMapEnsureTablesTest extends MigrateTestCase { 'type' => 'varchar', 'length' => 64, 'not null' => 1, - 'description' => 'Hash of source ids. Used as primary key' + 'description' => 'Hash of source ids. Used as primary key', ]; $fields['sourceid1'] = [ 'type' => 'int', @@ -101,7 +101,7 @@ class MigrateSqlIdMapEnsureTablesTest extends MigrateTestCase { 'type' => 'varchar', 'length' => 64, 'not null' => 1, - 'description' => 'Hash of source ids. Used as primary key' + 'description' => 'Hash of source ids. Used as primary key', ]; $fields['level'] = [ 'type' => 'int', diff --git a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php index e6722044234..e7d17187064 100644 --- a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php +++ b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php @@ -50,11 +50,11 @@ class CallbackTest extends MigrateProcessTestCase { return [ 'not set' => [ 'message' => 'The "callable" must be set.', - 'configuration' => [] + 'configuration' => [], ], 'invalid method' => [ 'message' => 'The "callable" must be a valid function or method.', - 'configuration' => ['callable' => 'nonexistent_callable'] + 'configuration' => ['callable' => 'nonexistent_callable'], ], ]; } diff --git a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php index 7038c23868f..994de3855fb 100644 --- a/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php +++ b/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php @@ -85,7 +85,7 @@ class FormatDateTest extends MigrateProcessTestCase { 'timezone' => 'America/Managua', ], 'value' => '2004-12-19T10:19:42-0600', - 'expected' => '2004-12-19T10:19:42-06:00 -06:00' + 'expected' => '2004-12-19T10:19:42-06:00 -06:00', ], ]; } diff --git a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php index 20b80957db3..3cf40319073 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d8/ConfigTest.php @@ -72,7 +72,7 @@ class ConfigTest extends MigrateSqlSourceTestBase { ], 'collections' => [ 'language.af', - ] + ], ]; // Test with name and no collection in configuration. diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php index 152706798c9..1d7f2d944bc 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/VariableTranslationTest.php @@ -43,7 +43,7 @@ class VariableTranslationTest extends MigrateSqlSourceTestCase { 'language' => 'mi', 'site_slogan' => 'Ko whakamataku heke', 'site_name' => 'ingoa_pae', - ] + ], ]; /** diff --git a/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php b/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php index d1905b0e6ca..d2a15666d1f 100644 --- a/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php +++ b/core/modules/migrate_drupal/tests/src/Unit/source/d6/i18nVariableTest.php @@ -44,7 +44,7 @@ class i18nVariableTest extends MigrateSqlSourceTestCase { 'language' => 'mi', 'site_slogan' => 'Ko whakamataku heke', 'site_name' => 'ingoa_pae', - ] + ], ]; /** diff --git a/core/modules/node/node.admin.inc b/core/modules/node/node.admin.inc index fe48692a847..bd1b6232ad6 100644 --- a/core/modules/node/node.admin.inc +++ b/core/modules/node/node.admin.inc @@ -35,7 +35,7 @@ function node_mass_update(array $nodes, array $updates, $langcode = NULL, $load if (count($nodes) > 10) { $batch = [ 'operations' => [ - ['_node_mass_update_batch_process', [$nodes, $updates, $langcode, $load, $revisions]] + ['_node_mass_update_batch_process', [$nodes, $updates, $langcode, $load, $revisions]], ], 'finished' => '_node_mass_update_batch_finished', 'title' => t('Processing'), diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index dd151a4a960..b0a87d889a5 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -169,7 +169,7 @@ function hook_node_access_records(\Drupal\node\NodeInterface $node) { 'grant_view' => 1, 'grant_update' => 0, 'grant_delete' => 0, - 'langcode' => 'ca' + 'langcode' => 'ca', ]; } // For the example_author array, the GID is equivalent to a UID, which @@ -183,7 +183,7 @@ function hook_node_access_records(\Drupal\node\NodeInterface $node) { 'grant_view' => 1, 'grant_update' => 1, 'grant_delete' => 1, - 'langcode' => 'ca' + 'langcode' => 'ca', ]; } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index b26be926846..ea27e269b2a 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -841,7 +841,7 @@ function node_page_top(array &$page) { $page['page_top']['node_preview'] = [ '#type' => 'container', '#attributes' => [ - 'class' => ['node-preview-container', 'container-inline'] + 'class' => ['node-preview-container', 'container-inline'], ], ]; @@ -1185,7 +1185,7 @@ function node_access_rebuild($batch_mode = FALSE) { 'operations' => [ ['_node_access_rebuild_batch_operation', []], ], - 'finished' => '_node_access_rebuild_batch_finished' + 'finished' => '_node_access_rebuild_batch_finished', ]; batch_set($batch); } diff --git a/core/modules/node/src/Form/NodePreviewForm.php b/core/modules/node/src/Form/NodePreviewForm.php index b06a65712fd..75ed61d233a 100644 --- a/core/modules/node/src/Form/NodePreviewForm.php +++ b/core/modules/node/src/Form/NodePreviewForm.php @@ -107,7 +107,7 @@ class NodePreviewForm extends FormBase { '#default_value' => $view_mode, '#attributes' => [ 'data-drupal-autosubmit' => TRUE, - ] + ], ]; $form['submit'] = [ diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php index 12f276ef17d..702d8d74a5c 100644 --- a/core/modules/node/src/NodeForm.php +++ b/core/modules/node/src/NodeForm.php @@ -102,7 +102,7 @@ class NodeForm extends ContentEntityForm { if ($this->operation == 'edit') { $form['#title'] = $this->t('Edit @type @title', [ '@type' => node_get_type_label($node), - '@title' => $node->label() + '@title' => $node->label(), ]); } diff --git a/core/modules/node/src/NodeTypeListBuilder.php b/core/modules/node/src/NodeTypeListBuilder.php index be6e5f638b9..870729891a3 100644 --- a/core/modules/node/src/NodeTypeListBuilder.php +++ b/core/modules/node/src/NodeTypeListBuilder.php @@ -56,7 +56,7 @@ class NodeTypeListBuilder extends ConfigEntityListBuilder { public function render() { $build = parent::render(); $build['table']['#empty'] = $this->t('No content types available. Add content type.', [ - ':link' => Url::fromRoute('node.type_add')->toString() + ':link' => Url::fromRoute('node.type_add')->toString(), ]); return $build; } diff --git a/core/modules/node/src/NodeViewBuilder.php b/core/modules/node/src/NodeViewBuilder.php index 2fc67283f08..43efecb4a4d 100644 --- a/core/modules/node/src/NodeViewBuilder.php +++ b/core/modules/node/src/NodeViewBuilder.php @@ -46,7 +46,7 @@ class NodeViewBuilder extends EntityViewBuilder { '#title' => t('Language'), '#markup' => $entity->language()->getName(), '#prefix' => '
                ', - '#suffix' => '
                ' + '#suffix' => '', ]; } } diff --git a/core/modules/node/src/NodeViewsData.php b/core/modules/node/src/NodeViewsData.php index a122203d6f8..e13e76cdff6 100644 --- a/core/modules/node/src/NodeViewsData.php +++ b/core/modules/node/src/NodeViewsData.php @@ -322,7 +322,7 @@ class NodeViewsData extends EntityViewsData { 'field' => 'sid', 'table' => 'search_index', 'extra' => "node_search_index.type = 'node_search' AND node_search_index.langcode = node_field_data.langcode", - ] + ], ]; $data['node_search_total']['table']['join'] = [ diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index 52c121e69d6..b043d63681e 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -487,7 +487,7 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter '#prefix' => '

                ', '#plain_text' => $node->label(), '#suffix' => '

                ', - '#weight' => -1000 + '#weight' => -1000, ]; $text = $this->renderer->renderPlain($build); @@ -793,7 +793,7 @@ class NodeSearch extends ConfigurableSearchPluginBase implements AccessibleInter '#open' => TRUE, ]; $form['content_ranking']['info'] = [ - '#markup' => '

                ' . $this->t('Influence is a numeric multiplier used in ordering search results. A higher number means the corresponding factor has more influence on search results; zero means the factor is ignored. Changing these numbers does not require the search index to be rebuilt. Changes take effect immediately.') . '

                ' + '#markup' => '

                ' . $this->t('Influence is a numeric multiplier used in ordering search results. A higher number means the corresponding factor has more influence on search results; zero means the factor is ignored. Changing these numbers does not require the search index to be rebuilt. Changes take effect immediately.') . '

                ', ]; // Prepare table. $header = [$this->t('Factor'), $this->t('Influence')]; diff --git a/core/modules/node/src/Plugin/views/wizard/Node.php b/core/modules/node/src/Plugin/views/wizard/Node.php index c9929c51f4a..0fd93675a8f 100644 --- a/core/modules/node/src/Plugin/views/wizard/Node.php +++ b/core/modules/node/src/Plugin/views/wizard/Node.php @@ -37,7 +37,7 @@ class Node extends WizardPluginBase { public function getAvailableSorts() { // You can't execute functions in properties, so override the method return [ - 'node_field_data-title:ASC' => $this->t('Title') + 'node_field_data-title:ASC' => $this->t('Title'), ]; } diff --git a/core/modules/node/src/Tests/NodeRevisionsTest.php b/core/modules/node/src/Tests/NodeRevisionsTest.php index c36452d9ab3..fdc929a84c7 100644 --- a/core/modules/node/src/Tests/NodeRevisionsTest.php +++ b/core/modules/node/src/Tests/NodeRevisionsTest.php @@ -174,7 +174,7 @@ class NodeRevisionsTest extends NodeTestBase { $this->assertRaw(t('@type %title has been reverted to the revision from %revision-date.', [ '@type' => 'Basic page', '%title' => $nodes[1]->label(), - '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()) + '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()), ]), 'Revision reverted.'); $node_storage->resetCache([$node->id()]); $reverted_node = $node_storage->load($node->id()); diff --git a/core/modules/node/src/Tests/NodeTestBase.php b/core/modules/node/src/Tests/NodeTestBase.php index 2dcaba5b38f..643684cde43 100644 --- a/core/modules/node/src/Tests/NodeTestBase.php +++ b/core/modules/node/src/Tests/NodeTestBase.php @@ -105,7 +105,7 @@ abstract class NodeTestBase extends WebTestBase { [ '@result' => $result ? 'true' : 'false', '%op' => $operation, - '%langcode' => !empty($langcode) ? $langcode : 'empty' + '%langcode' => !empty($langcode) ? $langcode : 'empty', ] ); } diff --git a/core/modules/node/src/Tests/NodeTypeTest.php b/core/modules/node/src/Tests/NodeTypeTest.php index 70d3ac40b52..9938bb0ab53 100644 --- a/core/modules/node/src/Tests/NodeTypeTest.php +++ b/core/modules/node/src/Tests/NodeTypeTest.php @@ -249,7 +249,7 @@ class NodeTypeTest extends NodeTestBase { // Navigate to content type administration screen $this->drupalGet('admin/structure/types'); $this->assertRaw(t('No content types available. Add content type.', [ - ':link' => Url::fromRoute('node.type_add')->toString() + ':link' => Url::fromRoute('node.type_add')->toString(), ]), 'Empty text when there are no content types in the system is correct.'); $bundle_info->clearCachedBundles(); diff --git a/core/modules/node/src/Tests/PagePreviewTest.php b/core/modules/node/src/Tests/PagePreviewTest.php index e9f607cf26e..bcbe5d7a2ac 100644 --- a/core/modules/node/src/Tests/PagePreviewTest.php +++ b/core/modules/node/src/Tests/PagePreviewTest.php @@ -133,7 +133,7 @@ class PagePreviewTest extends NodeTestBase { 'type' => 'text', 'settings' => [ 'max_length' => 50, - ] + ], ]); $field_storage->save(); FieldConfig::create([ diff --git a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php index aa224824d5d..ab6f28df94f 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php @@ -54,7 +54,7 @@ class NodeAccessFieldTest extends NodeTestBase { FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'entity_type' => 'node', - 'type' => 'text' + 'type' => 'text', ])->save(); FieldConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php index 6c5bcd4ed0f..5d987b36a17 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php @@ -33,7 +33,7 @@ class NodeAccessMenuLinkTest extends NodeTestBase { $this->contentAdminUser = $this->drupalCreateUser([ 'access content', 'administer content types', - 'administer menu' + 'administer menu', ]); $this->config('user.role.' . RoleInterface::ANONYMOUS_ID)->set('permissions', [])->save(); diff --git a/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php b/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php index 9ea75ccff76..7ed8413fc79 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php @@ -52,7 +52,7 @@ class NodeAccessRebuildNodeGrantsTest extends NodeTestBase { for ($i = 0; $i < 30; $i++) { $nodes[] = $this->drupalCreateNode([ 'uid' => $this->webUser->id(), - 'private' => [['value' => 1]] + 'private' => [['value' => 1]], ]); } diff --git a/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php b/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php index 66660f9507b..f10d8b7389d 100644 --- a/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php +++ b/core/modules/node/tests/src/Functional/NodePreviewAnonymousTest.php @@ -49,7 +49,7 @@ class NodePreviewAnonymousTest extends BrowserTestBase { // Fill in node creation form and preview node. $edit = [ $title_key => $this->randomMachineName(), - $body_key => $this->randomMachineName() + $body_key => $this->randomMachineName(), ]; $this->drupalPostForm('node/add/page', $edit, t('Preview')); diff --git a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php index bee787f742a..238c7317e2a 100644 --- a/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php +++ b/core/modules/node/tests/src/Functional/NodeRevisionsAllTest.php @@ -46,7 +46,7 @@ class NodeRevisionsAllTest extends NodeTestBase { 'revert page revisions', 'delete page revisions', 'edit any page content', - 'delete any page content' + 'delete any page content', ] ); $this->drupalLogin($web_user); @@ -122,7 +122,7 @@ class NodeRevisionsAllTest extends NodeTestBase { 'revert all revisions', 'delete all revisions', 'edit any page content', - 'delete any page content' + 'delete any page content', ] ); $this->drupalLogin($content_admin); @@ -147,7 +147,7 @@ class NodeRevisionsAllTest extends NodeTestBase { [ '@type' => 'Basic page', '%title' => $nodes[1]->getTitle(), - '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()) + '%revision-date' => format_date($nodes[1]->getRevisionCreationTime()), ]), 'Revision reverted.'); $node_storage->resetCache([$node->id()]); diff --git a/core/modules/node/tests/src/Functional/NodeTestBase.php b/core/modules/node/tests/src/Functional/NodeTestBase.php index 2ef0d73c50c..e52708632b9 100644 --- a/core/modules/node/tests/src/Functional/NodeTestBase.php +++ b/core/modules/node/tests/src/Functional/NodeTestBase.php @@ -102,7 +102,7 @@ abstract class NodeTestBase extends BrowserTestBase { [ '@result' => $result ? 'true' : 'false', '%op' => $operation, - '%langcode' => !empty($langcode) ? $langcode : 'empty' + '%langcode' => !empty($langcode) ? $langcode : 'empty', ] ); } diff --git a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php index 6bdc065f4a9..46516fe74aa 100644 --- a/core/modules/node/tests/src/Functional/NodeTranslationUITest.php +++ b/core/modules/node/tests/src/Functional/NodeTranslationUITest.php @@ -99,7 +99,7 @@ class NodeTranslationUITest extends ContentTranslationUITestBase { $add_url = Url::fromRoute("entity.$entity_type_id.content_translation_add", [ $entity->getEntityTypeId() => $entity->id(), 'source' => $default_langcode, - 'target' => $langcode + 'target' => $langcode, ], ['language' => $language]); $edit = $this->getEditValues($values, $langcode); $edit['status[value]'] = FALSE; diff --git a/core/modules/node/tests/src/Functional/NodeViewTest.php b/core/modules/node/tests/src/Functional/NodeViewTest.php index b0eaa47f668..36a26fc370f 100644 --- a/core/modules/node/tests/src/Functional/NodeViewTest.php +++ b/core/modules/node/tests/src/Functional/NodeViewTest.php @@ -47,7 +47,7 @@ class NodeViewTest extends NodeTestBase { // ensure caches are handled properly. $this->drupalLogin($this->rootUser); $edit = [ - 'anonymous[edit own ' . $node->bundle() . ' content]' => TRUE + 'anonymous[edit own ' . $node->bundle() . ' content]' => TRUE, ]; $this->drupalPostForm('admin/people/permissions', $edit, 'Save permissions'); $this->drupalLogout(); diff --git a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php index 37a6b91f3f5..618119c0616 100644 --- a/core/modules/node/tests/src/Functional/Views/FrontPageTest.php +++ b/core/modules/node/tests/src/Functional/Views/FrontPageTest.php @@ -284,7 +284,7 @@ class FrontPageTest extends ViewTestBase { [ 'value' => $this->randomMachineName(32), 'format' => filter_default_format(), - ] + ], ], 'type' => 'article', 'created' => $i, diff --git a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php index d2d1b479a40..31e085213ce 100644 --- a/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php +++ b/core/modules/node/tests/src/Functional/Views/NodeLanguageTest.php @@ -75,7 +75,7 @@ class NodeLanguageTest extends NodeTestBase { ], 'fr' => [ 'Premier nœud fr', - ] + ], ]; // Create nodes with translations. diff --git a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php index 9f28c065ae6..34c8dd3ddc9 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeBundleSettingsTest.php @@ -36,7 +36,7 @@ class MigrateNodeBundleSettingsTest extends MigrateDrupal6TestBase { $this->executeMigrations([ 'd6_node_setting_promote', 'd6_node_setting_status', - 'd6_node_setting_sticky' + 'd6_node_setting_sticky', ]); } diff --git a/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php b/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php index bc377b094a1..06bedade85a 100644 --- a/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php +++ b/core/modules/options/tests/src/Kernel/Views/OptionsListFilterTest.php @@ -78,20 +78,20 @@ class OptionsListFilterTest extends OptionsTestBase { 'operator' => 'or', 'value' => [ $this->fieldValues[0] => $this->fieldValues[0], - ] + ], ], 2 => [ 'title' => 'Second', 'operator' => 'or', 'value' => [ $this->fieldValues[1] => $this->fieldValues[1], - ] + ], ], ], ], 'reduce_duplicates' => '', 'plugin_id' => 'list_field', - ] + ], ]; $view->setDisplay(); $view->displayHandlers->get('default')->overrideOption('filters', $filters); diff --git a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php index 8b5442c7fe4..3e90d8eb2c0 100644 --- a/core/modules/page_cache/tests/src/Functional/PageCacheTest.php +++ b/core/modules/page_cache/tests/src/Functional/PageCacheTest.php @@ -370,7 +370,7 @@ class PageCacheTest extends BrowserTestBase { 0 => [ 'value' => $this->randomString(), 'format' => 'plain_text', - ] + ], ], ]; $entity = EntityTest::create($entity_values); diff --git a/core/modules/path/src/Form/PathFormBase.php b/core/modules/path/src/Form/PathFormBase.php index 2aa785cd738..4b1cbd59127 100644 --- a/core/modules/path/src/Form/PathFormBase.php +++ b/core/modules/path/src/Form/PathFormBase.php @@ -138,7 +138,7 @@ abstract class PathFormBase extends FormBase { else { $form['langcode'] = [ '#type' => 'value', - '#value' => $this->path['langcode'] + '#value' => $this->path['langcode'], ]; } diff --git a/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php b/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php index 602e84f42f6..773b792f38a 100644 --- a/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php +++ b/core/modules/path/tests/src/Kernel/PathNoCanonicalLinkTest.php @@ -42,7 +42,7 @@ class PathNoCanonicalLinkTest extends KernelTestBase { public function testNoCanonicalLinkTemplate() { $entity_type = EntityTestTranslatableUISkip::create([ 'name' => 'name english', - 'language' => 'en' + 'language' => 'en', ]); $entity_type->save(); diff --git a/core/modules/quickedit/src/QuickEditController.php b/core/modules/quickedit/src/QuickEditController.php index 0f470b1e474..3bed196661f 100644 --- a/core/modules/quickedit/src/QuickEditController.php +++ b/core/modules/quickedit/src/QuickEditController.php @@ -221,7 +221,7 @@ class QuickEditController extends ControllerBase { $errors = $form_state->getErrors(); if (count($errors)) { $status_messages = [ - '#type' => 'status_messages' + '#type' => 'status_messages', ]; $response->addCommand(new FieldFormValidationErrorsCommand($this->renderer->renderRoot($status_messages))); } @@ -293,7 +293,7 @@ class QuickEditController extends ControllerBase { // to identify it. $output = [ 'entity_type' => $entity->getEntityTypeId(), - 'entity_id' => $entity->id() + 'entity_id' => $entity->id(), ]; // Respond to client that the entity was saved properly. diff --git a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php index 9957a67ee01..61af1f52b63 100644 --- a/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php +++ b/core/modules/quickedit/src/Tests/QuickEditLoadingTest.php @@ -86,7 +86,7 @@ class QuickEditLoadingTest extends WebTestBase { 0 => [ 'value' => '

                How are you?

                ', 'format' => 'filtered_html', - ] + ], ], 'revision_log' => $this->randomString(), ]); @@ -187,7 +187,7 @@ class QuickEditLoadingTest extends WebTestBase { 'label' => 'Body', 'access' => TRUE, 'editor' => 'form', - ] + ], ]; $this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.'); // Restore drupalSettings to build the next requests; simpletest wipes them @@ -373,7 +373,7 @@ class QuickEditLoadingTest extends WebTestBase { 'label' => 'Title', 'access' => TRUE, 'editor' => 'plain_text', - ] + ], ]; $this->assertIdentical(Json::decode($response), $expected, 'The metadata HTTP request answers with the correct JSON response.'); // Restore drupalSettings to build the next requests; simpletest wipes them diff --git a/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php b/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php index 42c4103dca4..e0079e402fa 100644 --- a/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php +++ b/core/modules/quickedit/tests/src/Kernel/MetadataGeneratorTest.php @@ -169,7 +169,7 @@ class MetadataGeneratorTest extends QuickEditTestBase { 'label' => 'Rich text field', 'editor' => 'wysiwyg', 'custom' => [ - 'format' => 'full_html' + 'format' => 'full_html', ], ]; $this->assertEqual($expected, $metadata, 'The correct metadata (including custom metadata) is generated.'); diff --git a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php index 29437485878..8cc2d2f8b62 100644 --- a/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php +++ b/core/modules/quickedit/tests/src/Kernel/QuickEditTestBase.php @@ -97,7 +97,7 @@ abstract class QuickEditTestBase extends KernelTestBase { ->setComponent($field_name, [ 'label' => 'above', 'type' => $formatter_type, - 'settings' => $formatter_settings + 'settings' => $formatter_settings, ]) ->save(); } diff --git a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php index 7e98286002b..fddd440894e 100644 --- a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php +++ b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php @@ -45,7 +45,7 @@ class UserAttributesTest extends BrowserTestBase { $authors = [ $this->drupalCreateUser([], $this->randomMachineName(30)), $this->drupalCreateUser([], $this->randomMachineName(20)), - $this->drupalCreateUser([], $this->randomMachineName(5)) + $this->drupalCreateUser([], $this->randomMachineName(5)), ]; $this->drupalLogin($user1); diff --git a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php index 3a709519d09..5a3181a4eb9 100644 --- a/core/modules/responsive_image/src/ResponsiveImageStyleForm.php +++ b/core/modules/responsive_image/src/ResponsiveImageStyleForm.php @@ -259,7 +259,7 @@ class ResponsiveImageStyleForm extends EntityForm { 'image_mapping' => [ 'sizes' => $image_style_mapping['sizes'], 'sizes_image_styles' => array_keys(array_filter($image_style_mapping['sizes_image_styles'])), - ] + ], ]; $responsive_image_style->addImageStyleMapping($breakpoint_id, $multiplier, $mapping); } diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php index 04efb7b8037..3828ab0d75e 100644 --- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php +++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php @@ -51,7 +51,7 @@ class ResponsiveImageFieldDisplayTest extends ImageFieldTestBase { 'create article content', 'edit any article content', 'delete any article content', - 'administer image styles' + 'administer image styles', ]); $this->drupalLogin($this->adminUser); // Add responsive image style. diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldUiTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldUiTest.php index c879e72c7e5..2069f61368f 100644 --- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldUiTest.php +++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldUiTest.php @@ -77,7 +77,7 @@ class ResponsiveImageFieldUiTest extends WebTestBase { ]) ->addImageStyleMapping('responsive_image_test_module.narrow', '1x', [ 'image_mapping_type' => 'image_style', - 'image_mapping' => 'medium' + 'image_mapping' => 'medium', ]) // Test the normal output of mapping to an image style. ->addImageStyleMapping('responsive_image_test_module.wide', '1x', [ diff --git a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php index 0c64b05ed85..f45c927e332 100644 --- a/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php +++ b/core/modules/responsive_image/tests/src/Unit/ResponsiveImageStyleConfigEntityUnitTest.php @@ -248,7 +248,7 @@ class ResponsiveImageStyleConfigEntityUnitTest extends UnitTestCase { 'image_mapping_type' => 'image_style', 'image_mapping' => '_original image_', ], - ] + ], ]; $this->assertEquals($expected, $entity->getKeyedImageStyleMappings()); diff --git a/core/modules/rest/rest.post_update.php b/core/modules/rest/rest.post_update.php index 6d45178804b..8ed5a6dbff1 100644 --- a/core/modules/rest/rest.post_update.php +++ b/core/modules/rest/rest.post_update.php @@ -53,7 +53,7 @@ function rest_post_update_resource_granularity() { $resource_config_entity->set('configuration', [ 'methods' => array_keys($configuration), 'formats' => $configuration[$first_method]['supported_formats'], - 'authentication' => $configuration[$first_method]['supported_auth'] + 'authentication' => $configuration[$first_method]['supported_auth'], ]); $resource_config_entity->set('granularity', RestResourceConfigInterface::RESOURCE_GRANULARITY); $resource_config_entity->save(); diff --git a/core/modules/rest/src/Entity/RestResourceConfig.php b/core/modules/rest/src/Entity/RestResourceConfig.php index 47faa01e0d9..c0a4e5c04c7 100644 --- a/core/modules/rest/src/Entity/RestResourceConfig.php +++ b/core/modules/rest/src/Entity/RestResourceConfig.php @@ -210,7 +210,7 @@ class RestResourceConfig extends ConfigEntityBase implements RestResourceConfigI */ public function getPluginCollections() { return [ - 'resource' => new DefaultSingleLazyPluginCollection($this->getResourcePluginManager(), $this->plugin_id, []) + 'resource' => new DefaultSingleLazyPluginCollection($this->getResourcePluginManager(), $this->plugin_id, []), ]; } diff --git a/core/modules/rest/src/Tests/RESTTestBase.php b/core/modules/rest/src/Tests/RESTTestBase.php index f6046133e33..66be4b29eaa 100644 --- a/core/modules/rest/src/Tests/RESTTestBase.php +++ b/core/modules/rest/src/Tests/RESTTestBase.php @@ -383,7 +383,7 @@ abstract class RESTTestBase extends WebTestBase { $resource_config = $this->resourceConfigStorage->create([ 'id' => $resource_config_id, 'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY, - 'configuration' => [] + 'configuration' => [], ]); } $configuration = $resource_config->get('configuration'); diff --git a/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php b/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php index 17a69d53788..ac9b19119ca 100644 --- a/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php +++ b/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8201.php @@ -54,6 +54,6 @@ $data = $connection->insert('config') ->fields([ 'name' => 'rest.settings', 'data' => serialize($config), - 'collection' => '' + 'collection' => '', ]) ->execute(); diff --git a/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php b/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php index 15acff94094..c20ba9531d4 100644 --- a/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php +++ b/core/modules/rest/tests/fixtures/update/drupal-8.rest-rest_update_8203.php @@ -53,6 +53,6 @@ $data = $connection->insert('config') ->fields([ 'name' => 'rest.settings', 'data' => serialize($config), - 'collection' => '' + 'collection' => '', ]) ->execute(); diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php index 0c82ea95a28..94384fffa52 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php @@ -84,8 +84,8 @@ abstract class EntityTestResourceTestBase extends EntityResourceTestBase { $normalization = [ 'uuid' => [ [ - 'value' => $this->entity->uuid() - ] + 'value' => $this->entity->uuid(), + ], ], 'id' => [ [ @@ -100,15 +100,15 @@ abstract class EntityTestResourceTestBase extends EntityResourceTestBase { 'type' => [ [ 'value' => 'entity_test', - ] + ], ], 'name' => [ [ 'value' => 'Llama', - ] + ], ], 'created' => [ - $this->formatExpectedTimestampItemValues((int) $this->entity->get('created')->value) + $this->formatExpectedTimestampItemValues((int) $this->entity->get('created')->value), ], 'user_id' => [ [ @@ -116,7 +116,7 @@ abstract class EntityTestResourceTestBase extends EntityResourceTestBase { 'target_type' => 'user', 'target_uuid' => $author->uuid(), 'url' => $author->toUrl()->toString(), - ] + ], ], 'field_test_text' => [], ]; diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php index cd8654df4d8..1108832f1d0 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestTextItemNormalizerTest.php @@ -123,7 +123,7 @@ class EntityTestTextItemNormalizerTest extends EntityTestResourceTestBase { 'foo:bar', 'foo:baz', // The cache tags set by the filter_test_cache_merge filter. - 'merge:tag' + 'merge:tag', ], parent::getExpectedCacheTags()); } diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php index a89bde1b69e..7dce3a2c3e1 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedResourceTestBase.php @@ -76,33 +76,33 @@ abstract class FeedResourceTestBase extends EntityResourceTestBase { return [ 'uuid' => [ [ - 'value' => 'abcdefg' - ] + 'value' => 'abcdefg', + ], ], 'fid' => [ [ - 'value' => 1 - ] + 'value' => 1, + ], ], 'langcode' => [ [ - 'value' => 'en' - ] + 'value' => 'en', + ], ], 'url' => [ [ - 'value' => 'http://example.com/rss.xml' - ] + 'value' => 'http://example.com/rss.xml', + ], ], 'title' => [ [ - 'value' => 'Feed' - ] + 'value' => 'Feed', + ], ], 'refresh' => [ [ - 'value' => 900 - ] + 'value' => 900, + ], ], 'checked' => [ $this->formatExpectedTimestampItemValues(123456789), @@ -112,28 +112,28 @@ abstract class FeedResourceTestBase extends EntityResourceTestBase { ], 'link' => [ [ - 'value' => 'http://example.com' - ] + 'value' => 'http://example.com', + ], ], 'description' => [ [ - 'value' => 'Feed Resource Test 1' - ] + 'value' => 'Feed Resource Test 1', + ], ], 'image' => [ [ - 'value' => 'http://example.com/feed_logo' - ] + 'value' => 'http://example.com/feed_logo', + ], ], 'hash' => [ [ - 'value' => 'abcdefg' - ] + 'value' => 'abcdefg', + ], ], 'etag' => [ [ - 'value' => 'hijklmn' - ] + 'value' => 'hijklmn', + ], ], 'modified' => [ $this->formatExpectedTimestampItemValues(123456789), @@ -148,23 +148,23 @@ abstract class FeedResourceTestBase extends EntityResourceTestBase { return [ 'title' => [ [ - 'value' => 'Feed Resource Post Test' - ] + 'value' => 'Feed Resource Post Test', + ], ], 'url' => [ [ - 'value' => 'http://example.com/feed' - ] + 'value' => 'http://example.com/feed', + ], ], 'refresh' => [ [ - 'value' => 900 - ] + 'value' => 900, + ], ], 'description' => [ [ - 'value' => 'Feed Resource Post Test Description' - ] + 'value' => 'Feed Resource Post Test Description', + ], ], ]; } diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php index ce6090419e4..5720dacc688 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php @@ -334,16 +334,16 @@ abstract class TermResourceTestBase extends EntityResourceTestBase { public function providerTestGetTermWithParent() { return [ 'root parent: [0] (= no parent)' => [ - [0] + [0], ], 'non-root parent: [2]' => [ - [2] + [2], ], 'multiple parents: [0,2] (root + non-root parent)' => [ - [0, 2] + [0, 2], ], 'multiple parents: [3,2] (both non-root parents)' => [ - [3, 2] + [3, 2], ], ]; } diff --git a/core/modules/rest/tests/src/Functional/ResourceTest.php b/core/modules/rest/tests/src/Functional/ResourceTest.php index 1e8babe0db2..d04b990e60f 100644 --- a/core/modules/rest/tests/src/Functional/ResourceTest.php +++ b/core/modules/rest/tests/src/Functional/ResourceTest.php @@ -121,7 +121,7 @@ class ResourceTest extends BrowserTestBase { ], 'supported_auth' => [ 'cookie', - ] + ], ], ], ])->save(); diff --git a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php index 6de1ec97ce1..b60eb0c3f2a 100644 --- a/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php +++ b/core/modules/rest/tests/src/Functional/Views/StyleSerializerTest.php @@ -296,7 +296,7 @@ class StyleSerializerTest extends ViewTestBase { 'entity_test:7', 'entity_test:8', 'entity_test:9', - 'entity_test_list' + 'entity_test_list', ]; $cache_contexts = [ 'entity_test_view_grants', diff --git a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php index c885990ff74..500f375ef95 100644 --- a/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php +++ b/core/modules/rest/tests/src/Kernel/Entity/ConfigDependenciesTest.php @@ -239,7 +239,7 @@ class ConfigDependenciesTest extends KernelTestBase { 'methods' => ['GET', 'POST'], 'formats' => ['json'], 'authentication' => ['cookie', 'basic_auth'], - ] + ], ], 'resource with only HAL+JSON format' => [ [ @@ -252,7 +252,7 @@ class ConfigDependenciesTest extends KernelTestBase { ], ], 'hal', - FALSE + FALSE, ], 'resource with multiple authentication providers' => [ [ @@ -269,7 +269,7 @@ class ConfigDependenciesTest extends KernelTestBase { 'methods' => ['GET', 'POST'], 'formats' => ['json', 'hal_json'], 'authentication' => ['cookie'], - ] + ], ], 'resource with only basic_auth authentication' => [ [ diff --git a/core/modules/search/search.module b/core/modules/search/search.module index d2560dffcc3..c7707fd51c9 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -797,7 +797,7 @@ function search_excerpt($keys, $text, $langcode = NULL) { $text = trim(preg_replace('/' . $preceded_by_boundary . '(?:' . implode('|', $keys) . ')' . $followed_by_boundary . '/iu', '\0', ' ' . $text . ' ')); return [ '#markup' => $text, - '#allowed_tags' => ['strong'] + '#allowed_tags' => ['strong'], ]; } diff --git a/core/modules/search/src/SearchPageListBuilder.php b/core/modules/search/src/SearchPageListBuilder.php index 9442b696139..bde195ec638 100644 --- a/core/modules/search/src/SearchPageListBuilder.php +++ b/core/modules/search/src/SearchPageListBuilder.php @@ -157,7 +157,7 @@ class SearchPageListBuilder extends DraggableListBuilder implements FormInterfac $status = $entity->getPlugin()->indexStatus(); $row['progress']['#markup'] = $this->t('%num_indexed of %num_total indexed', [ '%num_indexed' => $status['total'] - $status['remaining'], - '%num_total' => $status['total'] + '%num_total' => $status['total'], ]); } else { @@ -227,7 +227,7 @@ class SearchPageListBuilder extends DraggableListBuilder implements FormInterfac '#open' => TRUE, ]; $form['indexing_settings']['info'] = [ - '#markup' => $this->t("

                Search pages that use an index may use the default index provided by the Search module, or they may use a different indexing mechanism. These settings are for the default index. Changing these settings will cause the default search index to be rebuilt to reflect the new settings. Searching will continue to work, based on the existing index, but new content won't be indexed until all existing content has been re-indexed.

                The default settings should be appropriate for the majority of sites.

                ") + '#markup' => $this->t("

                Search pages that use an index may use the default index provided by the Search module, or they may use a different indexing mechanism. These settings are for the default index. Changing these settings will cause the default search index to be rebuilt to reflect the new settings. Searching will continue to work, based on the existing index, but new content won't be indexed until all existing content has been re-indexed.

                The default settings should be appropriate for the majority of sites.

                "), ]; $form['indexing_settings']['minimum_word_size'] = [ '#type' => 'number', @@ -241,7 +241,7 @@ class SearchPageListBuilder extends DraggableListBuilder implements FormInterfac '#type' => 'checkbox', '#title' => $this->t('Simple CJK handling'), '#default_value' => $search_settings->get('index.overlap_cjk'), - '#description' => $this->t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.') + '#description' => $this->t('Whether to apply a simple Chinese/Japanese/Korean tokenizer based on overlapping sequences. Turn this off if you want to use an external preprocessor for this instead. Does not affect other languages.'), ]; // Indexing settings: diff --git a/core/modules/search/src/Tests/SearchPageCacheTagsTest.php b/core/modules/search/src/Tests/SearchPageCacheTagsTest.php index 55adf976e8f..0ea0e9460d3 100644 --- a/core/modules/search/src/Tests/SearchPageCacheTagsTest.php +++ b/core/modules/search/src/Tests/SearchPageCacheTagsTest.php @@ -153,7 +153,7 @@ class SearchPageCacheTagsTest extends SearchTestBase { // reference field. $edit = [ 'title[0][value]' => 'Llama shop', - 'field_test__ref[0][target_id]' => $this->node->getTitle() + 'field_test__ref[0][target_id]' => $this->node->getTitle(), ]; $this->drupalPostForm('node/add/' . $type->id(), $edit, t('Save')); diff --git a/core/modules/search/tests/src/Kernel/SearchMatchTest.php b/core/modules/search/tests/src/Kernel/SearchMatchTest.php index 7037646bc86..e9d2ac8bca5 100644 --- a/core/modules/search/tests/src/Kernel/SearchMatchTest.php +++ b/core/modules/search/tests/src/Kernel/SearchMatchTest.php @@ -156,7 +156,7 @@ class SearchMatchTest extends KernelTestBase { '"am minim veniam" -"cillum dolore"' => [5, 6], '"am minim veniam" -"dolore cillum"' => [5, 6, 7], 'xxxxx "minim am veniam es" OR dolore' => [], - 'xx "minim am veniam es" OR dolore' => [] + 'xx "minim am veniam es" OR dolore' => [], ]; foreach ($queries as $query => $results) { $result = db_select('search_index', 'i') diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php index a1e01e64e57..5861d99838e 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php @@ -28,7 +28,7 @@ class ShortcutTranslationUITest extends ContentTranslationUITestBase { 'content_translation', 'link', 'shortcut', - 'toolbar' + 'toolbar', ]; /** diff --git a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php index 9f8fd3ae66d..4435e81b2fe 100644 --- a/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php +++ b/core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php @@ -52,7 +52,7 @@ class ShortcutTest extends MigrateSqlSourceTestBase { 'p8' => '0', 'p9' => '0', 'updated' => '0', - ] + ], ]; // The expected results. diff --git a/core/modules/simpletest/src/Form/SimpletestResultsForm.php b/core/modules/simpletest/src/Form/SimpletestResultsForm.php index f24727c6f3f..a2241571eb4 100644 --- a/core/modules/simpletest/src/Form/SimpletestResultsForm.php +++ b/core/modules/simpletest/src/Form/SimpletestResultsForm.php @@ -290,7 +290,7 @@ class SimpletestResultsForm extends FormBase { 'Filename', 'Line', 'Function', - ['colspan' => 2, 'data' => 'Status'] + ['colspan' => 2, 'data' => 'Status'], ]; $form['result']['results'] = []; foreach ($test_results as $group => $assertions) { diff --git a/core/modules/simpletest/src/Tests/KernelTestBaseTest.php b/core/modules/simpletest/src/Tests/KernelTestBaseTest.php index 1e9e75da0b9..7131041d157 100644 --- a/core/modules/simpletest/src/Tests/KernelTestBaseTest.php +++ b/core/modules/simpletest/src/Tests/KernelTestBaseTest.php @@ -278,7 +278,7 @@ EOS; $field_storage = FieldStorageConfig::create([ 'field_name' => 'test_field', 'entity_type' => 'entity_test', - 'type' => 'test_field' + 'type' => 'test_field', ]); $field_storage->save(); FieldConfig::create([ @@ -354,7 +354,7 @@ EOS; $info = Database::getConnectionInfo(); $connection->query('ATTACH DATABASE :database AS :prefix', [ ':database' => $info['default']['database'] . '-' . $this->databasePrefix, - ':prefix' => $this->databasePrefix + ':prefix' => $this->databasePrefix, ]); $result = $connection->query("SELECT name FROM " . $this->databasePrefix . ".sqlite_master WHERE type = :type AND name LIKE :table_name AND name NOT LIKE :pattern", [ diff --git a/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php b/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php index d62cc48a3ea..d6fe19964a0 100644 --- a/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php +++ b/core/modules/simpletest/src/Tests/MissingCheckedRequirementsTest.php @@ -30,7 +30,7 @@ class MissingCheckedRequirementsTest extends WebTestBase { protected function checkRequirements() { if ($this->isInChildSite()) { return [ - 'Test is not allowed to run.' + 'Test is not allowed to run.', ]; } return parent::checkRequirements(); diff --git a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php index bb9da9411a6..957391db76c 100644 --- a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php @@ -59,7 +59,7 @@ class SimpleTestBrowserTest extends WebTestBase { $this->maximumRedirects = 1; $edit = [ 'name' => $user->getUsername(), - 'pass' => $user->pass_raw + 'pass' => $user->pass_raw, ]; $this->drupalPostForm('user/login', $edit, t('Log in'), [ 'query' => ['destination' => 'user/logout'], diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index ab2e5e211b9..83cf00e2699 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -286,7 +286,7 @@ abstract class WebTestBase extends TestBase { $edit = [ 'name' => $account->getUsername(), - 'pass' => $account->pass_raw + 'pass' => $account->pass_raw, ]; $this->drupalPostForm('user/login', $edit, t('Log in')); @@ -660,7 +660,7 @@ abstract class WebTestBase extends TestBase { '@method' => !empty($curl_options[CURLOPT_NOBODY]) ? 'HEAD' : (empty($curl_options[CURLOPT_POSTFIELDS]) ? 'GET' : 'POST'), '@url' => isset($original_url) ? $original_url : $url, '@status' => $status, - '@length' => format_size(strlen($this->getRawContent())) + '@length' => format_size(strlen($this->getRawContent())), ]; $message = new FormattableMarkup('@method @url returned @status (@length).', $message_vars); $this->assertTrue($this->getRawContent() !== FALSE, $message, 'Browser'); diff --git a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php index f0ac482d381..efdb72a6cd8 100644 --- a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php +++ b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php @@ -95,7 +95,7 @@ class StatisticsPopularBlock extends BlockBase implements ContainerFactoryPlugin return [ 'top_day_num' => 0, 'top_all_num' => 0, - 'top_last_num' => 0 + 'top_last_num' => 0, ]; } diff --git a/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php b/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php index 787c35bff2a..90a62093b61 100644 --- a/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php +++ b/core/modules/statistics/tests/src/Functional/StatisticsAttachedTest.php @@ -46,7 +46,7 @@ class StatisticsAttachedTest extends BrowserTestBase { $node = Node::create([ 'type' => 'page', 'title' => 'Page node', - 'body' => 'body text' + 'body' => 'body text', ]); $node->save(); $this->drupalGet('node/' . $node->id()); diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php index 214e28dd957..25a2a708918 100644 --- a/core/modules/system/src/Controller/DbUpdateController.php +++ b/core/modules/system/src/Controller/DbUpdateController.php @@ -524,7 +524,7 @@ class DbUpdateController extends ControllerBase { $build['status_report'] = [ '#type' => 'status_report', '#requirements' => $requirements, - '#suffix' => $this->t('Check the messages and try again.', [':url' => $try_again_url]) + '#suffix' => $this->t('Check the messages and try again.', [':url' => $try_again_url]), ]; $build['#title'] = $this->t('Requirements problem'); diff --git a/core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php b/core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php index 8641cbc3eed..8531653247b 100644 --- a/core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php +++ b/core/modules/system/src/Form/PrepareModulesEntityUninstallForm.php @@ -159,7 +159,7 @@ class PrepareModulesEntityUninstallForm extends ConfirmFormBase { '@entity_type_singular' => $entity_type->getSingularLabel(), '@entity_type_plural' => $entity_type->getPluralLabel(), ] - ) + ), ]; } diff --git a/core/modules/system/src/Form/RegionalForm.php b/core/modules/system/src/Form/RegionalForm.php index 9ade9380124..ccd880ace07 100644 --- a/core/modules/system/src/Form/RegionalForm.php +++ b/core/modules/system/src/Form/RegionalForm.php @@ -125,7 +125,7 @@ class RegionalForm extends ConfigFormBase { '#type' => 'checkbox', '#title' => t('Remind users at login if their time zone is not set'), '#default_value' => $system_date->get('timezone.user.warn'), - '#description' => t('Only applied if users may set their own time zone.') + '#description' => t('Only applied if users may set their own time zone.'), ]; $form['timezone']['configurable_timezones_wrapper']['user_default_timezone'] = [ @@ -137,7 +137,7 @@ class RegionalForm extends ConfigFormBase { DRUPAL_USER_TIMEZONE_EMPTY => t('Empty time zone'), DRUPAL_USER_TIMEZONE_SELECT => t('Users may set their own time zone at registration'), ], - '#description' => t('Only applied if users may set their own time zone.') + '#description' => t('Only applied if users may set their own time zone.'), ]; return parent::buildForm($form, $form_state); diff --git a/core/modules/system/src/Form/RssFeedsForm.php b/core/modules/system/src/Form/RssFeedsForm.php index d7508e63fce..95c7b42d665 100644 --- a/core/modules/system/src/Form/RssFeedsForm.php +++ b/core/modules/system/src/Form/RssFeedsForm.php @@ -35,7 +35,7 @@ class RssFeedsForm extends ConfigFormBase { '#type' => 'textarea', '#title' => t('Feed description'), '#default_value' => $rss_config->get('channel.description'), - '#description' => t('Description of your site, included in each feed.') + '#description' => t('Description of your site, included in each feed.'), ]; $options = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30]; $form['feed_default_items'] = [ @@ -43,7 +43,7 @@ class RssFeedsForm extends ConfigFormBase { '#title' => t('Number of items in each feed'), '#default_value' => $rss_config->get('items.limit'), '#options' => array_combine($options, $options), - '#description' => t('Default number of items to include in each feed.') + '#description' => t('Default number of items to include in each feed.'), ]; $form['feed_view_mode'] = [ '#type' => 'select', @@ -54,7 +54,7 @@ class RssFeedsForm extends ConfigFormBase { 'teaser' => t('Titles plus teaser'), 'fulltext' => t('Full text'), ], - '#description' => t('Global setting for the default display of content items in each feed.') + '#description' => t('Global setting for the default display of content items in each feed.'), ]; return parent::buildForm($form, $form_state); diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php index aeecb989f72..907e5ce3d2d 100644 --- a/core/modules/system/src/Form/ThemeSettingsForm.php +++ b/core/modules/system/src/Form/ThemeSettingsForm.php @@ -136,11 +136,11 @@ class ThemeSettingsForm extends ConfigFormBase { $form['var'] = [ '#type' => 'hidden', - '#value' => $var + '#value' => $var, ]; $form['config_key'] = [ '#type' => 'hidden', - '#value' => $config_key + '#value' => $config_key, ]; // Toggle settings diff --git a/core/modules/system/src/Tests/Ajax/DialogTest.php b/core/modules/system/src/Tests/Ajax/DialogTest.php index 90c548b6303..76ab6fb160f 100644 --- a/core/modules/system/src/Tests/Ajax/DialogTest.php +++ b/core/modules/system/src/Tests/Ajax/DialogTest.php @@ -114,7 +114,7 @@ class DialogTest extends AjaxTestBase { ], [], 'ajax-test/dialog-contents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_dialog']], [], NULL, [ 'submit' => [ 'dialogOptions[target]' => 'ajax-test-dialog-wrapper-1', - ] + ], ]); $this->assertEqual($normal_expected_response, $ajax_result[3], 'Normal dialog JSON response matches.'); @@ -126,7 +126,7 @@ class DialogTest extends AjaxTestBase { 'textfield' => 'test', ], [], 'ajax-test/dialog-contents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_dialog']], [], NULL, [ // Don't send a target. - 'submit' => [] + 'submit' => [], ]); // Make sure the selector ID starts with the right string. $this->assert(strpos($ajax_result[3]['selector'], $no_target_expected_response['selector']) === 0, 'Selector starts with right string.'); diff --git a/core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php b/core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php index 9af773b86cd..5ad960a9f0b 100644 --- a/core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php +++ b/core/modules/system/src/Tests/Common/SimpleTestErrorCollectorTest.php @@ -74,7 +74,7 @@ class SimpleTestErrorCollectorTest extends WebTestBase { $this->collectedErrors[] = [ 'message' => $message, 'group' => $group, - 'caller' => $caller + 'caller' => $caller, ]; } } diff --git a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php index bb57c31ba12..41fd896dfe1 100644 --- a/core/modules/system/src/Tests/Path/UrlAliasFixtures.php +++ b/core/modules/system/src/Tests/Path/UrlAliasFixtures.php @@ -51,23 +51,23 @@ class UrlAliasFixtures { [ 'source' => '/node/1', 'alias' => '/alias_for_node_1_en', - 'langcode' => 'en' + 'langcode' => 'en', ], [ 'source' => '/node/2', 'alias' => '/alias_for_node_2_en', - 'langcode' => 'en' + 'langcode' => 'en', ], [ 'source' => '/node/1', 'alias' => '/alias_for_node_1_fr', - 'langcode' => 'fr' + 'langcode' => 'fr', ], [ 'source' => '/node/1', 'alias' => '/alias_for_node_1_und', - 'langcode' => 'und' - ] + 'langcode' => 'und', + ], ]; } diff --git a/core/modules/system/src/Tests/Session/SessionTest.php b/core/modules/system/src/Tests/Session/SessionTest.php index 1be9561b36f..0f219c5036b 100644 --- a/core/modules/system/src/Tests/Session/SessionTest.php +++ b/core/modules/system/src/Tests/Session/SessionTest.php @@ -57,7 +57,7 @@ class SessionTest extends WebTestBase { // session_test_user_login() which breaks a normal assertion. $edit = [ 'name' => $user->getUsername(), - 'pass' => $user->pass_raw + 'pass' => $user->pass_raw, ]; $this->drupalPostForm('user/login', $edit, t('Log in')); $this->drupalGet('user'); diff --git a/core/modules/system/src/Tests/System/HtaccessTest.php b/core/modules/system/src/Tests/System/HtaccessTest.php index fab7a37a34d..ab1840c6550 100644 --- a/core/modules/system/src/Tests/System/HtaccessTest.php +++ b/core/modules/system/src/Tests/System/HtaccessTest.php @@ -75,7 +75,7 @@ class HtaccessTest extends WebTestBase { // Test extensions that should be permitted. $file_exts_to_allow = [ - 'php-info.txt' + 'php-info.txt', ]; foreach ($file_exts_to_allow as $file_ext) { @@ -108,7 +108,7 @@ class HtaccessTest extends WebTestBase { $node = $this->drupalCreateNode([ 'title' => 'This is a node', 'type' => $type->id(), - 'path' => '/test.php' + 'path' => '/test.php', ]); $node->save(); $this->drupalGet('test.php'); diff --git a/core/modules/system/src/Tests/Theme/FunctionsTest.php b/core/modules/system/src/Tests/Theme/FunctionsTest.php index ca40577cc6c..6cc28fef17c 100644 --- a/core/modules/system/src/Tests/Theme/FunctionsTest.php +++ b/core/modules/system/src/Tests/Theme/FunctionsTest.php @@ -209,7 +209,7 @@ class FunctionsTest extends WebTestBase { 'url' => Url::fromRoute('router_test.1'), 'query' => [ 'key' => 'value', - ] + ], ], ]; @@ -330,7 +330,7 @@ class FunctionsTest extends WebTestBase { 'url' => Url::fromRoute('router_test.1'), 'query' => [ 'key' => 'value', - ] + ], ], ]; diff --git a/core/modules/system/src/Tests/Theme/TwigTransTest.php b/core/modules/system/src/Tests/Theme/TwigTransTest.php index b73cdaf0c24..5cd34b6bd9e 100644 --- a/core/modules/system/src/Tests/Theme/TwigTransTest.php +++ b/core/modules/system/src/Tests/Theme/TwigTransTest.php @@ -21,7 +21,7 @@ class TwigTransTest extends WebTestBase { 'theme_test', 'twig_theme_test', 'locale', - 'language' + 'language', ]; /** @@ -56,7 +56,7 @@ class TwigTransTest extends WebTestBase { 'administer languages', 'access administration pages', 'administer site configuration', - 'translate interface' + 'translate interface', ]); $this->drupalLogin($this->adminUser); diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 7951ecd21f8..ca1e02c9864 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -27,7 +27,7 @@ function hook_system_themes_page_alter(&$theme_groups) { $theme->operations[] = [ 'title' => t('Foo'), 'url' => Url::fromRoute('system.themes_page'), - 'query' => ['theme' => $theme->getName()] + 'query' => ['theme' => $theme->getName()], ]; } } diff --git a/core/modules/system/system.install b/core/modules/system/system.install index a7f964539f2..2ab05c5d80c 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -51,10 +51,10 @@ function system_requirements($phase) { 'value' => t('%profile_name (%profile-%version)', [ '%profile_name' => $info['name'], '%profile' => $profile, - '%version' => $info['version'] + '%version' => $info['version'], ]), 'severity' => REQUIREMENT_INFO, - 'weight' => -9 + 'weight' => -9, ]; } diff --git a/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php b/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php index cb356768994..c19c6bb6646 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.block-context-manager-2354889.php @@ -47,7 +47,7 @@ $existing_blocks = unserialize($existing_blocks); $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2354889', 'block.block.secondtestfor2354889', 'block.block.thirdtestfor2354889'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2354889', 'block.block.secondtestfor2354889', 'block.block.thirdtestfor2354889'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:bartik') diff --git a/core/modules/system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php b/core/modules/system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php index 6cf44b17439..0fa97e44f64 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.local-actions-tasks-into-blocks-507488.php @@ -40,7 +40,7 @@ $existing_blocks = unserialize($existing_blocks); $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.seven_local_actions'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.seven_local_actions'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:seven') @@ -55,7 +55,7 @@ $extensions = $connection->select('config') $extensions = unserialize($extensions); $connection->update('config') ->fields([ - 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])) + 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])), ]) ->condition('name', 'core.extension') ->execute(); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.page-title-into-block-2476947.php b/core/modules/system/tests/fixtures/update/drupal-8.page-title-into-block-2476947.php index 766e9a6037f..b51dbe8a0a3 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.page-title-into-block-2476947.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.page-title-into-block-2476947.php @@ -40,7 +40,7 @@ $existing_blocks = unserialize($existing_blocks); $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_page_title'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_page_title'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:bartik') @@ -55,7 +55,7 @@ $extensions = $connection->select('config') $extensions = unserialize($extensions); $connection->update('config') ->fields([ - 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])) + 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])), ]) ->condition('name', 'core.extension') ->execute(); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php b/core/modules/system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php index 63582dc3890..97c1b7bd993 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.seven-secondary-local-tasks-block-2569529.php @@ -40,7 +40,7 @@ $existing_blocks = unserialize($existing_blocks); $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.seven_secondary_local_tasks'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.seven_secondary_local_tasks'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:seven') diff --git a/core/modules/system/tests/fixtures/update/drupal-8.site-branding-into-block-2005546.php b/core/modules/system/tests/fixtures/update/drupal-8.site-branding-into-block-2005546.php index cd593723c9f..050dd38271c 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.site-branding-into-block-2005546.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.site-branding-into-block-2005546.php @@ -40,7 +40,7 @@ $existing_blocks = unserialize($existing_blocks); $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_branding'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_branding'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:bartik') @@ -55,7 +55,7 @@ $extensions = $connection->select('config') $extensions = unserialize($extensions); $connection->update('config') ->fields([ - 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])) + 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])), ]) ->condition('name', 'core.extension') ->execute(); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php b/core/modules/system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php index 7b658b41784..537ecf1bac3 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.stable-base-theme-2575421.php @@ -19,7 +19,7 @@ $extensions = $connection->select('config') $extensions = unserialize($extensions); $connection->update('config') ->fields([ - 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_stable' => 0]])) + 'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_stable' => 0]])), ]) ->condition('name', 'core.extension') ->execute(); diff --git a/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php b/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php index fa394473d73..cf5f9dfebeb 100644 --- a/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php +++ b/core/modules/system/tests/fixtures/update/drupal-8.update-test-block-disabled-2513534.php @@ -43,7 +43,7 @@ $existing_blocks = unserialize($existing_blocks); $connection->update('key_value') ->fields([ - 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2513534', 'block.block.secondtestfor2513534'])) + 'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2513534', 'block.block.secondtestfor2513534'])), ]) ->condition('collection', 'config.entity.key_store.block') ->condition('name', 'theme:bartik') diff --git a/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php b/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php index 5ba65e8013a..a34d288ff80 100644 --- a/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php +++ b/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php @@ -139,7 +139,7 @@ class AjaxTestController { 'data-dialog-type' => 'modal', 'data-dialog-options' => json_encode([ 'width' => 400, - ]) + ]), ], ], 'link3' => [ @@ -151,7 +151,7 @@ class AjaxTestController { 'data-dialog-options' => json_encode([ 'target' => 'ajax-test-dialog-wrapper-1', 'width' => 800, - ]) + ]), ], ], 'link4' => [ @@ -179,7 +179,7 @@ class AjaxTestController { 'data-dialog-options' => json_encode([ 'width' => 800, 'height' => 500, - ]) + ]), ], ], 'link7' => [ @@ -190,7 +190,7 @@ class AjaxTestController { 'data-dialog-type' => 'dialog', 'data-dialog-options' => json_encode([ 'width' => 800, - ]) + ]), ], ], 'link8' => [ diff --git a/core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php b/core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php index eafe8a98a7a..a0b60606724 100644 --- a/core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php +++ b/core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestDialogForm.php @@ -31,7 +31,7 @@ class AjaxTestDialogForm extends FormBase { // to have a dummy field we can set in WebTestBase::drupalPostForm() else it won't // submit anything. $form['textfield'] = [ - '#type' => 'hidden' + '#type' => 'hidden', ]; $form['button1'] = [ '#type' => 'submit', diff --git a/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php b/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php index 1d34f8a4592..9a5951e6d39 100644 --- a/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php +++ b/core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php @@ -19,7 +19,7 @@ class BatchTestController { return [ 'success' => [ '#markup' => 'Redirection successful.', - ] + ], ]; } @@ -103,7 +103,7 @@ class BatchTestController { return [ 'success' => [ '#markup' => 'Got out of a programmatic batched form.', - ] + ], ]; } diff --git a/core/modules/system/tests/modules/database_test/database_test.install b/core/modules/system/tests/modules/database_test/database_test.install index b4e3ca56325..a5450b10648 100644 --- a/core/modules/system/tests/modules/database_test/database_test.install +++ b/core/modules/system/tests/modules/database_test/database_test.install @@ -47,7 +47,7 @@ function database_test_schema() { ], 'primary key' => ['id'], 'unique keys' => [ - 'name' => ['name'] + 'name' => ['name'], ], 'indexes' => [ 'ages' => ['age'], @@ -148,7 +148,7 @@ function database_test_schema() { ], 'blob2' => [ 'description' => 'A second BLOB field.', - 'type' => 'blob' + 'type' => 'blob', ], ], 'primary key' => ['id'], @@ -212,7 +212,7 @@ function database_test_schema() { ], 'primary key' => ['id'], 'unique keys' => [ - 'name' => ['name'] + 'name' => ['name'], ], 'indexes' => [ 'ages' => ['age'], @@ -242,7 +242,7 @@ function database_test_schema() { ], 'primary key' => ['id'], 'unique keys' => [ - 'name' => ['name'] + 'name' => ['name'], ], ]; diff --git a/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php index 9ba11b7733e..2a6b83965ec 100644 --- a/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php +++ b/core/modules/system/tests/modules/early_rendering_controller_test/src/EarlyRenderingTestController.php @@ -62,7 +62,7 @@ class EarlyRenderingTestController extends ControllerBase { '#pre_render' => [function () { $elements = $this->earlyRenderContent(); return $elements; - } + }, ], ]; } diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module index d7dc6351467..f98ae10b044 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.module +++ b/core/modules/system/tests/modules/entity_test/entity_test.module @@ -306,7 +306,7 @@ function entity_test_entity_extra_field_info() { 'description' => t('An extra field on the display side, hidden by default.'), 'visible' => FALSE, ], - ] + ], ]; return $extra; diff --git a/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php b/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php index ae5dd3039d9..6283bc3cea9 100644 --- a/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php +++ b/core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldWidget/ShapeOnlyColorEditableWidget.php @@ -25,7 +25,7 @@ class ShapeOnlyColorEditableWidget extends WidgetBase { public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) { $element['shape'] = [ '#type' => 'hidden', - '#value' => $items[$delta]->shape + '#value' => $items[$delta]->shape, ]; $element['color'] = [ diff --git a/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php b/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php index dd526b863a9..2ba4869d8ad 100644 --- a/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php +++ b/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php @@ -88,7 +88,7 @@ class ErrorTestController extends ControllerBase { '#post_render' => [ function () { throw new \Exception('This is an exception that occurs during rendering'); - } + }, ], ]; } diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php index ee287f4ced3..121cd31aea3 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestMachineNameForm.php @@ -33,7 +33,7 @@ class FormTestMachineNameForm extends FormBase { '#title' => 'Machine name 1', '#description' => 'A machine name.', '#machine_name' => [ - 'source' => ['machine_name_1_label'] + 'source' => ['machine_name_1_label'], ], ]; $form['machine_name_2_label'] = [ @@ -45,7 +45,7 @@ class FormTestMachineNameForm extends FormBase { '#title' => 'Machine name 2', '#description' => 'Another machine name.', '#machine_name' => [ - 'source' => ['machine_name_2_label'] + 'source' => ['machine_name_2_label'], ], ]; $form['submit'] = [ diff --git a/core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php b/core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php index 1bc25bb557a..3197aa5bef6 100644 --- a/core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php +++ b/core/modules/system/tests/modules/js_webassert_test/src/Form/JsWebAssertTestForm.php @@ -135,7 +135,7 @@ class JsWebAssertTestForm extends FormBase { $form['added_link'] = [ '#title' => 'Added link', '#type' => 'link', - '#url' => Url::fromRoute('js_webassert_test.js_webassert_test_form') + '#url' => Url::fromRoute('js_webassert_test.js_webassert_test_form'), ]; return $form; } diff --git a/core/modules/system/tests/modules/menu_test/src/TestControllers.php b/core/modules/system/tests/modules/menu_test/src/TestControllers.php index ca0f8d68544..dafaab0e511 100644 --- a/core/modules/system/tests/modules/menu_test/src/TestControllers.php +++ b/core/modules/system/tests/modules/menu_test/src/TestControllers.php @@ -77,9 +77,9 @@ class TestControllers { '#contextual_links' => [ 'menu_test_menu' => [ 'route_parameters' => ['bar' => 1], - ] - ] - ] + ], + ], + ], ]; } diff --git a/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php b/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php index 3253b0c9bd0..4f1fdad6431 100644 --- a/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php +++ b/core/modules/system/tests/modules/pager_test/src/Controller/PagerTestController.php @@ -69,7 +69,7 @@ class PagerTestController extends ControllerBase { ], '#pre_render' => [ 'Drupal\pager_test\Controller\PagerTestController::showPagerCacheContext', - ] + ], ]; return $build; diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php index d5f6d6c2937..b8aedac36a5 100644 --- a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php +++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php @@ -45,7 +45,7 @@ class MockMenuBlockDeriver implements DeriverInterface { // Instead of the derivative label, the specific label will be used. 'label' => t('Derivative label'), // This setting will be merged in. - 'setting' => 'default' + 'setting' => 'default', ] + $base_plugin_definition, ]; diff --git a/core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php b/core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php index c15b16d8b0b..c51d3c89835 100644 --- a/core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php +++ b/core/modules/system/tests/modules/twig_extension_test/src/TwigExtensionTestController.php @@ -20,8 +20,8 @@ class TwigExtensionTestController { '#safe_join_items' => [ 'will be escaped', $this->t('will be markup'), - ['#markup' => 'will be rendered'] - ] + ['#markup' => 'will be rendered'], + ], ]; } diff --git a/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php b/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php index 8e1f69e7922..1e995c58f75 100644 --- a/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php +++ b/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php @@ -100,7 +100,7 @@ class TwigThemeTestController { public function renderable() { return [ '#theme' => 'twig_theme_test_renderable', - '#renderable' => new ExampleRenderable() + '#renderable' => new ExampleRenderable(), ]; } diff --git a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php index d2114fdf8ec..488fa6ef42e 100644 --- a/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php +++ b/core/modules/system/tests/src/Functional/Datetime/DrupalDateTimeTest.php @@ -33,7 +33,7 @@ class DrupalDateTimeTest extends BrowserTestBase { $options = [ 'query' => [ 'date' => 'Tue+Sep+17+2013+21%3A35%3A31+GMT%2B0100+(BST)#', - ] + ], ]; // Query the AJAX Timezone Callback with a long-format date. $response = $this->drupalGet('system/timezone/BST/3600/1', $options); diff --git a/core/modules/system/tests/src/Functional/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php b/core/modules/system/tests/src/Functional/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php index b4888db0985..2c501acb012 100644 --- a/core/modules/system/tests/src/Functional/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php +++ b/core/modules/system/tests/src/Functional/Entity/Update/MoveRevisionMetadataFieldsUpdateTest.php @@ -141,7 +141,7 @@ class MoveRevisionMetadataFieldsUpdateTest extends UpdatePathTestBase { $revision_metadata_keys = [ 'revision_user' => 'revision_user', 'revision_created' => 'revision_created', - 'revision_log_message' => 'revision_log_message' + 'revision_log_message' => 'revision_log_message', ]; $this->assertEquals($revision_metadata_keys, $entity_type->getRevisionMetadataKeys(TRUE)); @@ -167,7 +167,7 @@ class MoveRevisionMetadataFieldsUpdateTest extends UpdatePathTestBase { $definition = [ 'id' => 'entity_test_mul_revlog', 'revision_metadata_keys' => [ - 'revision_default' => 'revision_default' + 'revision_default' => 'revision_default', ], ]; $entity_type = new ContentEntityType($definition); diff --git a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php index 04b1f663614..a4fbb667bad 100644 --- a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php +++ b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php @@ -28,11 +28,11 @@ class FileTransferTest extends BrowserTestBase { 'fake.module', 'fake.info.yml', 'theme' => [ - 'fake.html.twig' + 'fake.html.twig', ], 'inc' => [ - 'fake.inc' - ] + 'fake.inc', + ], ]; return $files; } diff --git a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php index 1bfa19f482f..2262670f2bd 100644 --- a/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php +++ b/core/modules/system/tests/src/Functional/Form/LanguageSelectElementTest.php @@ -45,7 +45,7 @@ class LanguageSelectElementTest extends BrowserTestBase { 'edit-languages-all' => LanguageInterface::STATE_ALL, 'edit-languages-configurable' => LanguageInterface::STATE_CONFIGURABLE, 'edit-languages-locked' => LanguageInterface::STATE_LOCKED, - 'edit-languages-config-and-locked' => LanguageInterface::STATE_CONFIGURABLE | LanguageInterface::STATE_LOCKED + 'edit-languages-config-and-locked' => LanguageInterface::STATE_CONFIGURABLE | LanguageInterface::STATE_LOCKED, ]; foreach ($ids as $id => $flags) { $this->assertField($id, format_string('The @id field was found on the page.', ['@id' => $id])); diff --git a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php index 6f5dc7da684..586b1c93b2b 100644 --- a/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php +++ b/core/modules/system/tests/src/Functional/Render/AjaxPageStateTest.php @@ -67,9 +67,9 @@ class AjaxPageStateTest extends BrowserTestBase { "query" => [ 'ajax_page_state' => [ - 'libraries' => 'core/html5shiv' - ] - ] + 'libraries' => 'core/html5shiv', + ], + ], ] ); $this->assertNoRaw( diff --git a/core/modules/system/tests/src/Functional/Update/RecalculatedDependencyTest.php b/core/modules/system/tests/src/Functional/Update/RecalculatedDependencyTest.php index 6eb51a2a512..fd9caf52a5c 100644 --- a/core/modules/system/tests/src/Functional/Update/RecalculatedDependencyTest.php +++ b/core/modules/system/tests/src/Functional/Update/RecalculatedDependencyTest.php @@ -58,7 +58,7 @@ class RecalculatedDependencyTest extends UpdatePathTestBase { $this->assertEqual([ 'field.storage.node.field_tags', 'node.type.article', - 'taxonomy.vocabulary.tags' + 'taxonomy.vocabulary.tags', ], $data['dependencies']['config']); $data = \Drupal::config('field.field.user.user.user_picture')->get(); diff --git a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php index 663bff6bae7..7a6d6685e9e 100644 --- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php +++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php @@ -162,13 +162,13 @@ class SystemMenuBlockTest extends KernelTestBase { $dependencies = $block->calculateDependencies()->getDependencies(); $expected = [ 'config' => [ - 'system.menu.' . $this->menu->id() + 'system.menu.' . $this->menu->id(), ], 'module' => [ - 'system' + 'system', ], 'theme' => [ - 'stark' + 'stark', ], ]; $this->assertIdentical($expected, $dependencies); @@ -247,7 +247,7 @@ class SystemMenuBlockTest extends KernelTestBase { 'test.example2' => [ 'test.example3' => [ 'test.example4' => [], - ] + ], ], 'test.example5' => [ 'test.example7' => [], diff --git a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php index 03d22afe578..28d056cecd9 100644 --- a/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php +++ b/core/modules/system/tests/src/Kernel/Form/ProgrammaticTest.php @@ -95,7 +95,7 @@ class ProgrammaticTest extends KernelTestBase { public function testProgrammaticAccessBypass() { $form_state = (new FormState())->setValues([ 'textfield' => 'dummy value', - 'field_restricted' => 'dummy value' + 'field_restricted' => 'dummy value', ]); // Programmatically submit the form with a value for the restricted field. diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php index cb7f5eb7c4e..f111d7b36f8 100644 --- a/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php +++ b/core/modules/system/tests/src/Kernel/Scripts/DbCommandBaseTest.php @@ -35,7 +35,7 @@ class DbCommandBaseTest extends KernelTestBase { Database::addConnectionInfo('magic_db', 'default', Database::getConnectionInfo('default')['default']); $command_tester->execute([ - '--database' => 'magic_db' + '--database' => 'magic_db', ]); $this->assertEquals('magic_db', $command->getDatabaseConnection($command_tester->getInput())->getKey(), 'Special db key is returned'); @@ -48,7 +48,7 @@ class DbCommandBaseTest extends KernelTestBase { $command = new DbCommandBaseTester(); $command_tester = new CommandTester($command); $command_tester->execute([ - '--database' => 'dne' + '--database' => 'dne', ]); $this->setExpectedException(ConnectionNotDefinedException::class); $command->getDatabaseConnection($command_tester->getInput()); @@ -63,13 +63,13 @@ class DbCommandBaseTest extends KernelTestBase { $command = new DbCommandBaseTester(); $command_tester = new CommandTester($command); $command_tester->execute([ - '-db-url' => $connection_info['driver'] . '://' . $connection_info['username'] . ':' . $connection_info['password'] . '@' . $connection_info['host'] . '/' . $connection_info['database'] + '-db-url' => $connection_info['driver'] . '://' . $connection_info['username'] . ':' . $connection_info['password'] . '@' . $connection_info['host'] . '/' . $connection_info['database'], ]); $this->assertEquals('db-tools', $command->getDatabaseConnection($command_tester->getInput())->getKey()); Database::removeConnection('db-tools'); $command_tester->execute([ - '--database-url' => $connection_info['driver'] . '://' . $connection_info['username'] . ':' . $connection_info['password'] . '@' . $connection_info['host'] . '/' . $connection_info['database'] + '--database-url' => $connection_info['driver'] . '://' . $connection_info['username'] . ':' . $connection_info['password'] . '@' . $connection_info['host'] . '/' . $connection_info['database'], ]); $this->assertEquals('db-tools', $command->getDatabaseConnection($command_tester->getInput())->getKey()); } diff --git a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php index a3c5730b325..a4e5bcc3e7e 100644 --- a/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php +++ b/core/modules/system/tests/src/Unit/Menu/MenuLinkTreeTest.php @@ -134,7 +134,7 @@ class MenuLinkTreeTest extends UnitTestCase { '#theme' => 'menu__mock', '#items' => [ // To be filled when generating test cases, using $get_built_element(). - ] + ], ]; $get_built_element = function (MenuLinkTreeElement $element) { @@ -248,10 +248,10 @@ class MenuLinkTreeTest extends UnitTestCase { new MenuLinkTreeElement($multi_level_root_a, TRUE, 0, FALSE, [ new MenuLinkTreeElement($multi_level_parent_c, TRUE, 0, FALSE, [ new MenuLinkTreeElement($links[0], FALSE, 0, FALSE, []), - ]) + ]), ]), new MenuLinkTreeElement($multi_level_root_b, TRUE, 0, FALSE, [ - new MenuLinkTreeElement($links[1], FALSE, 1, FALSE, []) + new MenuLinkTreeElement($links[1], FALSE, 1, FALSE, []), ]), ]; $tree[0]->subtree[0]->subtree[0]->access = $access; diff --git a/core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php b/core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php index 9d97a55f11f..a312111eabe 100644 --- a/core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php +++ b/core/modules/taxonomy/src/Plugin/EntityReferenceSelection/TermSelection.php @@ -28,7 +28,7 @@ class TermSelection extends DefaultSelection { 'sort' => [ 'field' => 'name', 'direction' => 'asc', - ] + ], ] + parent::defaultConfiguration(); } diff --git a/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php b/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php index 185990185d6..82048a3c2f8 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php +++ b/core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php @@ -43,7 +43,7 @@ class Vocabulary extends DrupalSqlBase { 'hierarchy' => $this->t('The type of hierarchy allowed within the vocabulary. (0 = disabled, 1 = single, 2 = multiple)'), 'module' => $this->t('Module responsible for the vocabulary.'), 'weight' => $this->t('The weight of the vocabulary in relation to other vocabularies.'), - 'machine_name' => $this->t('Unique machine name of the vocabulary.') + 'machine_name' => $this->t('Unique machine name of the vocabulary.'), ]; } diff --git a/core/modules/taxonomy/src/TermViewsData.php b/core/modules/taxonomy/src/TermViewsData.php index 6d47f3ffb6b..469c3e83583 100644 --- a/core/modules/taxonomy/src/TermViewsData.php +++ b/core/modules/taxonomy/src/TermViewsData.php @@ -61,7 +61,7 @@ class TermViewsData extends EntityViewsData { 'argument field' => 'tid', 'base' => 'node_field_data', 'field' => 'nid', - 'relationship' => 'node_field_data:term_node_tid' + 'relationship' => 'node_field_data:term_node_tid', ], ]; @@ -216,7 +216,7 @@ class TermViewsData extends EntityViewsData { 'title' => $this->t('Post date'), 'help' => $this->t('The date the content related to a term was posted.'), 'sort' => [ - 'id' => 'date' + 'id' => 'date', ], 'filter' => [ 'id' => 'date', diff --git a/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php b/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php index 00f0ee784b6..ce28b1285d7 100644 --- a/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php +++ b/core/modules/taxonomy/src/Tests/TermAutocompleteTest.php @@ -188,7 +188,7 @@ class TermAutocompleteTest extends TaxonomyTestBase { foreach ($expectedResults as $termName) { $expected[] = [ 'value' => $termName . ' (' . $this->termIds[$termName] . ')', - 'label' => $termName + 'label' => $termName, ]; } diff --git a/core/modules/taxonomy/src/VocabularyListBuilder.php b/core/modules/taxonomy/src/VocabularyListBuilder.php index 7ae420f12d7..b6f6921db43 100644 --- a/core/modules/taxonomy/src/VocabularyListBuilder.php +++ b/core/modules/taxonomy/src/VocabularyListBuilder.php @@ -177,7 +177,7 @@ class VocabularyListBuilder extends DraggableListBuilder { $this->renderer->addCacheableDependency($build['table'], $create_access); if ($create_access->isAllowed()) { $build['table']['#empty'] = t('No vocabularies available. Add vocabulary.', [ - ':link' => Url::fromRoute('entity.taxonomy_vocabulary.add_form')->toString() + ':link' => Url::fromRoute('entity.taxonomy_vocabulary.add_form')->toString(), ]); } else { diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php index 4de73705d99..992e5bee18c 100644 --- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php @@ -199,7 +199,7 @@ class TaxonomyIndexTidUiTest extends UITestBase { // Select 'Term' and 'Vocabulary' as filters. $edit = [ 'name[taxonomy_term_field_data.tid]' => TRUE, - 'name[taxonomy_term_field_data.vid]' => TRUE + 'name[taxonomy_term_field_data.vid]' => TRUE, ]; $this->drupalPostForm('admin/structure/views/nojs/add-handler/test_taxonomy_term_name/default/filter', $edit, 'Add and configure filter criteria'); // Select 'Empty Vocabulary' and 'Autocomplete' from the list of options. diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php index f7c2f7c1e23..7803f3966e7 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyCrudTest.php @@ -148,7 +148,7 @@ class VocabularyCrudTest extends TaxonomyTestBase { 'field_name' => $field_name, 'entity_type' => 'taxonomy_term', 'type' => 'text', - 'cardinality' => 4 + 'cardinality' => 4, ]; FieldStorageConfig::create($storage_definition)->save(); $field_definition = [ diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php index 474969dde1f..4a8b1538f3a 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php @@ -47,7 +47,7 @@ class MigrateTaxonomyTermTest extends MigrateDrupal7TestBase { 'd7_field', 'd7_taxonomy_vocabulary', 'd7_field_instance', - 'd7_taxonomy_term' + 'd7_taxonomy_term', ]); } diff --git a/core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php b/core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php index f2aa1ccddea..17fc9d5e42a 100644 --- a/core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php +++ b/core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php @@ -67,7 +67,7 @@ class TelephoneItem extends FieldItemBase { 'Length' => [ 'max' => $max_length, 'maxMessage' => t('%name: the telephone number may not be longer than @max characters.', ['%name' => $this->getFieldDefinition()->getLabel(), '@max' => $max_length]), - ] + ], ], ]); diff --git a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php index 18bedf0725e..75e626f66dd 100644 --- a/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php +++ b/core/modules/telephone/tests/src/Functional/TelephoneFieldTest.php @@ -21,7 +21,7 @@ class TelephoneFieldTest extends BrowserTestBase { public static $modules = [ 'field', 'node', - 'telephone' + 'telephone', ]; /** diff --git a/core/modules/text/src/Plugin/Field/FieldType/TextItem.php b/core/modules/text/src/Plugin/Field/FieldType/TextItem.php index 447a0b180d5..dcee58346d1 100644 --- a/core/modules/text/src/Plugin/Field/FieldType/TextItem.php +++ b/core/modules/text/src/Plugin/Field/FieldType/TextItem.php @@ -62,7 +62,7 @@ class TextItem extends TextItemBase { 'Length' => [ 'max' => $max_length, 'maxMessage' => t('%name: the text may not be longer than @max characters.', ['%name' => $this->getFieldDefinition()->getLabel(), '@max' => $max_length]), - ] + ], ], ]); } diff --git a/core/modules/text/src/Tests/TextFieldTest.php b/core/modules/text/src/Tests/TextFieldTest.php index 52286a63ac9..ecdb0af06d4 100644 --- a/core/modules/text/src/Tests/TextFieldTest.php +++ b/core/modules/text/src/Tests/TextFieldTest.php @@ -43,7 +43,7 @@ class TextFieldTest extends StringFieldTest { 'type' => 'text', 'settings' => [ 'max_length' => $max_length, - ] + ], ]); $field_storage->save(); FieldConfig::create([ @@ -89,7 +89,7 @@ class TextFieldTest extends StringFieldTest { $field_storage = FieldStorageConfig::create([ 'field_name' => $file_field_name, 'entity_type' => 'entity_test', - 'type' => 'file' + 'type' => 'file', ]); $field_storage->save(); FieldConfig::create([ @@ -116,7 +116,7 @@ class TextFieldTest extends StringFieldTest { $this->drupalPostForm('entity_test/add', $edit, 'Upload'); $this->assertResponse(200); $edit = [ - 'text_long[0][value]' => 'Long text' + 'text_long[0][value]' => 'Long text', ]; $this->drupalPostForm(NULL, $edit, 'Save'); $this->assertResponse(200); @@ -152,7 +152,7 @@ class TextFieldTest extends StringFieldTest { $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', - 'type' => $field_type + 'type' => $field_type, ]); $field_storage->save(); FieldConfig::create([ diff --git a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php index 1f4a5bfdfed..c110ba10498 100644 --- a/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php +++ b/core/modules/text/tests/src/Kernel/TextWithSummaryItemTest.php @@ -105,7 +105,7 @@ class TextWithSummaryItemTest extends FieldKernelTestBase { 'type' => 'text_with_summary', 'settings' => [ 'max_length' => 10, - ] + ], ]); $this->fieldStorage->save(); $this->field = FieldConfig::create([ diff --git a/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php index 2273c186bfb..51ec9af9c83 100644 --- a/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php +++ b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php @@ -76,7 +76,7 @@ class TextCckTest extends UnitTestCase { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo\nbar", - ] + ], ]; $this->plugin->processCckFieldValues($this->migration, 'field', $info); @@ -101,7 +101,7 @@ class TextCckTest extends UnitTestCase { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo|Foo\nbaz|Baz", - ] + ], ]; $this->plugin->processCckFieldValues($this->migration, 'field', $info); diff --git a/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php index 8bf5d2a2d07..e17404e0488 100644 --- a/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php @@ -76,7 +76,7 @@ class TextFieldTest extends UnitTestCase { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo\nbar", - ] + ], ]; $this->plugin->processFieldValues($this->migration, 'field', $info); @@ -101,7 +101,7 @@ class TextFieldTest extends UnitTestCase { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo|Foo\nbaz|Baz", - ] + ], ]; $this->plugin->processFieldValues($this->migration, 'field', $info); diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php index acd77909e44..696c34cba32 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php @@ -76,7 +76,7 @@ class TextCckTest extends UnitTestCase { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo\nbar", - ] + ], ]; $this->plugin->processCckFieldValues($this->migration, 'field', $info); @@ -101,7 +101,7 @@ class TextCckTest extends UnitTestCase { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo|Foo\nbaz|Baz", - ] + ], ]; $this->plugin->processCckFieldValues($this->migration, 'field', $info); diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php index b79a0b5c3ed..4cc1badc645 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php @@ -75,7 +75,7 @@ class TextFieldTest extends UnitTestCase { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo\nbar", - ] + ], ]; $this->plugin->processFieldValues($this->migration, 'field', $info); @@ -100,7 +100,7 @@ class TextFieldTest extends UnitTestCase { 'widget_type' => 'optionwidgets_onoff', 'global_settings' => [ 'allowed_values' => "foo|Foo\nbaz|Baz", - ] + ], ]; $this->plugin->processFieldValues($this->migration, 'field', $info); diff --git a/core/modules/tour/src/Tests/TourTest.php b/core/modules/tour/src/Tests/TourTest.php index 738bae8e2ae..05d3ae61688 100644 --- a/core/modules/tour/src/Tests/TourTest.php +++ b/core/modules/tour/src/Tests/TourTest.php @@ -66,7 +66,7 @@ class TourTest extends TourTestBase { $this->drupalPlaceBlock('local_actions_block', [ 'theme' => 'seven', - 'region' => 'content' + 'region' => 'content', ]); } diff --git a/core/modules/tour/tests/src/Functional/TourTest.php b/core/modules/tour/tests/src/Functional/TourTest.php index 55f3743f613..1db1bb8cae5 100644 --- a/core/modules/tour/tests/src/Functional/TourTest.php +++ b/core/modules/tour/tests/src/Functional/TourTest.php @@ -45,7 +45,7 @@ class TourTest extends TourTestBasic { $this->drupalPlaceBlock('local_actions_block', [ 'theme' => 'seven', - 'region' => 'content' + 'region' => 'content', ]); } @@ -130,7 +130,7 @@ class TourTest extends TourTestBasic { 'url' => 'http://local/image.png', 'weight' => 1, 'attributes' => [ - 'data-id' => 'tour-code-test-2' + 'data-id' => 'tour-code-test-2', ], ], ], diff --git a/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php b/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php index 7bd675b2ed1..9f2b0a758b0 100644 --- a/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php +++ b/core/modules/tracker/tests/src/Functional/Views/TrackerUserUidTest.php @@ -31,7 +31,7 @@ class TrackerUserUidTest extends TrackerTestBase { [ 'nid' => $this->node->id(), 'title' => $this->node->label(), - ] + ], ]; $view = Views::getView('test_tracker_user_uid'); diff --git a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php index 0318b8e7bd7..28d37726149 100644 --- a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php +++ b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerNodeTest.php @@ -30,7 +30,7 @@ class TrackerNodeTest extends MigrateSqlSourceTestBase { 'nid' => '2', 'published' => '1', 'changed' => '1421727536', - ] + ], ]; // The expected results are identical to the source data. diff --git a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php index ffcee93b56c..293e559a205 100644 --- a/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php +++ b/core/modules/tracker/tests/src/Kernel/Plugin/migrate/source/d7/TrackerUserTest.php @@ -31,7 +31,7 @@ class TrackerUserTest extends MigrateSqlSourceTestBase { 'uid' => '2', 'published' => '1', 'changed' => '1421727536', - ] + ], ]; // The expected results are identical to the source data. diff --git a/core/modules/tracker/tracker.views.inc b/core/modules/tracker/tracker.views.inc index 54402879dd5..be15d574785 100644 --- a/core/modules/tracker/tracker.views.inc +++ b/core/modules/tracker/tracker.views.inc @@ -173,7 +173,7 @@ function tracker_views_data_alter(&$data) { 'field' => 'uid', 'name table' => 'users_field_data', 'name field' => 'name', - 'id' => 'tracker_user_uid' + 'id' => 'tracker_user_uid', ], ]; } diff --git a/core/modules/update/src/Controller/UpdateController.php b/core/modules/update/src/Controller/UpdateController.php index 30b25c20642..6a8ec6abcbe 100644 --- a/core/modules/update/src/Controller/UpdateController.php +++ b/core/modules/update/src/Controller/UpdateController.php @@ -45,7 +45,7 @@ class UpdateController extends ControllerBase { */ public function updateStatus() { $build = [ - '#theme' => 'update_report' + '#theme' => 'update_report', ]; if ($available = update_get_available(TRUE)) { $this->moduleHandler()->loadInclude('update', 'compare.inc'); diff --git a/core/modules/update/src/UpdateSettingsForm.php b/core/modules/update/src/UpdateSettingsForm.php index ac8981cf49e..2a4e30d4896 100644 --- a/core/modules/update/src/UpdateSettingsForm.php +++ b/core/modules/update/src/UpdateSettingsForm.php @@ -95,7 +95,7 @@ class UpdateSettingsForm extends ConfigFormBase implements ContainerInjectionInt 'all' => t('All newer versions'), 'security' => t('Only security updates'), ], - '#description' => t('You can choose to send email only if a security update is available, or to be notified about all newer versions. If there are updates available of Drupal core or any of your installed modules and themes, your site will always print a message on the status report page, and will also display an error message on administration pages if there is a security update.', [':status_report' => $this->url('system.status')]) + '#description' => t('You can choose to send email only if a security update is available, or to be notified about all newer versions. If there are updates available of Drupal core or any of your installed modules and themes, your site will always print a message on the status report page, and will also display an error message on administration pages if there is a security update.', [':status_report' => $this->url('system.status')]), ]; return parent::buildForm($form, $form_state); diff --git a/core/modules/update/update.authorize.inc b/core/modules/update/update.authorize.inc index 1c2cc60fb2e..664f25f9c50 100644 --- a/core/modules/update/update.authorize.inc +++ b/core/modules/update/update.authorize.inc @@ -261,7 +261,7 @@ function update_authorize_update_batch_finished($success, $results) { 'absolute' => TRUE, 'base_url' => $GLOBALS['base_url'], ], - '#access' => $url->access(\Drupal::currentUser()) + '#access' => $url->access(\Drupal::currentUser()), ]; // Unset the variable since it is no longer needed. diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index 91864632dcf..e42093cf7a2 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -30,7 +30,7 @@ function template_preprocess_update_report(&$variables) { 'library' => [ 'update/drupal.update.admin', ], - ] + ], ]; // For no project update data, populate no data message. @@ -230,7 +230,7 @@ function template_preprocess_update_project_status(&$variables) { $extra_item['data'] = [ '#prefix' => '', '#markup' => $value['data'], - '#suffix' => '' + '#suffix' => '
                ', ]; $variables['extras'][] = $extra_item; } diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php index 9301f80e355..3624a9c934c 100644 --- a/core/modules/user/src/AccountForm.php +++ b/core/modules/user/src/AccountForm.php @@ -347,7 +347,7 @@ abstract class AccountForm extends ContentEntityForm { 'timezone', 'langcode', 'preferred_langcode', - 'preferred_admin_langcode' + 'preferred_admin_langcode', ], parent::getEditedFieldNames($form_state)); } @@ -365,7 +365,7 @@ abstract class AccountForm extends ContentEntityForm { 'timezone', 'langcode', 'preferred_langcode', - 'preferred_admin_langcode' + 'preferred_admin_langcode', ]; foreach ($violations->getByFields($field_names) as $violation) { list($field_name) = explode('.', $violation->getPropertyPath(), 2); diff --git a/core/modules/user/src/AccountSettingsForm.php b/core/modules/user/src/AccountSettingsForm.php index bd80dd7e297..4a1b5af4a4a 100644 --- a/core/modules/user/src/AccountSettingsForm.php +++ b/core/modules/user/src/AccountSettingsForm.php @@ -154,13 +154,13 @@ class AccountSettingsForm extends ConfigFormBase { USER_REGISTER_ADMINISTRATORS_ONLY => $this->t('Administrators only'), USER_REGISTER_VISITORS => $this->t('Visitors'), USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL => $this->t('Visitors, but administrator approval is required'), - ] + ], ]; $form['registration_cancellation']['user_email_verification'] = [ '#type' => 'checkbox', '#title' => $this->t('Require email verification when a visitor creates an account'), '#default_value' => $config->get('verify_mail'), - '#description' => $this->t('New users will be required to validate their email address prior to logging into the site, and will be assigned a system-generated password. With this setting disabled, users will be logged in immediately upon registering, and may select their own passwords during registration.') + '#description' => $this->t('New users will be required to validate their email address prior to logging into the site, and will be assigned a system-generated password. With this setting disabled, users will be logged in immediately upon registering, and may select their own passwords during registration.'), ]; $form['registration_cancellation']['user_password_strength'] = [ '#type' => 'checkbox', diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php index 7f4f4cdc78e..b8675866f6f 100644 --- a/core/modules/user/src/Entity/User.php +++ b/core/modules/user/src/Entity/User.php @@ -428,7 +428,7 @@ class User extends ContentEntityBase implements UserInterface { 'name' => [LanguageInterface::LANGCODE_DEFAULT => ''], // Explicitly set the langcode to ensure that field definitions do not // need to be fetched to figure out a default. - 'langcode' => [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED] + 'langcode' => [LanguageInterface::LANGCODE_DEFAULT => LanguageInterface::LANGCODE_NOT_SPECIFIED], ], $entity_type->id()); } return clone static::$anonymousUser; diff --git a/core/modules/user/src/Plugin/views/wizard/Users.php b/core/modules/user/src/Plugin/views/wizard/Users.php index 00b6863acae..6ba045f70d9 100644 --- a/core/modules/user/src/Plugin/views/wizard/Users.php +++ b/core/modules/user/src/Plugin/views/wizard/Users.php @@ -37,7 +37,7 @@ class Users extends WizardPluginBase { 'plugin_id' => 'boolean', 'entity_type' => 'user', 'entity_field' => 'status', - ] + ], ]; /** diff --git a/core/modules/user/src/UserViewsData.php b/core/modules/user/src/UserViewsData.php index 854f6791e4a..955ab5967bc 100644 --- a/core/modules/user/src/UserViewsData.php +++ b/core/modules/user/src/UserViewsData.php @@ -60,7 +60,7 @@ class UserViewsData extends EntityViewsData { 'argument field' => 'uid', 'base' => 'node_field_data', 'field' => 'nid', - 'relationship' => 'node_field_data:uid' + 'relationship' => 'node_field_data:uid', ], ]; diff --git a/core/modules/user/tests/fixtures/update/drupal-8.user-email-token-2587275.php b/core/modules/user/tests/fixtures/update/drupal-8.user-email-token-2587275.php index eaa2a9a618c..8f19b6e17c9 100644 --- a/core/modules/user/tests/fixtures/update/drupal-8.user-email-token-2587275.php +++ b/core/modules/user/tests/fixtures/update/drupal-8.user-email-token-2587275.php @@ -18,5 +18,5 @@ $connection->insert('config') ->values([ 'collection' => '', 'name' => 'user.mail', - 'data' => "a:10:{s:14:\"cancel_confirm\";a:2:{s:4:\"body\";s:369:\"[user:name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n-- [site:name] team\";s:7:\"subject\";s:59:\"Account cancellation request for [user:name] at [site:name]\";}s:14:\"password_reset\";a:2:{s:4:\"body\";s:397:\"[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n-- [site:name] team\";s:7:\"subject\";s:60:\"Replacement login information for [user:name] at [site:name]\";}s:22:\"register_admin_created\";a:2:{s:4:\"body\";s:463:\"[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:58:\"An administrator created an account for you at [site:name]\";}s:29:\"register_no_approval_required\";a:2:{s:4:\"body\";s:437:\"[user:name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:46:\"Account details for [user:name] at [site:name]\";}s:25:\"register_pending_approval\";a:2:{s:4:\"body\";s:281:\"[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n-- [site:name] team\";s:7:\"subject\";s:71:\"Account details for [user:name] at [site:name] (pending admin approval)\";}s:31:\"register_pending_approval_admin\";a:2:{s:4:\"body\";s:56:\"[user:name] has applied for an account.\n\n[user:edit-url]\";s:7:\"subject\";s:71:\"Account details for [user:name] at [site:name] (pending admin approval)\";}s:16:\"status_activated\";a:2:{s:4:\"body\";s:446:\"[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:57:\"Account details for [user:name] at [site:name] (approved)\";}s:14:\"status_blocked\";a:2:{s:4:\"body\";s:89:\"[user:name],\n\nYour account on [site:account-name] has been blocked.\n\n-- [site:name] team\";s:7:\"subject\";s:56:\"Account details for [user:name] at [site:name] (blocked)\";}s:15:\"status_canceled\";a:2:{s:4:\"body\";s:82:\"[user:name],\n\nYour account on [site:name] has been canceled.\n\n-- [site:name] team\";s:7:\"subject\";s:57:\"Account details for [user:name] at [site:name] (canceled)\";}s:8:\"langcode\";s:2:\"en\";}" + 'data' => "a:10:{s:14:\"cancel_confirm\";a:2:{s:4:\"body\";s:369:\"[user:name],\n\nA request to cancel your account has been made at [site:name].\n\nYou may now cancel your account on [site:url-brief] by clicking this link or copying and pasting it into your browser:\n\n[user:cancel-url]\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n-- [site:name] team\";s:7:\"subject\";s:59:\"Account cancellation request for [user:name] at [site:name]\";}s:14:\"password_reset\";a:2:{s:4:\"body\";s:397:\"[user:name],\n\nA request to reset the password for your account has been made at [site:name].\n\nYou may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.\n\n-- [site:name] team\";s:7:\"subject\";s:60:\"Replacement login information for [user:name] at [site:name]\";}s:22:\"register_admin_created\";a:2:{s:4:\"body\";s:463:\"[user:name],\n\nA site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:58:\"An administrator created an account for you at [site:name]\";}s:29:\"register_no_approval_required\";a:2:{s:4:\"body\";s:437:\"[user:name],\n\nThank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:46:\"Account details for [user:name] at [site:name]\";}s:25:\"register_pending_approval\";a:2:{s:4:\"body\";s:281:\"[user:name],\n\nThank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another email containing information about how to log in, set your password, and other details.\n\n\n-- [site:name] team\";s:7:\"subject\";s:71:\"Account details for [user:name] at [site:name] (pending admin approval)\";}s:31:\"register_pending_approval_admin\";a:2:{s:4:\"body\";s:56:\"[user:name] has applied for an account.\n\n[user:edit-url]\";s:7:\"subject\";s:71:\"Account details for [user:name] at [site:name] (pending admin approval)\";}s:16:\"status_activated\";a:2:{s:4:\"body\";s:446:\"[user:name],\n\nYour account at [site:name] has been activated.\n\nYou may now log in by clicking this link or copying and pasting it into your browser:\n\n[user:one-time-login-url]\n\nThis link can only be used once to log in and will lead you to a page where you can set your password.\n\nAfter setting your password, you will be able to log in at [site:login-url] in the future using:\n\nusername: [user:name]\npassword: Your password\n\n-- [site:name] team\";s:7:\"subject\";s:57:\"Account details for [user:name] at [site:name] (approved)\";}s:14:\"status_blocked\";a:2:{s:4:\"body\";s:89:\"[user:name],\n\nYour account on [site:account-name] has been blocked.\n\n-- [site:name] team\";s:7:\"subject\";s:56:\"Account details for [user:name] at [site:name] (blocked)\";}s:15:\"status_canceled\";a:2:{s:4:\"body\";s:82:\"[user:name],\n\nYour account on [site:name] has been canceled.\n\n-- [site:name] team\";s:7:\"subject\";s:57:\"Account details for [user:name] at [site:name] (canceled)\";}s:8:\"langcode\";s:2:\"en\";}", ])->execute(); diff --git a/core/modules/user/tests/src/Functional/UserAdminTest.php b/core/modules/user/tests/src/Functional/UserAdminTest.php index 4e69346d2e5..82e5df807c1 100644 --- a/core/modules/user/tests/src/Functional/UserAdminTest.php +++ b/core/modules/user/tests/src/Functional/UserAdminTest.php @@ -108,7 +108,7 @@ class UserAdminTest extends BrowserTestBase { $this->drupalPostForm('admin/people', $edit, t('Apply to selected items'), [ // Sort the table by username so that we know reliably which user will be // targeted with the blocking action. - 'query' => ['order' => 'name', 'sort' => 'asc'] + 'query' => ['order' => 'name', 'sort' => 'asc'], ]); $site_name = $this->config('system.site')->get('name'); $this->assertMailString('body', 'Your account on ' . $site_name . ' has been blocked.', 1, 'Blocked message found in the mail sent to user C.'); @@ -129,7 +129,7 @@ class UserAdminTest extends BrowserTestBase { $this->drupalPostForm('admin/people', $editunblock, t('Apply to selected items'), [ // Sort the table by username so that we know reliably which user will be // targeted with the blocking action. - 'query' => ['order' => 'name', 'sort' => 'asc'] + 'query' => ['order' => 'name', 'sort' => 'asc'], ]); $user_storage->resetCache([$user_c->id()]); $account = $user_storage->load($user_c->id()); diff --git a/core/modules/user/tests/src/Functional/UserMailNotifyTest.php b/core/modules/user/tests/src/Functional/UserMailNotifyTest.php index 57bebc042a4..df22f9cb939 100644 --- a/core/modules/user/tests/src/Functional/UserMailNotifyTest.php +++ b/core/modules/user/tests/src/Functional/UserMailNotifyTest.php @@ -30,7 +30,7 @@ class UserMailNotifyTest extends EntityKernelTestBase { ['status_canceled', ['status_canceled']], ['register_admin_created', ['register_admin_created']], ['register_no_approval_required', ['register_no_approval_required']], - ['register_pending_approval', ['register_pending_approval', 'register_pending_approval_admin']] + ['register_pending_approval', ['register_pending_approval', 'register_pending_approval_admin']], ]; } diff --git a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php index fd6fdd2af18..a5d271092a0 100644 --- a/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php +++ b/core/modules/user/tests/src/Functional/Views/HandlerFilterUserNameTest.php @@ -95,7 +95,7 @@ class HandlerFilterUserNameTest extends ViewTestBase { $users = [$this->randomMachineName()]; $users = array_map('strtolower', $users); $edit = [ - 'options[value]' => implode(', ', $users) + 'options[value]' => implode(', ', $users), ]; $this->drupalPostForm($path, $edit, t('Apply')); $this->assertRaw(t('There are no entities matching "%value".', ['%value' => implode(', ', $users)])); @@ -105,7 +105,7 @@ class HandlerFilterUserNameTest extends ViewTestBase { $users = [$random_name, $this->names[0]]; $users = array_map('strtolower', $users); $edit = [ - 'options[value]' => implode(', ', $users) + 'options[value]' => implode(', ', $users), ]; $users = [$users[0]]; $this->drupalPostForm($path, $edit, t('Apply')); @@ -115,7 +115,7 @@ class HandlerFilterUserNameTest extends ViewTestBase { $users = $this->names; $users = array_map('strtolower', $users); $edit = [ - 'options[value]' => implode(', ', $users) + 'options[value]' => implode(', ', $users), ]; $this->drupalPostForm($path, $edit, t('Apply')); $this->assertNoRaw(t('There are no entities matching "%value".', ['%value' => implode(', ', $users)])); diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php index 5393805ca74..0ca7f091a2e 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php @@ -60,7 +60,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { 'access content', 'migrate test anonymous permission', // From filter_format tables. - 'use text format filtered_html' + 'use text format filtered_html', ]; $this->assertRole('anonymous', $permissions, 1, $id_map); @@ -81,7 +81,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { 'migrate test role 1 test permission', // From filter format. 'use text format full_html', - 'use text format php_code' + 'use text format php_code', ]; $this->assertRole('migrate_test_role_1', $permissions, 3, $id_map); @@ -126,7 +126,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { 'administrator1', 'migrate_test_role_11', 'migrate_test_role_21', - 'migrate_test_role_3_that_is_longer_than_thirty_two_characters1' + 'migrate_test_role_3_that_is_longer_than_thirty_two_characters1', ]; $this->assertEmpty(Role::loadMultiple($roles)); diff --git a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php index c3211857130..99c61fd4910 100644 --- a/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php +++ b/core/modules/user/tests/src/Kernel/Plugin/migrate/source/ProfileFieldTest.php @@ -99,7 +99,7 @@ class ProfileFieldTest extends MigrateSqlSourceTestBase { 'fid' => 4, 'uid' => 1, 'value' => 'yellow', - ] + ], ]; // Expected options are: @@ -114,7 +114,7 @@ class ProfileFieldTest extends MigrateSqlSourceTestBase { 'blue' => 'blue', 'green' => 'green', 'yellow' => 'yellow', - ] + ], ]; $tests[0]['expected_data'] = $profile_fields; diff --git a/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php b/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php index 84290cc967d..b7c9f68cf12 100644 --- a/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php +++ b/core/modules/user/tests/src/Unit/PermissionAccessCheckTest.php @@ -79,7 +79,7 @@ class PermissionAccessCheckTest extends UnitTestCase { ->will($this->returnValueMap([ ['allowed', TRUE], ['denied', FALSE], - ['other', FALSE] + ['other', FALSE], ] )); $route = new Route('', [], $requirements); diff --git a/core/modules/user/tests/src/Unit/PermissionHandlerTest.php b/core/modules/user/tests/src/Unit/PermissionHandlerTest.php index 2918d2f61ea..a621455d44b 100644 --- a/core/modules/user/tests/src/Unit/PermissionHandlerTest.php +++ b/core/modules/user/tests/src/Unit/PermissionHandlerTest.php @@ -400,7 +400,7 @@ class TestPermissionCallbacks { public function singleDescription() { return [ - 'access_module_a' => 'single_description' + 'access_module_a' => 'single_description', ]; } diff --git a/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php b/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php index 4e48fba0307..efcead4fbaa 100644 --- a/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php +++ b/core/modules/user/tests/src/Unit/Views/Argument/RolesRidTest.php @@ -23,7 +23,7 @@ class RolesRidTest extends UnitTestCase { public function testTitleQuery() { $role1 = new Role([ 'id' => 'test_rid_1', - 'label' => 'test rid 1' + 'label' => 'test rid 1', ], 'user_role'); $role2 = new Role([ 'id' => 'test_rid_2', diff --git a/core/modules/user/user.module b/core/modules/user/user.module index db016a1c3e0..a2b64648a84 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -609,7 +609,7 @@ function user_pass_reset_url($account, $options = []) { ], [ 'absolute' => TRUE, - 'language' => \Drupal::languageManager()->getLanguage($langcode) + 'language' => \Drupal::languageManager()->getLanguage($langcode), ] ); } @@ -638,7 +638,7 @@ function user_cancel_url(UserInterface $account, $options = []) { return \Drupal::url('user.cancel_confirm', [ 'user' => $account->id(), 'timestamp' => $timestamp, - 'hashed_pass' => user_pass_rehash($account, $timestamp) + 'hashed_pass' => user_pass_rehash($account, $timestamp), ], $url_options); } diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 47d33a99e38..11a0938449c 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -431,7 +431,7 @@ class View extends ConfigEntityBase implements ViewEntityInterface { 'position' => 0, 'display_options' => [], ], - ] + ], ]; } diff --git a/core/modules/views/src/EntityViewsData.php b/core/modules/views/src/EntityViewsData.php index 079ee3bb3d1..f5672d3dcec 100644 --- a/core/modules/views/src/EntityViewsData.php +++ b/core/modules/views/src/EntityViewsData.php @@ -207,7 +207,7 @@ class EntityViewsData implements EntityHandlerInterface, EntityViewsDataInterfac $data[$base_table]['table']['join'][$data_table] = [ 'left_field' => $base_field, 'field' => $base_field, - 'type' => 'INNER' + 'type' => 'INNER', ]; $data[$data_table]['table']['group'] = $this->entityType->getLabel(); $data[$data_table]['table']['provider'] = $this->entityType->getProvider(); diff --git a/core/modules/views/src/Form/ViewsExposedForm.php b/core/modules/views/src/Form/ViewsExposedForm.php index 125cd1fe48d..173dd776fc2 100644 --- a/core/modules/views/src/Form/ViewsExposedForm.php +++ b/core/modules/views/src/Form/ViewsExposedForm.php @@ -103,7 +103,7 @@ class ViewsExposedForm extends FormBase { } $form['actions'] = [ - '#type' => 'actions' + '#type' => 'actions', ]; $form['actions']['submit'] = [ // Prevent from showing up in \Drupal::request()->query. diff --git a/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php b/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php index de9bb26c8dc..a2616e8e8f2 100644 --- a/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php +++ b/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php @@ -26,7 +26,7 @@ class DefaultWizardDeriver extends DeriverBase { 'id' => 'standard', 'base_table' => $table, 'title' => $views_info['table']['base']['title'], - 'class' => 'Drupal\views\Plugin\views\wizard\Standard' + 'class' => 'Drupal\views\Plugin\views\wizard\Standard', ]; } } diff --git a/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php b/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php index fc2e9b894b7..f700f16aceb 100644 --- a/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php +++ b/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php @@ -91,8 +91,8 @@ class ViewsExposedFilterBlock implements ContainerDeriverInterface { 'config_dependencies' => [ 'config' => [ $view->getConfigDependencyName(), - ] - ] + ], + ], ]; $this->derivatives[$delta] += $base_plugin_definition; } diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 7c17d2bf9b7..d5614c68df8 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -400,7 +400,7 @@ abstract class PluginBase extends ComponentPluginBase implements ContainerFactor '#post_render' => [ function ($children, $elements) { return Xss::filterAdmin($children); - } + }, ], ]; diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index 96a41f3544c..b1e2b1db407 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -549,7 +549,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend '#type' => 'checkbox', '#title' => $this->t('Skip default argument for view URL'), '#default_value' => $this->options['default_argument_skip_url'], - '#description' => $this->t('Select whether to include this default argument when constructing the URL for this view. Skipping default arguments is useful e.g. in the case of feeds.') + '#description' => $this->t('Select whether to include this default argument when constructing the URL for this view. Skipping default arguments is useful e.g. in the case of feeds.'), ]; $form['default_argument_type'] = [ @@ -639,7 +639,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend '#default_value' => $this->options['summary']['number_of_records'], '#options' => [ 0 => $this->getSortName(), - 1 => $this->t('Number of records') + 1 => $this->t('Number of records'), ], '#states' => [ 'visible' => [ diff --git a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php index 29d188c187d..4f1cb2ecd55 100644 --- a/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php @@ -1032,13 +1032,13 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte 'js' => 'nojs', 'view' => $this->view->storage->id(), 'display_id' => $this->display['id'], - 'type' => $section + 'type' => $section, ], [ 'attributes' => [ 'class' => ['views-ajax-link', $class], 'title' => $title, - 'id' => Html::getUniqueId('views-' . $this->display['id'] . '-' . $section) - ] + 'id' => Html::getUniqueId('views-' . $this->display['id'] . '-' . $section), + ], ])); } @@ -2586,7 +2586,7 @@ abstract class DisplayPluginBase extends PluginBase implements DisplayPluginInte public function getPagerText() { return [ 'items per page title' => $this->t('Items to display'), - 'items per page description' => $this->t('Enter 0 for no limit.') + 'items per page description' => $this->t('Enter 0 for no limit.'), ]; } diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index baf1434449e..23409ec56da 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -259,7 +259,7 @@ class Page extends PathPluginBase { 'none' => $this->t('No menu entry'), 'normal' => $this->t('Normal menu entry'), 'tab' => $this->t('Menu tab'), - 'default tab' => $this->t('Default menu tab') + 'default tab' => $this->t('Default menu tab'), ], '#default_value' => $menu['type'], ]; @@ -532,7 +532,7 @@ class Page extends PathPluginBase { public function getPagerText() { return [ 'items per page title' => $this->t('Items per page'), - 'items per page description' => $this->t('Enter 0 for no limit.') + 'items per page description' => $this->t('Enter 0 for no limit.'), ]; } diff --git a/core/modules/views/src/Plugin/views/field/EntityField.php b/core/modules/views/src/Plugin/views/field/EntityField.php index ee2882c3b5b..faf8da14b11 100644 --- a/core/modules/views/src/Plugin/views/field/EntityField.php +++ b/core/modules/views/src/Plugin/views/field/EntityField.php @@ -408,10 +408,10 @@ class EntityField extends FieldPluginBase implements CacheableDependencyInterfac ]; $options['multi_type'] = [ - 'default' => 'separator' + 'default' => 'separator', ]; $options['separator'] = [ - 'default' => ', ' + 'default' => ', ', ]; $options['field_api_classes'] = [ diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index 033bda0784c..d382681be05 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -311,7 +311,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf // @todo Add possible html5 elements. $elements = [ '' => $this->t('- Use default -'), - '0' => $this->t('- None -') + '0' => $this->t('- None -'), ]; $elements += \Drupal::config('views.settings')->get('field_rewrite_elements'); } @@ -1387,7 +1387,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf ]; $alter += [ - 'path' => NULL + 'path' => NULL, ]; $path = $alter['path']; diff --git a/core/modules/views/src/Plugin/views/field/PrerenderList.php b/core/modules/views/src/Plugin/views/field/PrerenderList.php index f27973ebbfe..4ed091f810d 100644 --- a/core/modules/views/src/Plugin/views/field/PrerenderList.php +++ b/core/modules/views/src/Plugin/views/field/PrerenderList.php @@ -78,8 +78,8 @@ abstract class PrerenderList extends FieldPluginBase implements MultiItemsFieldH '#template' => '{{ items|safe_join(separator) }}', '#context' => [ 'items' => $items, - 'separator' => $this->sanitizeValue($this->options['separator'], 'xss_admin') - ] + 'separator' => $this->sanitizeValue($this->options['separator'], 'xss_admin'), + ], ]; } else { diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index b49190b0551..5b35b6ad3dd 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -1103,7 +1103,7 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen '#required' => TRUE, '#attributes' => [ 'class' => ['default-radios'], - ] + ], ]; // From all groups, let chose which is the default. $form['group_info']['default_group_multiple'] = [ @@ -1112,7 +1112,7 @@ abstract class FilterPluginBase extends HandlerBase implements CacheableDependen '#default_value' => $this->options['group_info']['default_group_multiple'], '#attributes' => [ 'class' => ['default-checkboxes'], - ] + ], ]; $form['group_info']['add_group'] = [ diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php index ed19bee6ae6..d2a6ab09971 100644 --- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php +++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php @@ -300,7 +300,7 @@ class NumericFilter extends FilterPluginBase { // Ensure there is something in the 'value'. $form['value'] = [ '#type' => 'value', - '#value' => NULL + '#value' => NULL, ]; } } diff --git a/core/modules/views/src/Plugin/views/filter/StringFilter.php b/core/modules/views/src/Plugin/views/filter/StringFilter.php index f6b7e248223..f744519272a 100644 --- a/core/modules/views/src/Plugin/views/filter/StringFilter.php +++ b/core/modules/views/src/Plugin/views/filter/StringFilter.php @@ -257,7 +257,7 @@ class StringFilter extends FilterPluginBase { // Ensure there is something in the 'value'. $form['value'] = [ '#type' => 'value', - '#value' => NULL + '#value' => NULL, ]; } } diff --git a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php index a7ac37d85f7..a0bbedf7315 100644 --- a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php +++ b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php @@ -226,7 +226,7 @@ class JoinPluginBase extends PluginBase implements JoinPluginInterface { // Merge in some default values. $configuration += [ 'type' => 'LEFT', - 'extra_operator' => 'AND' + 'extra_operator' => 'AND', ]; $this->configuration = $configuration; diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index 512a99de8e6..99d0aa81912 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -188,7 +188,7 @@ class Sql extends QueryPluginBase { 'link' => NULL, 'table' => $base_table, 'alias' => $base_table, - 'base' => $base_table + 'base' => $base_table, ]; // init the table queue with our primary table. @@ -1045,7 +1045,7 @@ class Sql extends QueryPluginBase { $this->orderby[] = [ 'field' => $as, - 'direction' => strtoupper($order) + 'direction' => strtoupper($order), ]; } @@ -1793,7 +1793,7 @@ class Sql extends QueryPluginBase { 'filter' => 'groupby_numeric', 'sort' => 'groupby_numeric', ], - ] + ], ]; } diff --git a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php index 568bcd2f31f..1510d22e7de 100644 --- a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php +++ b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php @@ -53,7 +53,7 @@ class EntityReverse extends RelationshipPluginBase { 'left_field' => $left_field, 'table' => $this->definition['field table'], 'field' => $this->definition['field field'], - 'adjusted' => TRUE + 'adjusted' => TRUE, ]; if (!empty($this->options['required'])) { $first['type'] = 'INNER'; @@ -80,7 +80,7 @@ class EntityReverse extends RelationshipPluginBase { 'left_field' => 'entity_id', 'table' => $this->definition['base'], 'field' => $this->definition['base field'], - 'adjusted' => TRUE + 'adjusted' => TRUE, ]; if (!empty($this->options['required'])) { diff --git a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php index 0b3dcc9a10a..890432aa84c 100644 --- a/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php +++ b/core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php @@ -177,7 +177,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface { 'plugin_id' => 'boolean', 'entity_type' => $this->entityTypeId, 'entity_field' => $field_name, - ] + ], ] + $this->filters; } diff --git a/core/modules/views/src/Tests/FieldApiDataTest.php b/core/modules/views/src/Tests/FieldApiDataTest.php index d2d035cfcc1..b20a8712e61 100644 --- a/core/modules/views/src/Tests/FieldApiDataTest.php +++ b/core/modules/views/src/Tests/FieldApiDataTest.php @@ -45,7 +45,7 @@ class FieldApiDataTest extends FieldTestBase { 'field_name' => $field_names[0], 'entity_type' => 'node', 'bundle' => 'page', - 'label' => 'GiraffeA" label' + 'label' => 'GiraffeA" label', ]; FieldConfig::create($field)->save(); @@ -55,7 +55,7 @@ class FieldApiDataTest extends FieldTestBase { 'field_name' => $field_names[0], 'entity_type' => 'node', 'bundle' => 'article', - 'label' => 'GiraffeB" label' + 'label' => 'GiraffeB" label', ])->save(); // Now create some example nodes/users for the view result. @@ -230,7 +230,7 @@ class FieldApiDataTest extends FieldTestBase { 'field_name' => $this->fieldStorages[0]->getName(), 'entity_type' => 'node', 'bundle' => 'news', - 'label' => 'GiraffeB" label' + 'label' => 'GiraffeB" label', ])->save(); $this->container->get('views.views_data')->clear(); $data = $this->getViewsData(); diff --git a/core/modules/views/src/Tests/ViewTestData.php b/core/modules/views/src/Tests/ViewTestData.php index 27ddf7c4655..f0c8cfce7d9 100644 --- a/core/modules/views/src/Tests/ViewTestData.php +++ b/core/modules/views/src/Tests/ViewTestData.php @@ -108,7 +108,7 @@ class ViewTestData { ], 'primary key' => ['id'], 'unique keys' => [ - 'name' => ['name'] + 'name' => ['name'], ], 'indexes' => [ 'ages' => ['age'], diff --git a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php index 230e4285036..71aa2defcc5 100644 --- a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php +++ b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php @@ -60,7 +60,7 @@ class QueryTest extends QueryPluginBase { $this->conditions[] = [ 'field' => $field, 'value' => $value, - 'operator' => $operator + 'operator' => $operator, ]; } diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.install b/core/modules/views/tests/modules/views_test_data/views_test_data.install index 3590440b9fa..1ef60361cd3 100644 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.install +++ b/core/modules/views/tests/modules/views_test_data/views_test_data.install @@ -29,7 +29,7 @@ function views_test_data_install() { 'p' => 'P', 'strong' => 'STRONG', 'em' => 'EM', - 'marquee' => 'MARQUEE' + 'marquee' => 'MARQUEE', ]; \Drupal::configFactory()->getEditable('views.settings')->set('field_rewrite_elements', $values)->save(); } diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php index c3e8f56dbf5..b6120707d98 100644 --- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php +++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php @@ -96,7 +96,7 @@ class DefaultViewsTest extends ViewTestBase { 'status' => CommentInterface::PUBLISHED, 'entity_id' => $node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', ]; Comment::create($comment)->save(); diff --git a/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php index a46e54c9e58..2393b6d2699 100644 --- a/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php +++ b/core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php @@ -65,7 +65,7 @@ class FieldEntityTest extends ViewTestBase { 'uid' => $account->id(), 'entity_id' => $node->id(), 'entity_type' => 'node', - 'field_name' => 'comment' + 'field_name' => 'comment', ]); $comment->save(); diff --git a/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php index 993293cebf4..22bb6435c87 100644 --- a/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php +++ b/core/modules/views/tests/src/Functional/Entity/FilterEntityBundleTest.php @@ -81,7 +81,7 @@ class FilterEntityBundleTest extends ViewTestBase { 'node.type.test_bundle_2', ], 'module' => [ - 'node' + 'node', ], ]; $this->assertIdentical($expected, $view->getDependencies()); diff --git a/core/modules/views/tests/src/Functional/GlossaryTest.php b/core/modules/views/tests/src/Functional/GlossaryTest.php index 276737f1980..ed247f1829b 100644 --- a/core/modules/views/tests/src/Functional/GlossaryTest.php +++ b/core/modules/views/tests/src/Functional/GlossaryTest.php @@ -40,7 +40,7 @@ class GlossaryTest extends ViewTestBase { $nodes_by_char = []; foreach ($nodes_per_char as $char => $count) { $setting = [ - 'type' => $type->id() + 'type' => $type->id(), ]; for ($i = 0; $i < $count; $i++) { $node = $setting; diff --git a/core/modules/views/tests/src/Functional/Handler/AreaTest.php b/core/modules/views/tests/src/Functional/Handler/AreaTest.php index cf877d13749..1827319bbd0 100644 --- a/core/modules/views/tests/src/Functional/Handler/AreaTest.php +++ b/core/modules/views/tests/src/Functional/Handler/AreaTest.php @@ -41,8 +41,8 @@ class AreaTest extends ViewTestBase { 'title' => 'Test Example area', 'help' => 'A area handler which just exists for tests.', 'area' => [ - 'id' => 'test_example' - ] + 'id' => 'test_example', + ], ]; return $data; diff --git a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php index 41849b25495..eda5b81abe1 100644 --- a/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php +++ b/core/modules/views/tests/src/Functional/Handler/FieldWebTest.php @@ -483,7 +483,7 @@ class FieldWebTest extends ViewTestBase { 'p', 'strong', 'em', - 'marquee' + 'marquee', ]; $this->assertEqual(array_keys($element_types), $expected_elements); @@ -580,28 +580,28 @@ class FieldWebTest extends ViewTestBase { [ 'value' => $random_text_8, 'trimmed_value' => '', - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string with two words which doesn't fit both into the limit. [ 'value' => $random_text_8 . ' ' . $random_text_8, 'trimmed_value' => '', - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string which contains of two words, of which only the first // fits into the limit. [ 'value' => $random_text_4 . ' ' . $random_text_8, 'trimmed_value' => $random_text_4, - 'trimmed' => TRUE + 'trimmed' => TRUE, ], // Create one string which contains of two words, of which both fits into // the limit. [ 'value' => $random_text_2 . ' ' . $random_text_2, 'trimmed_value' => $random_text_2 . ' ' . $random_text_2, - 'trimmed' => FALSE - ] + 'trimmed' => FALSE, + ], ]; foreach ($tuples as $tuple) { diff --git a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php index 816af901fde..b12e43e857c 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ArgumentDefaultTest.php @@ -55,9 +55,9 @@ class ArgumentDefaultTest extends ViewTestBase { $options = [ 'default_argument_type' => 'argument_default_test', 'default_argument_options' => [ - 'value' => 'John' + 'value' => 'John', ], - 'default_action' => 'default' + 'default_action' => 'default', ]; $id = $view->addHandler('default', 'argument', 'views_test_data', 'name', $options); $view->initHandlers(); diff --git a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php index f8ce5a927f1..c919bcb8312 100644 --- a/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/CacheWebTest.php @@ -51,8 +51,8 @@ class CacheWebTest extends ViewTestBase { 'type' => 'time', 'options' => [ 'results_lifespan' => '3600', - 'output_lifespan' => '3600' - ] + 'output_lifespan' => '3600', + ], ]); $view->save(); $this->container->get('router.builder')->rebuildIfNeeded(); @@ -70,7 +70,7 @@ class CacheWebTest extends ViewTestBase { 'config:user.role.anonymous', 'config:views.view.test_display', 'node_list', - 'rendered' + 'rendered', ]; $this->assertCacheTags($cache_tags); diff --git a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php index 215ee2890f5..41356b69c76 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ContextualFiltersBlockContextTest.php @@ -110,7 +110,7 @@ class ContextualFiltersBlockContextTest extends ViewTestBase { 'label_display' => 'visible', 'views_label' => '', 'items_per_page' => 'none', - 'context_mapping' => ['nid' => '@node.node_route_context:node'] + 'context_mapping' => ['nid' => '@node.node_route_context:node'], ]; $this->assertEqual($block->getPlugin()->getConfiguration(), $expected_settings, 'Block settings are correct.'); diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php index 67481529876..d8deaa598b8 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php @@ -285,7 +285,7 @@ class DisplayTest extends ViewTestBase { 'table' => 'views_test_data', 'field' => 'id', 'id' => 'id', - 'value' => ['value' => 7297] + 'value' => ['value' => 7297], ]; $view->setHandler('default', 'filter', 'id', $item); $this->executeView($view); diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php index eaa5aaa32f3..4cd81d2891c 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php @@ -104,9 +104,9 @@ class ExposedFormTest extends ViewTestBase { 'label' => 'Content: Type', 'operator_id' => 'type_op', 'reduce' => FALSE, - 'description' => 'Exposed overridden description' + 'description' => 'Exposed overridden description', ], - ] + ], ]); $view->save(); $this->drupalGet('test_exposed_form_buttons', ['query' => [$identifier => 'article']]); @@ -131,9 +131,9 @@ class ExposedFormTest extends ViewTestBase { 'label' => 'Content: Type', 'operator_id' => 'type_op', 'reduce' => FALSE, - 'description' => 'Exposed overridden description' + 'description' => 'Exposed overridden description', ], - ] + ], ]); $this->executeView($view); @@ -286,7 +286,7 @@ class ExposedFormTest extends ViewTestBase { 'entity_test_view_grants', 'theme', 'url.query_args', - 'languages:language_content' + 'languages:language_content', ]; $this->drupalGet('test_exposed_form_sort_items_per_page'); diff --git a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php index c80fa09bfc2..272a3f073df 100644 --- a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php @@ -418,7 +418,7 @@ class PagerTest extends ViewTestBase { // Create source string. $source = $this->localeStorage->createString( [ - 'source' => $label + 'source' => $label, ] ); $source->save(); diff --git a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php index 1b3078b5449..e3faa88405f 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ViewsBulkTest.php @@ -41,7 +41,7 @@ class ViewsBulkTest extends ViewTestBase { $node_1 = $this->drupalCreateNode([ 'type' => 'page', 'title' => 'The first node', - 'changed' => \Drupal::time()->getRequestTime() - 180 + 'changed' => \Drupal::time()->getRequestTime() - 180, ]); // Login as administrator and go to admin/content. @@ -53,7 +53,7 @@ class ViewsBulkTest extends ViewTestBase { $node_2 = $this->drupalCreateNode([ 'type' => 'page', 'title' => 'The second node', - 'changed' => \Drupal::time()->getRequestTime() - 120 + 'changed' => \Drupal::time()->getRequestTime() - 120, ]); // Now click 'Apply to selected items' and assert the first node is selected diff --git a/core/modules/views/tests/src/Functional/Update/ArgumentPlaceholderUpdatePathTest.php b/core/modules/views/tests/src/Functional/Update/ArgumentPlaceholderUpdatePathTest.php index 8d60f358b9b..fd12451b1a4 100644 --- a/core/modules/views/tests/src/Functional/Update/ArgumentPlaceholderUpdatePathTest.php +++ b/core/modules/views/tests/src/Functional/Update/ArgumentPlaceholderUpdatePathTest.php @@ -20,7 +20,7 @@ class ArgumentPlaceholderUpdatePathTest extends UpdatePathTestBase { protected function setDatabaseDumpFiles() { $this->databaseDumpFiles = [ __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', - __DIR__ . '/../../../fixtures/update/argument-placeholder.php' + __DIR__ . '/../../../fixtures/update/argument-placeholder.php', ]; } diff --git a/core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php b/core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php index 5db54d2c67e..653025202f3 100644 --- a/core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php +++ b/core/modules/views/tests/src/Functional/Update/BulkFormUpdateTest.php @@ -18,7 +18,7 @@ class BulkFormUpdateTest extends UpdatePathTestBase { protected function setDatabaseDumpFiles() { $this->databaseDumpFiles = [ __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', - __DIR__ . '/../../../fixtures/update/legacy-bulk-form-update.php' + __DIR__ . '/../../../fixtures/update/legacy-bulk-form-update.php', ]; } diff --git a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php index 32aac174c4f..34f58122caf 100644 --- a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php +++ b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php @@ -89,7 +89,7 @@ class ViewEntityDependenciesTest extends ViewsKernelTestBase { 'comment', 'node', 'user', - ] + ], ]; // Tests dependencies of relationships. $expected['test_relationship_dependency'] = [ @@ -97,7 +97,7 @@ class ViewEntityDependenciesTest extends ViewsKernelTestBase { 'comment', 'node', 'user', - ] + ], ]; $expected['test_plugin_dependencies'] = [ 'module' => [ @@ -108,24 +108,24 @@ class ViewEntityDependenciesTest extends ViewsKernelTestBase { 'RowTest', 'StaticTest', 'StyleTest', - ] + ], ]; $expected['test_argument_dependency'] = [ 'config' => [ 'core.entity_view_mode.node.teaser', - 'field.storage.node.body' + 'field.storage.node.body', ], 'content' => [ 'ArgumentDefaultTest', - 'ArgumentValidatorTest' + 'ArgumentValidatorTest', ], 'module' => [ 'node', // The argument handler is provided by the search module. 'search', 'text', - 'user' + 'user', ], ]; @@ -145,25 +145,25 @@ class ViewEntityDependenciesTest extends ViewsKernelTestBase { ], 'content' => [ 'ArgumentDefaultTest', - 'ArgumentValidatorTest' + 'ArgumentValidatorTest', ], 'module' => [ 'core', 'node', 'search', 'user', - 'views' + 'views', ], ]; $expected_display['page'] = [ 'config' => [ - 'field.storage.node.body' + 'field.storage.node.body', ], 'module' => [ 'core', 'node', 'text', - 'views' + 'views', ], ]; diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php index 0f209cac2eb..a113f0c4ffd 100644 --- a/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/AreaEmptyTest.php @@ -35,8 +35,8 @@ class AreaEmptyTest extends ViewsKernelTestBase { 'title' => 'Test Example area', 'help' => 'A area handler which just exists for tests.', 'area' => [ - 'id' => 'test_example' - ] + 'id' => 'test_example', + ], ]; return $data; diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php index b5c52fef772..dbd04d83374 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldCounterTest.php @@ -62,7 +62,7 @@ class FieldCounterTest extends ViewsKernelTestBase { 'table' => 'views', 'field' => 'counter', 'relationship' => 'none', - 'counter_start' => $rand_start + 'counter_start' => $rand_start, ], 'name' => [ 'id' => 'name', diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php index 8bdab81b634..a738dcf5e3e 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php @@ -82,7 +82,7 @@ class FieldFieldTest extends ViewsKernelTestBase { $this->testUsers[$i] = User::create([ 'name' => 'test ' . $i, 'timezone' => User::getAllowedTimezones()[$i], - 'created' => REQUEST_TIME - rand(0, 3600) + 'created' => REQUEST_TIME - rand(0, 3600), ]); $this->testUsers[$i]->save(); } @@ -279,8 +279,8 @@ class FieldFieldTest extends ViewsKernelTestBase { $render = $executable->display_handler->render(); $expected_attachments = [ 'library' => [ - 'views/views.module' - ] + 'views/views.module', + ], ]; foreach ($this->entities as $entity) { $expected_attachments['library'][] = 'foo/fake_library'; diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php index aefa4841e64..f3ea97ca181 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php @@ -809,7 +809,7 @@ class FieldKernelTest extends ViewsKernelTestBase { 'khoảng cách từ đại lí đến', 'của hãng bao gồm ba dòng', 'сд асд асд ас', - 'асд асд асд ас' + 'асд асд асд ас', ]; // Just test maxlength without word boundary. $alter = [ diff --git a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php index e49ef7a2c77..ac8000a8d89 100644 --- a/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/SortTranslationTest.php @@ -59,7 +59,7 @@ class SortTranslationTest extends ViewsKernelTestBase { 'entity_type' => 'node', 'bundle' => 'article', 'label' => 'Translated text', - 'translatable' => TRUE + 'translatable' => TRUE, ])->save(); FieldStorageConfig::create([ diff --git a/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php b/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php index 34d426dc761..82876f1e3ee 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/ArgumentValidatorTest.php @@ -41,8 +41,8 @@ class ArgumentValidatorTest extends ViewsKernelTestBase { $options = [ 'specify_validation' => TRUE, 'validate' => [ - 'type' => 'argument_validator_test' - ] + 'type' => 'argument_validator_test', + ], ]; $id = $view->addHandler('default', 'argument', 'views_test_data', 'name', $options); $view->initHandlers(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php index 1a9f32eff7b..5b634afa1c7 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php @@ -37,7 +37,7 @@ class BlockDependenciesTest extends ViewsKernelTestBase { $expected = [ 'config' => ['views.view.test_exposed_block'], 'module' => ['views'], - 'theme' => ['stark'] + 'theme' => ['stark'], ]; $this->assertIdentical($expected, $dependencies); } @@ -53,7 +53,7 @@ class BlockDependenciesTest extends ViewsKernelTestBase { $expected = [ 'config' => ['views.view.content_recent'], 'module' => ['views'], - 'theme' => ['stark'] + 'theme' => ['stark'], ]; $this->assertIdentical($expected, $dependencies); } diff --git a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php index 708b4046c80..caa479b4a10 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php @@ -74,7 +74,7 @@ class CacheTest extends ViewsKernelTestBase { 'options' => [ 'results_lifespan' => '3600', 'output_lifespan' => '3600', - ] + ], ]); // Test the default (non-paged) display. @@ -188,7 +188,7 @@ class CacheTest extends ViewsKernelTestBase { 'options' => [ 'results_lifespan' => '3600', 'output_lifespan' => '3600', - ] + ], ]); $mapping = ['views_test_data_name' => 'name']; @@ -271,7 +271,7 @@ class CacheTest extends ViewsKernelTestBase { 'type' => 'time', 'options' => [ 'output_lifespan' => '3600', - ] + ], ]); $output = $view->buildRenderable(); @@ -330,7 +330,7 @@ class CacheTest extends ViewsKernelTestBase { 'options' => [ 'results_lifespan' => '3600', 'output_lifespan' => '3600', - ] + ], ]); $this->executeView($view); @@ -392,9 +392,9 @@ class CacheTest extends ViewsKernelTestBase { $options = [ 'default_argument_type' => 'argument_default_test', 'default_argument_options' => [ - 'value' => 'John' + 'value' => 'John', ], - 'default_action' => 'default' + 'default_action' => 'default', ]; $view->addHandler('default', 'argument', 'views_test_data', 'name', $options); $view->initHandlers(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php index d08adaacb05..a6776b585a1 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/Display/ViewsMenuLinkTest.php @@ -17,7 +17,7 @@ class ViewsMenuLinkTest extends ViewsKernelTestBase { public static $modules = [ 'menu_ui', 'user', - 'views' + 'views', ]; /** diff --git a/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php b/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php index 940ab7acad1..34e4f93000d 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php @@ -88,12 +88,12 @@ class FieldOrLanguageJoinTest extends RelationshipJoinTestBase { $configuration['extra'] = [ [ 'field' => 'name', - 'value' => $random_name_1 + 'value' => $random_name_1, ], [ 'field' => 'name', 'value' => $random_name_2, - 'operator' => '<>' + 'operator' => '<>', ], ]; $join_info = $this->buildJoin($view, $configuration, 'users3'); @@ -110,7 +110,7 @@ class FieldOrLanguageJoinTest extends RelationshipJoinTestBase { $configuration['extra'] = [ [ 'field' => 'name', - 'value' => $random_name_1 + 'value' => $random_name_1, ], [ 'field' => 'name', diff --git a/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php b/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php index 1c196a1d98f..1086612ae88 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php @@ -129,12 +129,12 @@ class JoinTest extends RelationshipJoinTestBase { $configuration['extra'] = [ [ 'field' => 'name', - 'value' => $random_name_1 + 'value' => $random_name_1, ], [ 'field' => 'name', 'value' => $random_name_2, - 'operator' => '<>' + 'operator' => '<>', ], ]; $join = $this->manager->createInstance('standard', $configuration); @@ -156,7 +156,7 @@ class JoinTest extends RelationshipJoinTestBase { $configuration['extra'] = [ [ 'field' => 'name', - 'value' => $random_name_1 + 'value' => $random_name_1, ], [ 'field' => 'name', @@ -178,7 +178,7 @@ class JoinTest extends RelationshipJoinTestBase { $configuration['extra'] = [ [ 'field' => 'langcode', - 'value' => 'en' + 'value' => 'en', ], [ 'left_field' => 'status', @@ -187,7 +187,7 @@ class JoinTest extends RelationshipJoinTestBase { ], [ 'field' => 'name', - 'left_field' => 'name' + 'left_field' => 'name', ], ]; $join = $this->manager->createInstance('standard', $configuration); diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php index 19d5e9554bd..191024e4701 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php +++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipJoinTestBase.php @@ -55,7 +55,7 @@ abstract class RelationshipJoinTestBase extends PluginKernelTestBase { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default' => 0 + 'default' => 0, ]; return $schema; @@ -74,8 +74,8 @@ abstract class RelationshipJoinTestBase extends PluginKernelTestBase { 'relationship' => [ 'id' => 'standard', 'base' => 'users_field_data', - 'base field' => 'uid' - ] + 'base field' => 'uid', + ], ]; return $data; diff --git a/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php b/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php index 802befe1ca7..973462619a2 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/RelationshipTest.php @@ -78,8 +78,8 @@ class RelationshipTest extends RelationshipJoinTestBase { $expected_result = [ [ 'name' => 'John', - 'uid' => 1 - ] + 'uid' => 1, + ], ]; $this->assertIdenticalResultset($view, $expected_result, $this->columnMap); $view->destroy(); @@ -101,8 +101,8 @@ class RelationshipTest extends RelationshipJoinTestBase { $expected_result = [ [ 'name' => 'John', - 'uid' => 1 - ] + 'uid' => 1, + ], ]; $this->assertIdenticalResultset($view, $expected_result, $this->columnMap); $view->destroy(); diff --git a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php index 879f6d44d54..7c49327290a 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php @@ -103,7 +103,7 @@ class ViewsBlockTest extends ViewsKernelTestBase { 'title' => 'Overridden title', 'default_argument_type' => 'fixed', 'default_argument_options' => [ - 'argument' => 'fixed' + 'argument' => 'fixed', ], 'validate' => [ 'type' => 'none', @@ -113,7 +113,7 @@ class ViewsBlockTest extends ViewsKernelTestBase { 'table' => 'views_test_data', 'field' => 'name', 'plugin_id' => 'string', - ] + ], ]); $view->save(); diff --git a/core/modules/views/tests/src/Kernel/ViewStorageTest.php b/core/modules/views/tests/src/Kernel/ViewStorageTest.php index 7cf953af740..e6cce86f2ef 100644 --- a/core/modules/views/tests/src/Kernel/ViewStorageTest.php +++ b/core/modules/views/tests/src/Kernel/ViewStorageTest.php @@ -183,22 +183,22 @@ class ViewStorageTest extends ViewsKernelTestBase { 'display_plugin' => 'page', 'id' => 'page_2', 'display_title' => 'Page 1', - 'position' => 1 + 'position' => 1, ], 'feed_1' => [ 'display_options' => ['path' => 'test.xml'], 'display_plugin' => 'feed', 'id' => 'feed', 'display_title' => 'Feed', - 'position' => 2 + 'position' => 2, ], 'page_2' => [ 'display_options' => ['path' => 'test/%/extra'], 'display_plugin' => 'page', 'id' => 'page_2', 'display_title' => 'Page 2', - 'position' => 3 - ] + 'position' => 3, + ], ]; $view = $this->controller->create($config); @@ -275,8 +275,8 @@ class ViewStorageTest extends ViewsKernelTestBase { $options = [ 'alter' => [ - 'text' => $this->randomMachineName() - ] + 'text' => $this->randomMachineName(), + ], ]; $id2 = $view->addHandler($display_id, 'field', 'views_test_data', 'name', $options); $item2 = $view->getHandler($display_id, 'field', 'name'); @@ -296,7 +296,7 @@ class ViewStorageTest extends ViewsKernelTestBase { $item = [ 'alter' => [ 'text' => $this->randomMachineName(), - ] + ], ] + $item1; $expected_items[$id1] = $item; $view->setHandler($display_id, 'field', $id1, $item); diff --git a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php index a581c862a18..956f7dc0c18 100644 --- a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php +++ b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php @@ -457,7 +457,7 @@ class EntityViewsDataTest extends UnitTestCase { ->setLabel('ID') ->setDescription('The ID of the user entity.') ->setReadOnly(TRUE) - ->setSetting('unsigned', TRUE) + ->setSetting('unsigned', TRUE), ]; $this->entityManager->expects($this->any()) ->method('getBaseFieldDefinitions') @@ -578,7 +578,7 @@ class EntityViewsDataTest extends UnitTestCase { ->setLabel('ID') ->setDescription('The ID of the user entity.') ->setReadOnly(TRUE) - ->setSetting('unsigned', TRUE) + ->setSetting('unsigned', TRUE), ]; $entity_test_type = new ConfigEntityType(['id' => 'entity_test_bundle']); @@ -730,7 +730,7 @@ class EntityViewsDataTest extends UnitTestCase { ->setLabel('ID') ->setDescription('The ID of the user entity.') ->setReadOnly(TRUE) - ->setSetting('unsigned', TRUE) + ->setSetting('unsigned', TRUE), ]; $this->entityManager->expects($this->any()) ->method('getBaseFieldDefinitions') diff --git a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php index 7ecf9ef0417..c63258abdcb 100644 --- a/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/Derivative/ViewsLocalTaskTest.php @@ -39,7 +39,7 @@ class ViewsLocalTaskTest extends UnitTestCase { protected $baseDefinition = [ 'class' => '\Drupal\views\Plugin\Menu\LocalTask\ViewsLocalTask', - 'deriver' => '\Drupal\views\Plugin\Derivative\ViewsLocalTask' + 'deriver' => '\Drupal\views\Plugin\Derivative\ViewsLocalTask', ]; /** diff --git a/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php index ac5a1fe4b93..ec79b52d94c 100644 --- a/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php @@ -44,7 +44,7 @@ class HandlerBaseTest extends UnitTestCase { ->method('get') ->with('test_entity_type_table') ->willReturn([ - 'table' => ['entity type' => 'test_entity_type'] + 'table' => ['entity type' => 'test_entity_type'], ]); $handler->setViewsData($this->viewsData); diff --git a/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php b/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php index 98a15546692..c3c180adac0 100644 --- a/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/area/ViewTest.php @@ -54,7 +54,7 @@ class ViewTest extends UnitTestCase { ->method('load') ->willReturnMap([ ['this', $view_this], - ['other', $view_other] + ['other', $view_other], ]); $this->viewHandler->view->storage = $view_this; diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php index 2b929f36087..b12b49ce417 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php @@ -118,7 +118,7 @@ class FieldTest extends UnitTestCase { public function testDefineOptionsWithNoOptions() { $definition = [ 'entity_type' => 'test_entity', - 'field_name' => 'title' + 'field_name' => 'title', ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -147,7 +147,7 @@ class FieldTest extends UnitTestCase { 'entity_type' => 'test_entity', 'field_name' => 'title', 'default_formatter' => 'test_example', - 'default_formatter_settings' => ['link_to_entity' => TRUE] + 'default_formatter_settings' => ['link_to_entity' => TRUE], ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -174,7 +174,7 @@ class FieldTest extends UnitTestCase { $definition = [ 'entity_type' => 'test_entity', 'field_name' => 'title', - 'default_formatter_settings' => ['link_to_entity' => TRUE] + 'default_formatter_settings' => ['link_to_entity' => TRUE], ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -200,7 +200,7 @@ class FieldTest extends UnitTestCase { public function testCalculateDependenciesWithBaseField() { $definition = [ 'entity_type' => 'test_entity', - 'field_name' => 'title' + 'field_name' => 'title', ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -222,7 +222,7 @@ class FieldTest extends UnitTestCase { public function testCalculateDependenciesWithConfiguredField() { $definition = [ 'entity_type' => 'test_entity', - 'field_name' => 'body' + 'field_name' => 'body', ]; $handler = new EntityField([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer); @@ -263,7 +263,7 @@ class FieldTest extends UnitTestCase { ->method('get') ->with('test_entity_table') ->willReturn([ - 'table' => ['entity type' => 'test_entity'] + 'table' => ['entity type' => 'test_entity'], ]); $access_control_handler = $this->getMock('Drupal\Core\Entity\EntityAccessControlHandlerInterface'); diff --git a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php index ef0e812aa25..d94840746b3 100644 --- a/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/pager/PagerPluginBaseTest.php @@ -196,7 +196,7 @@ class PagerPluginBaseTest extends UnitTestCase { // Now we are on the second page, which has just a single one left. [5, 6, 1, FALSE], // Increase the total items, so we have some available on the third page. - [5, 12, 1, TRUE] + [5, 12, 1, TRUE], ]; } diff --git a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php index 0900df69247..022f5320dbc 100644 --- a/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php @@ -116,7 +116,7 @@ class EntityOperationsUnitTest extends UnitTestCase { $expected_build = [ '#type' => 'operations', - '#links' => $operations + '#links' => $operations, ]; $expected_build['#links']['foo']['query'] = ['destination' => 'foobar']; $build = $this->plugin->render($result); @@ -158,7 +158,7 @@ class EntityOperationsUnitTest extends UnitTestCase { $expected_build = [ '#type' => 'operations', - '#links' => $operations + '#links' => $operations, ]; $build = $this->plugin->render($result); $this->assertSame($expected_build, $build); diff --git a/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php b/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php index f29650796c5..749a1efffac 100644 --- a/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/views/query/SqliteDateSqlTest.php @@ -66,7 +66,7 @@ class SqliteDateSqlTest extends UnitTestCase { ['foo.field', 'Y-y-M-m', "strftime('%Y-%Y-%m-%m', foo.field, 'unixepoch')"], ['bar.field', 'n-F D d l', "strftime('%m-%m %d %d %d', bar.field, 'unixepoch')"], ['baz.bar_field', 'j/W/H-h i s A', "strftime('%d/%W/%H-%H %M %S ', baz.bar_field, 'unixepoch')"], - ['foo.field', 'W', "CAST(((strftime('%j', date(strftime('%Y-%m-%d', foo.field, 'unixepoch'), '-3 days', 'weekday 4')) - 1) / 7 + 1) AS NUMERIC)"] + ['foo.field', 'W', "CAST(((strftime('%j', date(strftime('%Y-%m-%d', foo.field, 'unixepoch'), '-3 days', 'weekday 4')) - 1) / 7 + 1) AS NUMERIC)"], ]; } diff --git a/core/modules/views/tests/src/Unit/PluginBaseTest.php b/core/modules/views/tests/src/Unit/PluginBaseTest.php index 622b42a8464..afa849f8c8c 100644 --- a/core/modules/views/tests/src/Unit/PluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/PluginBaseTest.php @@ -101,7 +101,7 @@ class PluginBaseTest extends UnitTestCase { 'expected' => [ 'key' => 'value2', ], - '' + '', ]; // Set no storage but an options value, so the options value should be kept. $test_parameters[] = [ diff --git a/core/modules/views/tests/src/Unit/ViewExecutableTest.php b/core/modules/views/tests/src/Unit/ViewExecutableTest.php index b6d3c912b01..a86ead11563 100644 --- a/core/modules/views/tests/src/Unit/ViewExecutableTest.php +++ b/core/modules/views/tests/src/Unit/ViewExecutableTest.php @@ -295,7 +295,7 @@ class ViewExecutableTest extends UnitTestCase { unset($view->display_handler); $expected = [ 'test_hook__test_view', - 'test_hook' + 'test_hook', ]; $this->assertEquals($expected, $view->buildThemeFunctions('test_hook')); @@ -307,7 +307,7 @@ class ViewExecutableTest extends UnitTestCase { 'test_hook__two', 'test_hook__and_three', 'test_hook__test_view', - 'test_hook' + 'test_hook', ]; $this->assertEquals($expected, $view->buildThemeFunctions('test_hook')); @@ -323,7 +323,7 @@ class ViewExecutableTest extends UnitTestCase { 'test_hook__test_view__default2', 'test_hook__default2', 'test_hook__test_view', - 'test_hook' + 'test_hook', ]; $this->assertEquals($expected, $view->buildThemeFunctions('test_hook')); } diff --git a/core/modules/views/tests/src/Unit/ViewsTest.php b/core/modules/views/tests/src/Unit/ViewsTest.php index 00476c50d1e..e94068f051f 100644 --- a/core/modules/views/tests/src/Unit/ViewsTest.php +++ b/core/modules/views/tests/src/Unit/ViewsTest.php @@ -123,7 +123,7 @@ class ViewsTest extends UnitTestCase { 'type_a' => [ 'display_plugin' => 'type_a', 'display_options' => [ - 'enabled' => FALSE + 'enabled' => FALSE, ], ], // Type D intentionally doesn't exist. diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index a26742b91c1..f3f287e7552 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -575,12 +575,12 @@ function template_preprocess_views_view_table(&$variables) { if (!empty($column_reference['content']) && !empty($options['info'][$column]['separator'])) { $column_reference['content'][] = [ 'separator' => ['#markup' => $options['info'][$column]['separator']], - 'field_output' => ['#markup' => $field_output] + 'field_output' => ['#markup' => $field_output], ]; } else { $column_reference['content'][] = [ - 'field_output' => ['#markup' => $field_output] + 'field_output' => ['#markup' => $field_output], ]; } } diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc index 1b8b88ff94b..63c61902c48 100644 --- a/core/modules/views_ui/admin.inc +++ b/core/modules/views_ui/admin.inc @@ -286,7 +286,7 @@ function views_ui_build_form_url(FormStateInterface $form_state) { $route_parameters = [ 'js' => $ajax, 'view' => $name, - 'display_id' => $display_id + 'display_id' => $display_id, ]; $url = Url::fromRoute($route_name, $route_parameters); if ($type = $form_state->get('type')) { diff --git a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php index 534006cb3d0..f6efde47293 100644 --- a/core/modules/views_ui/src/Form/AdvancedSettingsForm.php +++ b/core/modules/views_ui/src/Form/AdvancedSettingsForm.php @@ -78,7 +78,7 @@ class AdvancedSettingsForm extends ConfigFormBase { '#default_value' => array_filter($config->get('display_extenders')), '#options' => $options, '#type' => 'checkboxes', - '#description' => $this->t('Select extensions of the views interface.') + '#description' => $this->t('Select extensions of the views interface.'), ]; } diff --git a/core/modules/views_ui/src/Form/Ajax/Rearrange.php b/core/modules/views_ui/src/Form/Ajax/Rearrange.php index b2b1e8e80d1..c904ff374e8 100644 --- a/core/modules/views_ui/src/Form/Ajax/Rearrange.php +++ b/core/modules/views_ui/src/Form/Ajax/Rearrange.php @@ -85,7 +85,7 @@ class Rearrange extends ViewsFormBase { 'action' => 'order', 'relationship' => 'sibling', 'group' => 'weight', - ] + ], ], '#tree' => TRUE, '#prefix' => '
                ', diff --git a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php index 81eb6f21a86..7e5f83f7f50 100644 --- a/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php +++ b/core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php @@ -44,7 +44,7 @@ class ReorderDisplays extends ViewsFormBase { ]); $form['view'] = [ '#type' => 'value', - '#value' => $view + '#value' => $view, ]; $displays = $view->get('display'); @@ -68,7 +68,7 @@ class ReorderDisplays extends ViewsFormBase { 'action' => 'order', 'relationship' => 'sibling', 'group' => 'weight', - ] + ], ], '#tree' => TRUE, '#prefix' => '
                ', diff --git a/core/modules/views_ui/src/Tests/RowUITest.php b/core/modules/views_ui/src/Tests/RowUITest.php index 56890097839..e8aa2c31010 100644 --- a/core/modules/views_ui/src/Tests/RowUITest.php +++ b/core/modules/views_ui/src/Tests/RowUITest.php @@ -34,13 +34,13 @@ class RowUITest extends UITestBase { $this->assertFieldByName('row[type]', 'fields', 'The default row plugin selected in the UI should be fields.'); $edit = [ - 'row[type]' => 'test_row' + 'row[type]' => 'test_row', ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->assertFieldByName('row_options[test_option]', NULL, 'Make sure the custom settings form from the test plugin appears.'); $random_name = $this->randomMachineName(); $edit = [ - 'row_options[test_option]' => $random_name + 'row_options[test_option]' => $random_name, ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->drupalGet($row_options_url); diff --git a/core/modules/views_ui/src/ViewPreviewForm.php b/core/modules/views_ui/src/ViewPreviewForm.php index 4bc8eaab3ad..787527baf8a 100644 --- a/core/modules/views_ui/src/ViewPreviewForm.php +++ b/core/modules/views_ui/src/ViewPreviewForm.php @@ -77,7 +77,7 @@ class ViewPreviewForm extends ViewFormBase { return [ '#attributes' => [ 'id' => 'preview-submit-wrapper', - 'class' => ['preview-submit-wrapper'] + 'class' => ['preview-submit-wrapper'], ], 'button' => [ '#type' => 'submit', diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index beb5ffff475..6b49fdc92d3 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -713,7 +713,7 @@ class ViewUI implements ViewEntityInterface { 'data' => [ '#markup' => $path, ], - ] + ], ]; } if ($show_stats) { diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php index 7291dc2e8de..2f007f193c6 100644 --- a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php +++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php @@ -208,7 +208,7 @@ class DisplayPathTest extends UITestBase { $edit = [ 'title[0][value]' => 'Menu title', 'link[0][uri]' => '/admin/foo', - 'menu_parent' => 'admin:system.admin' + 'menu_parent' => 'admin:system.admin', ]; $this->drupalPostForm('admin/structure/menu/manage/admin/add', $edit, t('Save')); diff --git a/core/modules/views_ui/tests/src/Functional/DisplayTest.php b/core/modules/views_ui/tests/src/Functional/DisplayTest.php index 519d5226e7e..8fa5a80de38 100644 --- a/core/modules/views_ui/tests/src/Functional/DisplayTest.php +++ b/core/modules/views_ui/tests/src/Functional/DisplayTest.php @@ -45,7 +45,7 @@ class DisplayTest extends UITestBase { */ public function testReorderDisplay() { $view = [ - 'block[create]' => TRUE + 'block[create]' => TRUE, ]; $view = $this->randomView($view); @@ -60,7 +60,7 @@ class DisplayTest extends UITestBase { // Put the block display in front of the page display. $edit = [ 'displays[page_1][weight]' => 2, - 'displays[block_1][weight]' => 1 + 'displays[block_1][weight]' => 1, ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->drupalPostForm(NULL, [], t('Save')); diff --git a/core/modules/views_ui/tests/src/Functional/HandlerTest.php b/core/modules/views_ui/tests/src/Functional/HandlerTest.php index b4be17828d0..7d96d0c5b57 100644 --- a/core/modules/views_ui/tests/src/Functional/HandlerTest.php +++ b/core/modules/views_ui/tests/src/Functional/HandlerTest.php @@ -53,7 +53,7 @@ class HandlerTest extends UITestBase { 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, - 'default' => 0 + 'default' => 0, ]; return $schema; @@ -74,8 +74,8 @@ class HandlerTest extends UITestBase { 'relationship' => [ 'id' => 'standard', 'base' => 'users_field_data', - 'base field' => 'uid' - ] + 'base field' => 'uid', + ], ]; // Create a dummy field with no help text. @@ -180,14 +180,14 @@ class HandlerTest extends UITestBase { 'field_name' => 'field_test', 'entity_type' => 'node', 'bundle' => 'page', - 'label' => 'The giraffe" label' + 'label' => 'The giraffe" label', ])->save(); FieldConfig::create([ 'field_name' => 'field_test', 'entity_type' => 'node', 'bundle' => 'article', - 'label' => 'The giraffe" label ' + 'label' => 'The giraffe" label ', ])->save(); $this->drupalGet('admin/structure/views/nojs/add-handler/content/default/field'); diff --git a/core/modules/views_ui/tests/src/Functional/StyleUITest.php b/core/modules/views_ui/tests/src/Functional/StyleUITest.php index 1eb9c7862f4..62f682a5f92 100644 --- a/core/modules/views_ui/tests/src/Functional/StyleUITest.php +++ b/core/modules/views_ui/tests/src/Functional/StyleUITest.php @@ -33,13 +33,13 @@ class StyleUITest extends UITestBase { $this->assertFieldByName('style[type]', 'default', 'The default style plugin selected in the UI should be unformatted list.'); $edit = [ - 'style[type]' => 'test_style' + 'style[type]' => 'test_style', ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->assertFieldByName('style_options[test_option]', NULL, 'Make sure the custom settings form from the test plugin appears.'); $random_name = $this->randomMachineName(); $edit = [ - 'style_options[test_option]' => $random_name + 'style_options[test_option]' => $random_name, ]; $this->drupalPostForm(NULL, $edit, t('Apply')); $this->drupalGet($style_options_url); diff --git a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php index 839fe3a47a9..8a2dd2953f3 100644 --- a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php +++ b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php @@ -76,7 +76,7 @@ class ViewsUITourTest extends TourTestBase { foreach ($handler_titles as $handler_title) { // Create source string. $source = $this->localeStorage->createString([ - 'source' => $handler_title + 'source' => $handler_title, ]); $source->save(); $this->createTranslation($source, $langcode); diff --git a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php index b4a3df022d3..d448252c6f4 100644 --- a/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php +++ b/core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php @@ -48,7 +48,7 @@ class ViewListBuilderTest extends UnitTestCase { 'theme' => 'views_view', 'no_ui' => TRUE, 'admin' => '', - ] + ], ], [ 'page', @@ -61,7 +61,7 @@ class ViewListBuilderTest extends UnitTestCase { 'contextual_links_locations' => ['page'], 'theme' => 'views_view', 'admin' => 'Page admin label', - ] + ], ], [ 'embed', @@ -71,7 +71,7 @@ class ViewListBuilderTest extends UnitTestCase { 'title' => 'embed', 'theme' => 'views_view', 'admin' => 'Embed admin label', - ] + ], ], ])); diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index 0475bce698b..318d85bd691 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -134,7 +134,7 @@ function views_ui_preprocess_views_view(&$variables) { // Render title for the admin preview. if (!empty($view->live_preview)) { $variables['title'] = [ - '#markup' => $view->getTitle() + '#markup' => $view->getTitle(), ]; } diff --git a/core/modules/views_ui/views_ui.theme.inc b/core/modules/views_ui/views_ui.theme.inc index f57132f7af2..69eff489fc4 100644 --- a/core/modules/views_ui/views_ui.theme.inc +++ b/core/modules/views_ui/views_ui.theme.inc @@ -184,7 +184,7 @@ function template_preprocess_views_ui_build_group_filter_form(&$variables) { 'action' => 'order', 'relationship' => 'sibling', 'group' => 'weight', - ] + ], ], ]; @@ -353,7 +353,7 @@ function template_preprocess_views_ui_rearrange_filter_form(&$variables) { 'action' => 'order', 'relationship' => 'sibling', 'group' => 'weight', - ] + ], ], ]; } diff --git a/core/modules/workflows/src/Form/WorkflowEditForm.php b/core/modules/workflows/src/Form/WorkflowEditForm.php index 676868d2421..d6560f592f5 100644 --- a/core/modules/workflows/src/Form/WorkflowEditForm.php +++ b/core/modules/workflows/src/Form/WorkflowEditForm.php @@ -77,7 +77,7 @@ class WorkflowEditForm extends EntityForm { $header = [ 'state' => $this->t('State'), 'weight' => $this->t('Weight'), - 'operations' => $this->t('Operations') + 'operations' => $this->t('Operations'), ]; $form['states_container'] = [ '#type' => 'details', @@ -117,14 +117,14 @@ class WorkflowEditForm extends EntityForm { 'edit' => [ 'title' => $this->t('Edit'), 'url' => Url::fromRoute('entity.workflow.edit_state_form', ['workflow' => $workflow->id(), 'workflow_state' => $state->id()]), - ] + ], ]; if ($this->entity->access('delete-state:' . $state->id())) { $links['delete'] = [ 'title' => t('Delete'), 'url' => Url::fromRoute('entity.workflow.delete_state_form', [ 'workflow' => $workflow->id(), - 'workflow_state' => $state->id() + 'workflow_state' => $state->id(), ]), ]; } @@ -155,7 +155,7 @@ class WorkflowEditForm extends EntityForm { 'weight' => $this->t('Weight'), 'from' => $this->t('From'), 'to' => $this->t('To'), - 'operations' => $this->t('Operations') + 'operations' => $this->t('Operations'), ]; $form['transitions_container'] = [ '#type' => 'details', diff --git a/core/modules/workflows/src/Form/WorkflowStateEditForm.php b/core/modules/workflows/src/Form/WorkflowStateEditForm.php index 7b8b90355eb..0ecc3cde6be 100644 --- a/core/modules/workflows/src/Form/WorkflowStateEditForm.php +++ b/core/modules/workflows/src/Form/WorkflowStateEditForm.php @@ -121,14 +121,14 @@ class WorkflowStateEditForm extends EntityForm { 'title' => $this->t('Edit'), 'url' => Url::fromRoute('entity.workflow.edit_transition_form', [ 'workflow' => $workflow->id(), - 'workflow_transition' => $transition->id() + 'workflow_transition' => $transition->id(), ]), ]; $links['delete'] = [ 'title' => t('Delete'), 'url' => Url::fromRoute('entity.workflow.delete_transition_form', [ 'workflow' => $workflow->id(), - 'workflow_transition' => $transition->id() + 'workflow_transition' => $transition->id(), ]), ]; $form['transitions'][$transition->id()] = [ @@ -230,8 +230,8 @@ class WorkflowStateEditForm extends EntityForm { ], '#url' => Url::fromRoute('entity.workflow.delete_state_form', [ 'workflow' => $this->entity->id(), - 'workflow_state' => $this->stateId - ]) + 'workflow_state' => $this->stateId, + ]), ]; return $actions; diff --git a/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php b/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php index ac1552ecdd0..2d01e4324e4 100644 --- a/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php +++ b/core/modules/workflows/src/Form/WorkflowTransitionEditForm.php @@ -224,8 +224,8 @@ class WorkflowTransitionEditForm extends EntityForm { ], '#url' => Url::fromRoute('entity.workflow.delete_transition_form', [ 'workflow' => $this->entity->id(), - 'workflow_transition' => $this->transitionId - ]) + 'workflow_transition' => $this->transitionId, + ]), ]; return $actions; diff --git a/core/modules/workflows/src/WorkflowListBuilder.php b/core/modules/workflows/src/WorkflowListBuilder.php index c36171aa6e8..a85ef659fb2 100644 --- a/core/modules/workflows/src/WorkflowListBuilder.php +++ b/core/modules/workflows/src/WorkflowListBuilder.php @@ -73,7 +73,7 @@ class WorkflowListBuilder extends ConfigEntityListBuilder { $row['label'] = $entity->label(); $row['type']['data'] = [ - '#markup' => $entity->getTypePlugin()->label() + '#markup' => $entity->getTypePlugin()->label(), ]; $items = array_map([State::class, 'labelCallback'], $entity->getTypePlugin()->getStates()); diff --git a/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php b/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php index f2d394c4060..21227d7c7a8 100644 --- a/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php +++ b/core/modules/workspace/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php @@ -125,7 +125,7 @@ abstract class WorkspaceResourceTestBase extends EntityResourceTestBase { ], 'uuid' => [ [ - 'value' => $this->entity->uuid() + 'value' => $this->entity->uuid(), ], ], ]; diff --git a/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php b/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php index eae90d2ca7b..dd34274e071 100644 --- a/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php +++ b/core/modules/workspace/tests/src/Kernel/WorkspaceIntegrationTest.php @@ -381,7 +381,7 @@ class WorkspaceIntegrationTest extends KernelTestBase { $this->switchToWorkspace('live'); $node_1 = $this->createNode([ - 'title' => 'live node 1' + 'title' => 'live node 1', ]); $entity_test = EntityTestMulRev::create([ 'name' => 'live entity_test_mulrev', diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 128b84efa66..30c8688ef69 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -21,6 +21,12 @@ + + + + + + diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php index 133e445bd04..ad8b4383bdb 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php @@ -138,7 +138,7 @@ class ContentEntityFormFieldValidationFilteringTest extends BrowserTestBase { // \Drupal\file\Plugin\Field\FieldWidget\FileWidget::process(). $text_file = current($this->getTestFiles('text')); $edit = [ - 'files[test_file_0]' => \Drupal::service('file_system')->realpath($text_file->uri) + 'files[test_file_0]' => \Drupal::service('file_system')->realpath($text_file->uri), ]; $assert_session->elementNotExists('css', 'input#edit-test-file-0-remove-button'); $this->drupalPostForm(NULL, $edit, 'Upload'); diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php index c8748342fb7..cc43936d6f1 100644 --- a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php +++ b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php @@ -83,7 +83,7 @@ class CorsIntegrationTest extends BrowserTestBase { $response = $httpClient->request('POST', $url->setAbsolute()->toString(), [ 'headers' => [ 'Origin' => $origin, - ] + ], ]); $this->assertEquals(200, $response->getStatusCode()); } diff --git a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php index 3aaac143eac..96b59d7be00 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php @@ -63,8 +63,8 @@ class CaseInsensitivePathTest extends BrowserTestBase { $this->drupalGet('admin/content', [ 'query' => [ - 'title' => 'FooBarBaz' - ] + 'title' => 'FooBarBaz', + ], ]); $this->assertSession()->linkExists('FooBarBaz'); @@ -74,8 +74,8 @@ class CaseInsensitivePathTest extends BrowserTestBase { $this->drupalGet('Admin/Content', [ 'query' => [ - 'title' => 'FooBarBaz' - ] + 'title' => 'FooBarBaz', + ], ]); $this->assertSession()->linkExists('FooBarBaz'); diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php index 744f527ba2a..d7d84708fe9 100644 --- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php +++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php @@ -265,7 +265,7 @@ abstract class UpdatePathTestBase extends BrowserTestBase { } $selectors_handler = new SelectorsHandler([ - 'hidden_field_selector' => new HiddenFieldSelector() + 'hidden_field_selector' => new HiddenFieldSelector(), ]); $session = new Session($driver, $selectors_handler); $this->mink = new Mink(); diff --git a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php index c52e3ea8533..4ceebf5b9b3 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/CacheabilityMetadataConfigOverrideTest.php @@ -21,7 +21,7 @@ class CacheabilityMetadataConfigOverrideTest extends KernelTestBase { 'config', 'config_override_test', 'system', - 'user' + 'user', ]; /** diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php index a9cd9f19022..6a0f938bd45 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigDependencyTest.php @@ -50,9 +50,9 @@ class ConfigDependencyTest extends EntityKernelTestBase { 'id' => 'entity1', 'dependencies' => [ 'enforced' => [ - 'module' => ['node'] - ] - ] + 'module' => ['node'], + ], + ], ] ); $entity1->save(); @@ -200,7 +200,7 @@ class ConfigDependencyTest extends EntityKernelTestBase { 'id' => 'entity1', 'dependencies' => [ 'enforced' => [ - 'module' => ['node', 'config_test'] + 'module' => ['node', 'config_test'], ], ], ] @@ -264,7 +264,7 @@ class ConfigDependencyTest extends EntityKernelTestBase { 'id' => 'entity_' . $entity_id_suffixes[0], 'dependencies' => [ 'enforced' => [ - 'module' => ['node', 'config_test'] + 'module' => ['node', 'config_test'], ], ], ] @@ -309,7 +309,7 @@ class ConfigDependencyTest extends EntityKernelTestBase { 'dependencies' => [ 'enforced' => [ 'config' => [$entity_1->getConfigDependencyName()], - 'module' => ['node', 'config_test'] + 'module' => ['node', 'config_test'], ], ], ] @@ -508,7 +508,7 @@ class ConfigDependencyTest extends EntityKernelTestBase { // Test dependencies between configuration entities. $entity1 = $storage->create( [ - 'id' => 'entity1' + 'id' => 'entity1', ] ); $entity1->save(); @@ -621,7 +621,7 @@ class ConfigDependencyTest extends EntityKernelTestBase { 'id' => 'entity1', 'dependencies' => [ 'enforced' => [ - 'content' => [$content_entity->getConfigDependencyName()] + 'content' => [$content_entity->getConfigDependencyName()], ], ], ] @@ -632,7 +632,7 @@ class ConfigDependencyTest extends EntityKernelTestBase { 'id' => 'entity2', 'dependencies' => [ 'enforced' => [ - 'config' => [$entity1->getConfigDependencyName()] + 'config' => [$entity1->getConfigDependencyName()], ], ], ] diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php index 4cbc16a0e04..1b468b0670f 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityNormalizeTest.php @@ -31,7 +31,7 @@ class ConfigEntityNormalizeTest extends KernelTestBase { $config = $this->config('config_test.dynamic.system'); $data = [ 'label' => 'foobar', - 'additional_key' => TRUE + 'additional_key' => TRUE, ] + $config->getRawData(); $config->setData($data)->save(); $this->assertNotIdentical($config_entity->toArray(), $config->getRawData(), 'Stored config entity is not is equivalent to config schema.'); diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php index 807152bfedd..154d2383b4f 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityUnitTest.php @@ -97,7 +97,7 @@ class ConfigEntityUnitTest extends KernelTestBase { $entity = $this->storage->create([ 'id' => $this->randomMachineName(), 'label' => $this->randomString(), - 'style' => 999 + 'style' => 999, ]); $entity->save(); $this->assertSame('999', $entity->style); diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php index 01a9746dffe..84b5a2de131 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php @@ -105,7 +105,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase { catch (ConfigImporterException $e) { $this->pass('Expected ConfigImporterException thrown when a renamed configuration entity does not match the existing entity type.'); $expected = [ - new FormattableMarkup('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', ['@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id]) + new FormattableMarkup('Entity type mismatch on rename. @old_type not equal to @new_type for existing configuration @old_name and staged configuration @new_name.', ['@old_type' => 'node_type', '@new_type' => 'config_test', '@old_name' => 'node.type.' . $content_type->id(), '@new_name' => 'config_test.dynamic.' . $test_entity_id]), ]; $this->assertEqual($expected, $this->configImporter->getErrors()); } @@ -134,7 +134,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase { // UUIDs match. $this->configImporter->reset(); $expected = [ - 'config_test.old::config_test.new' + 'config_test.old::config_test.new', ]; $renames = $this->configImporter->getUnprocessedConfiguration('rename'); $this->assertSame($expected, $renames); @@ -148,7 +148,7 @@ class ConfigImportRenameValidationTest extends KernelTestBase { catch (ConfigImporterException $e) { $this->pass('Expected ConfigImporterException thrown when simple configuration is renamed.'); $expected = [ - new FormattableMarkup('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', ['@old_name' => 'config_test.old', '@new_name' => 'config_test.new']) + new FormattableMarkup('Rename operation for simple configuration. Existing configuration @old_name and staged configuration @new_name.', ['@old_name' => 'config_test.old', '@new_name' => 'config_test.new']), ]; $this->assertEqual($expected, $this->configImporter->getErrors()); } diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php index 3aff3d5302a..dc4e0ae12b9 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php @@ -226,7 +226,7 @@ class ConfigImporterTest extends KernelTestBase { // Add a dependency on primary, to ensure that is synced first. 'dependencies' => [ 'config' => [$name_primary], - ] + ], ]; $sync->write($name_secondary, $values_secondary); @@ -265,7 +265,7 @@ class ConfigImporterTest extends KernelTestBase { // Add a dependency on secondary, so that is synced first. 'dependencies' => [ 'config' => [$name_secondary], - ] + ], ]; $sync->write($name_primary, $values_primary); $values_secondary = [ @@ -322,7 +322,7 @@ class ConfigImporterTest extends KernelTestBase { // Add a dependency on deleter, to make sure that is synced first. 'dependencies' => [ 'config' => [$name_deleter], - ] + ], ]; $storage->write($name_deletee, $values_deletee); $values_deletee['label'] = 'Updated Deletee'; @@ -338,7 +338,7 @@ class ConfigImporterTest extends KernelTestBase { // will also be synced after the deletee due to alphabetical ordering. 'dependencies' => [ 'config' => [$name_deleter], - ] + ], ]; $storage->write($name_other, $values_other); $values_other['label'] = 'Updated other'; diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php index b2859a0bbfc..e16225d0eca 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigSchemaTest.php @@ -352,7 +352,7 @@ class ConfigSchemaTest extends KernelTestBase { // If the config schema doesn't have a type it shouldn't be casted. 'no_type' => 1, 'mapping' => [ - 'string' => 1 + 'string' => 1, ], 'float' => '3.14', 'null_float' => '', @@ -375,7 +375,7 @@ class ConfigSchemaTest extends KernelTestBase { 'boolean' => TRUE, 'no_type' => 1, 'mapping' => [ - 'string' => '1' + 'string' => '1', ], 'float' => 3.14, 'null_float' => NULL, diff --git a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php index c18910e21d4..dc121eaf565 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php @@ -65,7 +65,7 @@ class EntityAutocompleteElementFormTest extends EntityKernelTestBase implements for ($i = 1; $i < 3; $i++) { $entity = EntityTest::create([ - 'name' => $this->randomMachineName() + 'name' => $this->randomMachineName(), ]); $entity->save(); $this->referencedEntities[] = $entity; @@ -297,7 +297,7 @@ class EntityAutocompleteElementFormTest extends EntityKernelTestBase implements $form_state = (new FormState()) ->setValues([ 'single_no_validate' => 'single - non-existent label', - 'single_autocreate_no_validate' => 'single - autocreate non-existent label' + 'single_autocreate_no_validate' => 'single - autocreate non-existent label', ]); $form_builder->submitForm($this, $form_state); @@ -309,7 +309,7 @@ class EntityAutocompleteElementFormTest extends EntityKernelTestBase implements $form_state = (new FormState()) ->setValues([ 'single_no_validate' => 'single - non-existent label (42)', - 'single_autocreate_no_validate' => 'single - autocreate non-existent label (43)' + 'single_autocreate_no_validate' => 'single - autocreate non-existent label (43)', ]); $form_builder->submitForm($this, $form_state); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php index 8545efe0fa0..c7bcc292272 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php @@ -351,7 +351,7 @@ class EntityAccessControlHandlerTest extends EntityLanguageTestBase { 'name' => 'A test entity', 'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe', ], - FALSE + FALSE, ], 'string ID entity' => [ EntityTestStringId::class, @@ -360,7 +360,7 @@ class EntityAccessControlHandlerTest extends EntityLanguageTestBase { 'name' => 'A test entity', 'uuid' => '60e3a179-79ed-4653-ad52-5e614c8e8fbe', ], - TRUE + TRUE, ], ]; } diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php index ff3cee57126..4cbffedbf8c 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php @@ -1067,7 +1067,7 @@ class EntityDefinitionUpdateTest extends EntityKernelTestBase { // field, allowing us to test the 'default_value' parameter of // \Drupal\Core\Field\BaseFieldDefinition::setInitialValueFromField(). $storage->create([ - 'name' => 'Second entity' + 'name' => 'Second entity', ])->save(); // Add a base field with an initial value inherited from another field. diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php index 4974a74cb75..afd7e0d9b79 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php @@ -35,12 +35,12 @@ class EntityLoadByUuidTest extends KernelTestBase { // Create two test entities. $entity_0 = EntityTest::create([ 'type' => 'entity_test', - 'name' => 'published entity' + 'name' => 'published entity', ]); $entity_0->save(); $entity_1 = EntityTest::create([ 'type' => 'entity_test', - 'name' => 'unpublished entity' + 'name' => 'unpublished entity', ]); $entity_1->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php index f048569707d..3f30b2b8996 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php @@ -683,7 +683,7 @@ class EntityQueryTest extends EntityKernelTestBase { 'translatable' => FALSE, 'settings' => [ 'case_sensitive' => FALSE, - ] + ], ]); $field_storage->save(); @@ -729,7 +729,7 @@ class EntityQueryTest extends EntityKernelTestBase { 'name' => $this->randomMachineName(), 'langcode' => 'en', 'field_ci' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase'], - 'field_cs' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase'] + 'field_cs' => $fixtures[0]['uppercase'] . $fixtures[1]['lowercase'], ])->save(); // Check the case insensitive field, = operator. @@ -920,7 +920,7 @@ class EntityQueryTest extends EntityKernelTestBase { $entity->isDefaultRevision(FALSE); $entity->{$this->figures}->setValue([ 'color' => 'red', - 'shape' => 'square' + 'shape' => 'square', ]); $entity->save(); @@ -949,7 +949,7 @@ class EntityQueryTest extends EntityKernelTestBase { $entity->isDefaultRevision(FALSE); $entity->{$this->figures}->setValue([ 'color' => 'red', - 'shape' => 'square' + 'shape' => 'square', ]); $entity->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php index cedf6851a8b..469f4a32a55 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityReferenceFieldTest.php @@ -212,7 +212,7 @@ class EntityReferenceFieldTest extends EntityKernelTestBase { // Create the default target entity. $target_entity = EntityTestStringId::create([ 'id' => $this->randomString(), - 'type' => $this->bundle + 'type' => $this->bundle, ]); $target_entity->save(); @@ -381,7 +381,7 @@ class EntityReferenceFieldTest extends EntityKernelTestBase { $definitions = [ 'target_reference' => BaseFieldDefinition::create('entity_reference') ->setSetting('target_type', $entity_type->id()) - ->setSetting('handler', 'default') + ->setSetting('handler', 'default'), ]; $this->state->set('entity_test_update.additional_base_field_definitions', $definitions); $this->entityManager->clearCachedDefinitions(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php index 9c003493f43..0ef35db9dfb 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php @@ -88,7 +88,7 @@ class FieldSqlStorageTest extends EntityKernelTestBase { $this->fieldStorage->save(); $this->field = FieldConfig::create([ 'field_storage' => $this->fieldStorage, - 'bundle' => $entity_type + 'bundle' => $entity_type, ]); $this->field->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php index 81e1976fef5..d3d5e5b1d41 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php @@ -144,7 +144,7 @@ class FieldWidgetConstraintValidatorTest extends KernelTestBase { */ public function testEntityLevelConstraintValidation() { $entity = EntityTestCompositeConstraint::create([ - 'name' => 'entity-level-violation' + 'name' => 'entity-level-violation', ]); $entity->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php index df9f4b13376..d68a1f5ac8c 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php @@ -34,7 +34,7 @@ class RouteProviderTest extends KernelTestBase { /** @var \Drupal\user\RoleInterface $role */ $role = Role::create([ - 'id' => RoleInterface::ANONYMOUS_ID + 'id' => RoleInterface::ANONYMOUS_ID, ]); $role ->grantPermission('administer entity_test content') diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php index 3f182c91e80..be609d8d712 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/ValidReferenceConstraintValidatorTest.php @@ -150,7 +150,7 @@ class ValidReferenceConstraintValidatorTest extends EntityKernelTestBase { ['entity' => $unpublished_node], ['entity' => $different_bundle_node], ['entity' => $deleted_node], - ] + ], ]); // Check that users with access are able pass the validation for fields diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php index 590a96cd5f8..9229a60b0b5 100644 --- a/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php +++ b/core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php @@ -82,7 +82,7 @@ class FieldSettingsTest extends EntityKernelTestBase { $field_storage = FieldStorageConfig::create([ 'field_name' => 'test_field', 'entity_type' => 'entity_test', - 'type' => 'test_field' + 'type' => 'test_field', ]); // Check that the default settings have been populated. @@ -109,11 +109,11 @@ class FieldSettingsTest extends EntityKernelTestBase { $field_storage = FieldStorageConfig::create([ 'field_name' => 'test_field', 'entity_type' => 'entity_test', - 'type' => 'test_field' + 'type' => 'test_field', ]); $field = FieldConfig::create([ 'field_storage' => $field_storage, - 'bundle' => 'entity_test' + 'bundle' => 'entity_test', ]); // Note: FieldConfig does not populate default settings until the config // is saved. diff --git a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php index 05ac7c2557f..4eca9976f22 100644 --- a/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php +++ b/core/tests/Drupal/KernelTests/Core/File/MimeTypeTest.php @@ -62,7 +62,7 @@ class MimeTypeTest extends FileTestBase { 'extensions' => [ 'jar' => 0, 'jpg' => 1, - ] + ], ]; $test_case = [ diff --git a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php index 57e0342075f..5c31dc66a42 100644 --- a/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php +++ b/core/tests/Drupal/KernelTests/Core/Image/ToolkitGdTest.php @@ -119,7 +119,7 @@ class ToolkitGdTest extends KernelTestBase { 'gif' => IMAGETYPE_GIF, 'jpeg' => IMAGETYPE_JPEG, 'jpg' => IMAGETYPE_JPEG, - 'jpe' => IMAGETYPE_JPEG + 'jpe' => IMAGETYPE_JPEG, ]; $image = $this->imageFactory->get(); foreach ($expected_image_types as $extension => $expected_image_type) { @@ -266,7 +266,7 @@ class ToolkitGdTest extends KernelTestBase { array_fill(0, 3, 76) + [3 => 0], array_fill(0, 3, 149) + [3 => 0], array_fill(0, 3, 29) + [3 => 0], - array_fill(0, 3, 225) + [3 => 127] + array_fill(0, 3, 225) + [3 => 127], ], ], ]; diff --git a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php index 5966eaa745f..6bf2faaa984 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php @@ -266,7 +266,7 @@ class TableTest extends KernelTestBase { [ '1-one', [ - 'data' => '1-two' + 'data' => '1-two', ], '1-three', ], diff --git a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php index 2acaefb873b..043aae4445c 100644 --- a/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Render/RenderTest.php @@ -36,7 +36,7 @@ class RenderTest extends KernelTestBase { 'library' => [ 'test/generic_preprocess', 'test/specific_preprocess', - ] + ], ]; $this->assertEqual($expected_attached, $test_element['#attached'], 'All expected assets from theme preprocess hooks attached.'); diff --git a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php index ef593751bf2..40a8a743dd3 100644 --- a/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php +++ b/core/tests/Drupal/KernelTests/Core/Site/SettingsRewriteTest.php @@ -111,7 +111,7 @@ EXPECTED 'required' => TRUE, ], ], - 'expected' => '$no_index = true;' + 'expected' => '$no_index = true;', ]; // Make an empty file. $filename = Settings::get('file_public_path', $site_path . '/files') . '/mock_settings.php'; diff --git a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php index 748e2bbc6fa..d190cc53439 100644 --- a/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php +++ b/core/tests/Drupal/KernelTests/Core/StringTranslation/TranslationStringTest.php @@ -19,7 +19,7 @@ class TranslationStringTest extends KernelTestBase { * @var array */ public static $modules = [ - 'language' + 'language', ]; /** diff --git a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php index 7f6d2eccda8..169da31925d 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php @@ -205,7 +205,7 @@ class RegistryTest extends KernelTestBase { $expected = [ 'template_preprocess', 'template_preprocess_container', - 'template_preprocess_theme_test_registered_by_module' + 'template_preprocess_theme_test_registered_by_module', ]; $registry = $registry_theme->get(); $this->assertEquals($expected, array_values($registry['theme_test_registered_by_module']['preprocess functions'])); diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php index c44cc1c8141..8bcc3c4bc98 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php @@ -73,7 +73,7 @@ class ThemeRenderAndAutoescapeTest extends KernelTestBase { 'type markup with EM tags is rendered' => [['#markup' => 'hi'], 'hi'], 'SCRIPT tag in string is escaped' => [ '', - Html::escape('') + Html::escape(''), ], 'type plain_text render array EM tag is escaped' => [['#plain_text' => 'hi'], Html::escape('hi')], 'type hidden render array is rendered' => [['#type' => 'hidden', '#name' => 'foo', '#value' => 'bar'], "\n"], diff --git a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php index dbdf351a718..826ac047cb5 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php @@ -30,7 +30,7 @@ class TwigMarkupInterfaceTest extends KernelTestBase { * @var array */ public static $modules = [ - 'language' + 'language', ]; /** diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php index bbdf10992f3..54f2872ab8b 100644 --- a/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php +++ b/core/tests/Drupal/KernelTests/Core/TypedData/ComplexDataConstraintValidatorTest.php @@ -37,7 +37,7 @@ class ComplexDataConstraintValidatorTest extends KernelTestBase { ->setPropertyDefinition('key', DataDefinition::create('integer')) ->addConstraint('ComplexData', [ 'key' => [ - 'AllowedValues' => [1, 2, 3] + 'AllowedValues' => [1, 2, 3], ], ]); @@ -67,7 +67,7 @@ class ComplexDataConstraintValidatorTest extends KernelTestBase { ->setPropertyDefinition('key', DataDefinition::create('integer')) ->addConstraint('ComplexData', [ 'key' => [ - 'NotNull' => [] + 'NotNull' => [], ], ]); diff --git a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php index e3e3fae2fe8..581960ed509 100644 --- a/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php +++ b/core/tests/Drupal/KernelTests/Core/TypedData/TypedDataTest.php @@ -470,7 +470,7 @@ class TypedDataTest extends KernelTestBase { $this->assertEqual($value, [ 'one' => 'uno', 'two' => 'zwei', - 'three' => 'drei' + 'three' => 'drei', ]); $properties = $typed_data->getProperties(); diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index 313b2036d9f..433ec38f411 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -313,7 +313,7 @@ abstract class BrowserTestBase extends TestCase { } $selectors_handler = new SelectorsHandler([ - 'hidden_field_selector' => new HiddenFieldSelector() + 'hidden_field_selector' => new HiddenFieldSelector(), ]); $session = new Session($driver, $selectors_handler); $this->mink = new Mink(); diff --git a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php index 717e32749a9..b37a2bfde4f 100644 --- a/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php +++ b/core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php @@ -159,7 +159,7 @@ class InspectorTest extends TestCase { [__CLASS__, 'callMeStatic'], function () { return TRUE; - } + }, ])); $this->assertFalse(Inspector::assertAllCallable([ @@ -169,7 +169,7 @@ class InspectorTest extends TestCase { function () { return TRUE; }, - "I'm not callable" + "I'm not callable", ])); } diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php index 1b5b23f347e..577bb8baffd 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php @@ -993,7 +993,7 @@ class ContainerTest extends TestCase { 'arguments' => [], 'configurator' => [ $this->getServiceCall('configurator'), - 'configureService' + 'configureService', ], ]; $services['configurable_service_exception'] = [ diff --git a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php index 4760c1955b2..0d1ef58c195 100644 --- a/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php +++ b/core/tests/Drupal/Tests/Component/FileSystem/RegexDirectoryIteratorTest.php @@ -91,7 +91,7 @@ class RegexDirectoryIteratorTest extends TestCase { [ '1.yml', '2.yml', - '3.txt' + '3.txt', ], ], [ diff --git a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php index 2f8f23e5b3c..82226d0d342 100644 --- a/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php +++ b/core/tests/Drupal/Tests/Component/Serialization/YamlTestBase.php @@ -37,7 +37,7 @@ abstract class YamlTestBase extends TestCase { [10], [0 => '123456'], ], - [NULL] + [NULL], ]; } diff --git a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php index 10664ffc66d..02a4ed5f15b 100644 --- a/core/tests/Drupal/Tests/Component/Utility/ColorTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/ColorTest.php @@ -61,7 +61,7 @@ class ColorTest extends TestCase { // Add invalid data types (hex value must be a string). foreach ([ 1, 12, 1234, 12345, 123456, 1234567, 12345678, 123456789, 123456789, - -1, PHP_INT_MAX, PHP_INT_MAX + 1, -PHP_INT_MAX, 0x0, 0x010 + -1, PHP_INT_MAX, PHP_INT_MAX + 1, -PHP_INT_MAX, 0x0, 0x010, ] as $value) { $invalid[] = [$value, '', TRUE]; } diff --git a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php index 80fc7ddf33c..4cdb1b62f00 100644 --- a/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php @@ -265,7 +265,7 @@ class NestedArrayTest extends TestCase { public function providerTestFilter() { $data = []; $data['1d-array'] = [ - [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE] + [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE], ]; $data['1d-array-callable'] = [ [0, 1, '', TRUE], diff --git a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php index 7503cc27100..ab2447065a7 100644 --- a/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/SortArrayTest.php @@ -49,42 +49,42 @@ class SortArrayTest extends TestCase { $tests[] = [ ['weight' => 1], ['weight' => 1], - 0 + 0, ]; // Weights set and $a is less (lighter) than $b. $tests[] = [ ['weight' => 1], ['weight' => 2], - -1 + -1, ]; // Weights set and $a is greater (heavier) than $b. $tests[] = [ ['weight' => 2], ['weight' => 1], - 1 + 1, ]; // Weights not set. $tests[] = [ [], [], - 0 + 0, ]; // Weights for $b not set. $tests[] = [ ['weight' => 1], [], - 1 + 1, ]; // Weights for $a not set. $tests[] = [ [], ['weight' => 1], - -1 + -1, ]; return $tests; @@ -125,42 +125,42 @@ class SortArrayTest extends TestCase { $tests[] = [ ['#weight' => 1], ['#weight' => 1], - 0 + 0, ]; // Weights set and $a is less (lighter) than $b. $tests[] = [ ['#weight' => 1], ['#weight' => 2], - -1 + -1, ]; // Weights set and $a is greater (heavier) than $b. $tests[] = [ ['#weight' => 2], ['#weight' => 1], - 1 + 1, ]; // Weights not set. $tests[] = [ [], [], - 0 + 0, ]; // Weights for $b not set. $tests[] = [ ['#weight' => 1], [], - 1 + 1, ]; // Weights for $a not set. $tests[] = [ [], ['#weight' => 1], - -1 + -1, ]; return $tests; @@ -201,35 +201,35 @@ class SortArrayTest extends TestCase { $tests[] = [ ['title' => 'test'], ['title' => 'test'], - 0 + 0, ]; // Title $a not set. $tests[] = [ [], ['title' => 'test'], - -4 + -4, ]; // Title $b not set. $tests[] = [ ['title' => 'test'], [], - 4 + 4, ]; // Titles set but not equal. $tests[] = [ ['title' => 'test'], ['title' => 'testing'], - -1 + -1, ]; // Titles set but not equal. $tests[] = [ ['title' => 'testing'], ['title' => 'test'], - 1 + 1, ]; return $tests; @@ -270,35 +270,35 @@ class SortArrayTest extends TestCase { $tests[] = [ ['#title' => 'test'], ['#title' => 'test'], - 0 + 0, ]; // Title $a not set. $tests[] = [ [], ['#title' => 'test'], - -4 + -4, ]; // Title $b not set. $tests[] = [ ['#title' => 'test'], [], - 4 + 4, ]; // Titles set but not equal. $tests[] = [ ['#title' => 'test'], ['#title' => 'testing'], - -1 + -1, ]; // Titles set but not equal. $tests[] = [ ['#title' => 'testing'], ['#title' => 'test'], - 1 + 1, ]; return $tests; diff --git a/core/tests/Drupal/Tests/Component/Utility/XssTest.php b/core/tests/Drupal/Tests/Component/Utility/XssTest.php index 0664f94272c..695b4278ed3 100644 --- a/core/tests/Drupal/Tests/Component/Utility/XssTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/XssTest.php @@ -503,31 +503,31 @@ class XssTest extends TestCase { 'Example: alt', 'Example: alt', 'Image tag with alt and title attribute', - ['img'] + ['img'], ], [ 'Drupal', 'Drupal', 'Link tag with rel attribute', - ['a'] + ['a'], ], [ 'Drupal 8: The best release ever.', 'Drupal 8: The best release ever.', 'Span tag with property attribute', - ['span'] + ['span'], ], [ '', '', 'Image tag with data attribute', - ['img'] + ['img'], ], [ '', '', 'Link tag with numeric data attribute', - ['a'] + ['a'], ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php index 7be87f593f3..65038a6dc8a 100644 --- a/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php +++ b/core/tests/Drupal/Tests/Core/Annotation/TranslationTest.php @@ -55,7 +55,7 @@ class TranslationTest extends UnitTestCase { [ 'value' => 'Foo', ], - 'Foo' + 'Foo', ]; $random = $this->randomMachineName(); $random_html_entity = '&' . $random; diff --git a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php index 95cacea45c6..99ba0a5ef9c 100644 --- a/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php @@ -141,12 +141,12 @@ class AssetResolverTest extends UnitTestCase { 'same libraries, different timestamps' => [ (new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currentTime' => $time]), (new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currentTime' => $time + 100]), - 1 + 1, ], 'different libraries, same timestamps' => [ (new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal'])->setSettings(['currenttime' => $time]), (new AttachedAssets())->setAlreadyLoadedLibraries([])->setLibraries(['core/drupal', 'core/jquery'])->setSettings(['currentTime' => $time]), - 2 + 2, ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php index ba0b4db532f..18c7b0080eb 100644 --- a/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php @@ -94,7 +94,7 @@ class CssCollectionRendererUnitTest extends UnitTestCase { '#tag' => 'style', '#value' => $value, '#attributes' => [ - 'media' => $media + 'media' => $media, ], '#browsers' => $browsers, ]; @@ -461,7 +461,7 @@ class CssCollectionRendererUnitTest extends UnitTestCase { 'media' => 'all', 'preprocess' => TRUE, 'browsers' => [], - 'data' => 'http://example.com/popular.js' + 'data' => 'http://example.com/popular.js', ]; $this->renderer->render($css_group); } diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php index f3824e8d500..8b0b7598165 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/CacheableMetadataTest.php @@ -128,7 +128,7 @@ class CacheableMetadataTest extends UnitTestCase { [new \stdClass(), TRUE], [300, FALSE], [[], TRUE], - [8.0, TRUE] + [8.0, TRUE], ]; } diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php index 76f33eb96ed..c792d1abad5 100644 --- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php +++ b/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php @@ -72,7 +72,7 @@ class QuickStartTest extends TestCase { // Delete test site directory. $this->fileUnmanagedDeleteRecursive($test_site_directory, [ BrowserTestBase::class, - 'filePreDeleteCallback' + 'filePreDeleteCallback', ]); } } @@ -113,7 +113,7 @@ class QuickStartTest extends TestCase { define('DRUPAL_TEST_IN_CHILD_SITE', FALSE); chmod($this->testDb->getTestSitePath(), 0755); $cookieJar = CookieJar::fromArray([ - 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()) + 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()), ], '127.0.0.1'); $response = $guzzle->get('http://127.0.0.1:' . $port, ['cookies' => $cookieJar]); @@ -165,7 +165,7 @@ class QuickStartTest extends TestCase { define('DRUPAL_TEST_IN_CHILD_SITE', FALSE); chmod($this->testDb->getTestSitePath(), 0755); $cookieJar = CookieJar::fromArray([ - 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()) + 'SIMPLETEST_USER_AGENT' => drupal_generate_test_ua($this->testDb->getDatabasePrefix()), ], '127.0.0.1'); $response = $guzzle->get('http://127.0.0.1:' . $port, ['cookies' => $cookieJar]); diff --git a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php index 00a5eb2ea62..b2ddd5e3652 100644 --- a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php +++ b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php @@ -38,7 +38,7 @@ class AttributesTest extends UnitTestCase { 'alt' => 'Alternate', ], ' id="id-test" class="first last" alt="Alternate"', - 'Multiple attributes.' + 'Multiple attributes.', ], // Verify empty attributes array is rendered. [[], '', 'Empty attributes array.'], diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php index 0d417ab4940..81d424b2ce1 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php @@ -283,13 +283,13 @@ class ConfigEntityBaseUnitTest extends UnitTestCase { 'config_dependencies' => [ 'config' => [$instance_dependency_1], 'module' => [$instance_dependency_2], - ] + ], ], [ 'config' => [$instance_dependency_1], - 'module' => [$instance_dependency_2, 'test'] - ] - ] + 'module' => [$instance_dependency_2, 'test'], + ], + ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php index 7bcbc97cc99..f689db48ab2 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityDependencyTest.php @@ -29,7 +29,7 @@ class ConfigEntityDependencyTest extends UnitTestCase { 'dependencies' => [ 'module' => [ 'node', - 'views' + 'views', ], 'config' => [ 'config_test.dynamic.entity_id:745b0ce0-aece-42dd-a800-ade5b8455e84', diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php index 914d4f6fe53..c5d4c1c4ea5 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php @@ -85,7 +85,7 @@ class ConfigEntityTypeTest extends UnitTestCase { $this->setExpectedException(ConfigEntityStorageClassException::class, '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage is not \Drupal\Core\Config\Entity\ConfigEntityStorage or it does not extend it'); new ConfigEntityType([ 'id' => 'example_config_entity_type', - 'handlers' => ['storage' => '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage'] + 'handlers' => ['storage' => '\Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage'], ]); } diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php index f3c882cec05..5558b26e836 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/Query/QueryFactoryTest.php @@ -37,42 +37,42 @@ class QueryFactoryTest extends UnitTestCase { $tests[] = [ ['uuid:abc'], 'uuid', - $this->getConfigObject('test')->set('uuid', 'abc') + $this->getConfigObject('test')->set('uuid', 'abc'), ]; // Tests a lookup being set to a top level key when sub-keys exist. $tests[] = [ [], 'uuid', - $this->getConfigObject('test')->set('uuid.blah', 'abc') + $this->getConfigObject('test')->set('uuid.blah', 'abc'), ]; // Tests a non existent key. $tests[] = [ [], 'uuid', - $this->getConfigObject('test') + $this->getConfigObject('test'), ]; // Tests a non existent sub key. $tests[] = [ [], 'uuid.blah', - $this->getConfigObject('test')->set('uuid', 'abc') + $this->getConfigObject('test')->set('uuid', 'abc'), ]; // Tests a existent sub key. $tests[] = [ ['uuid.blah:abc'], 'uuid.blah', - $this->getConfigObject('test')->set('uuid.blah', 'abc') + $this->getConfigObject('test')->set('uuid.blah', 'abc'), ]; // One wildcard. $tests[] = [ ['test.*.value:a', 'test.*.value:b'], 'test.*.value', - $this->getConfigObject('test')->set('test.a.value', 'a')->set('test.b.value', 'b') + $this->getConfigObject('test')->set('test.a.value', 'a')->set('test.b.value', 'b'), ]; // Three wildcards. @@ -82,14 +82,14 @@ class QueryFactoryTest extends UnitTestCase { $this->getConfigObject('test') ->set('test.a.sub2.a.sub4.a.value', 'aaa') ->set('test.a.sub2.a.sub4.b.value', 'aab') - ->set('test.b.sub2.a.sub4.b.value', 'bab') + ->set('test.b.sub2.a.sub4.b.value', 'bab'), ]; // Three wildcards in a row. $tests[] = [ ['test.*.*.*.value:abc', 'test.*.*.*.value:abd'], 'test.*.*.*.value', - $this->getConfigObject('test')->set('test.a.b.c.value', 'abc')->set('test.a.b.d.value', 'abd') + $this->getConfigObject('test')->set('test.a.b.c.value', 'abc')->set('test.a.b.d.value', 'abd'), ]; return $tests; diff --git a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php index fc0d63bede3..353e6d3c7b0 100644 --- a/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php +++ b/core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php @@ -63,7 +63,7 @@ class StorageComparerTest extends UnitTestCase { 'uuid' => $uuid->generate(), 'dependencies' => [ 'config' => [ - 'field.storage.node.body' + 'field.storage.node.body', ], ], ], @@ -89,7 +89,7 @@ class StorageComparerTest extends UnitTestCase { ], // Simple config. 'system.performance' => [ - 'stale_file_threshold' => 2592000 + 'stale_file_threshold' => 2592000, ], ]; diff --git a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php index 227027b3933..8d0fccdd6bb 100644 --- a/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php +++ b/core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php @@ -161,7 +161,7 @@ class ControllerResolverTest extends UnitTestCase { // Tests passing a controller via the request. [['_controller' => 'Drupal\Tests\Core\Controller\MockContainerAware::getResult'], 'Drupal\Tests\Core\Controller\MockContainerAware', 'This is container aware.'], // Tests a request with no controller specified. - [[], FALSE] + [[], FALSE], ]; } diff --git a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php index 455cbcf799a..fde641bd400 100644 --- a/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Datetime/DateHelperTest.php @@ -51,7 +51,7 @@ class DateHelperTest extends UnitTestCase { 5 => 'Friday', 6 => 'Saturday', 0 => 'Sunday', - ] + ], ]; $data[] = [ 2, diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php index 30a515c78b7..76ab32e331d 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php @@ -347,7 +347,7 @@ class TaggedHandlersPassTest extends UnitTestCase { $container ->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments') ->addTag('service_collector', [ - 'call' => 'addNoPriority' + 'call' => 'addNoPriority', ]); $container @@ -376,7 +376,7 @@ class TaggedHandlersPassTest extends UnitTestCase { $container ->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments') ->addTag('service_collector', [ - 'call' => 'addWithId' + 'call' => 'addWithId', ]); $container @@ -408,7 +408,7 @@ class TaggedHandlersPassTest extends UnitTestCase { $container ->register('consumer_id', __NAMESPACE__ . '\ValidConsumerWithExtraArguments') ->addTag('service_collector', [ - 'call' => 'addWithDifferentOrder' + 'call' => 'addWithDifferentOrder', ]); $container @@ -416,7 +416,7 @@ class TaggedHandlersPassTest extends UnitTestCase { ->addTag('consumer_id', [ 'priority' => 0, 'extra1' => 'extra1', - 'extra3' => 'extra3' + 'extra3' => 'extra3', ]); $handler_pass = new TaggedHandlersPass(); diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php index 4d198b9cb20..308c49c0faa 100644 --- a/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DiscoverServiceProvidersTest.php @@ -21,7 +21,7 @@ class DiscoverServiceProvidersTest extends UnitTestCase { public function testDiscoverServiceCustom() { new Settings([ 'container_yamls' => [ - __DIR__ . '/fixtures/custom.yml' + __DIR__ . '/fixtures/custom.yml', ], ]); diff --git a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php index da041bda4e4..bc32d04ba68 100644 --- a/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php @@ -116,7 +116,7 @@ namespace Drupal\Tests\Core\DrupalKernel { 'www.example.com', 'www.example.com', 'canonical URL is trusted', - TRUE + TRUE, ]; // Tests missing hostname for HTTP/1.0 compatibility where the Host @@ -128,25 +128,25 @@ namespace Drupal\Tests\Core\DrupalKernel { 'example.com', 'www.example.com', 'host from settings is trusted', - TRUE + TRUE, ]; $data[] = [ 'subdomain.example.com', 'www.example.com', 'host from settings is trusted', - TRUE + TRUE, ]; $data[] = [ 'www.example.org', 'www.example.com', 'host from settings is trusted', - TRUE + TRUE, ]; $data[] = [ 'example.org', 'www.example.com', 'host from settings is trusted', - TRUE + TRUE, ]; // Tests mismatch. @@ -154,7 +154,7 @@ namespace Drupal\Tests\Core\DrupalKernel { 'www.blackhat.com', 'www.example.com', 'unspecified host is untrusted', - FALSE + FALSE, ]; return $data; diff --git a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php index 81069c35d3f..eeba7e54c5d 100644 --- a/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/BaseFieldDefinitionTest.php @@ -40,7 +40,7 @@ class BaseFieldDefinitionTest extends UnitTestCase { $this->fieldTypeDefinition = [ 'id' => $this->fieldType, 'storage_settings' => [ - 'some_setting' => 'value 1' + 'some_setting' => 'value 1', ], 'field_settings' => [ 'some_instance_setting' => 'value 2', diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php index a7f7eb41aa7..87b8a68fc1c 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php @@ -676,7 +676,7 @@ class EntityFieldManagerTest extends UnitTestCase { 'type' => 'string', 'bundles' => ['second_bundle' => 'second_bundle'], ], - ] + ], ]; $this->assertEquals($expected, $this->entityFieldManager->getFieldMap()); } @@ -695,7 +695,7 @@ class EntityFieldManagerTest extends UnitTestCase { 'type' => 'string', 'bundles' => ['second_bundle' => 'second_bundle'], ], - ] + ], ]; $this->setUpEntityTypeDefinitions(); $this->cacheBackend->get('entity_field_map')->willReturn((object) ['data' => $expected]); diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php index 5643b15ca3e..a18e41076d1 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @@ -155,7 +155,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { ], 'domain' => [ 'type' => 'varchar', - ] + ], ], 'unique keys' => [ 'email' => ['username', 'hostname', ['domain', 3]], @@ -194,7 +194,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { ], 'city' => [ 'type' => 'varchar', - ] + ], ], 'indexes' => [ 'country_state_city' => ['country', 'state', ['city', 10]], @@ -397,7 +397,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { 'id' => 'id', 'revision' => 'revision_id', ], - ] + ], ]) ->setMethods(['getRevisionMetadataKeys']) ->getMock(); @@ -429,7 +429,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { 'revision_id' => [ 'type' => 'int', 'not null' => FALSE, - ] + ], ], 'primary key' => ['id'], 'unique keys' => [ @@ -440,7 +440,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { 'entity_test__revision' => [ 'table' => 'entity_test_revision', 'columns' => ['revision_id' => 'revision_id'], - ] + ], ], ], 'entity_test_revision' => [ @@ -533,7 +533,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { 'langcode' => [ 'type' => 'varchar', 'not null' => TRUE, - ] + ], ], 'primary key' => ['id'], 'unique keys' => [], @@ -613,7 +613,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { 'revision' => 'revision_id', 'langcode' => 'langcode', ], - ] + ], ]) ->setMethods(['getRevisionMetadataKeys']) ->getMock(); @@ -670,7 +670,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { 'langcode' => [ 'type' => 'varchar', 'not null' => TRUE, - ] + ], ], 'primary key' => ['id'], 'unique keys' => [ @@ -853,7 +853,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { 'color' => [ 'table' => 'color', 'columns' => [ - 'color' => 'id' + 'color' => 'id', ], ], ], @@ -1020,7 +1020,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { 'color' => [ 'table' => 'color', 'columns' => [ - 'color' => 'id' + 'color' => 'id', ], ], ], diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php index 964020cf5ca..3d7fb43aef1 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php @@ -790,7 +790,7 @@ class SqlContentEntityStorageTest extends UnitTestCase { $revision_metadata_keys = [ 'revision_created' => 'revision_timestamp', 'revision_user' => 'revision_uid', - 'revision_log_message' => 'revision_log' + 'revision_log_message' => 'revision_log', ]; $this->entityType->expects($this->atLeastOnce()) @@ -1389,7 +1389,7 @@ class SqlContentEntityStorageTest extends UnitTestCase { ->method('getImplementations') ->will($this->returnValueMap([ ['entity_load', []], - [$this->entityTypeId . '_load', []] + [$this->entityTypeId . '_load', []], ])); $this->container->set('module_handler', $this->moduleHandler); diff --git a/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php b/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php index bfd5143849a..d2672b344be 100644 --- a/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php +++ b/core/tests/Drupal/Tests/Core/EntityReferenceSelection/EntityReferenceSelectionUnitTest.php @@ -83,7 +83,7 @@ class EntityReferenceSelectionUnitTest extends UnitTestCase { 'bar' => 'bar value', 'baz' => 'baz value', ], - ] + ], ], ], [ @@ -96,7 +96,7 @@ class EntityReferenceSelectionUnitTest extends UnitTestCase { 'handler_settings' => [ // Same setting from root level takes precedence. 'setting2' => 'this will be overwritten', - ] + ], ], ], ]; diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php index 8f339a839dc..2fadea64268 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/ExceptionJsonSubscriberTest.php @@ -43,11 +43,11 @@ class ExceptionJsonSubscriberTest extends UnitTestCase { return [ 'uncacheable exception' => [ new MethodNotAllowedHttpException(['POST', 'PUT'], 'test message'), - JsonResponse::class + JsonResponse::class, ], 'cacheable exception' => [ new CacheableMethodNotAllowedHttpException((new CacheableMetadata())->setCacheContexts(['route']), ['POST', 'PUT'], 'test message'), - CacheableJsonResponse::class + CacheableJsonResponse::class, ], ]; } diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php index 49b9fbd2899..d8290fe4753 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php @@ -116,7 +116,7 @@ RSS; Request::create('/'), 'foo', new Response($content, 200, [ - 'Content-Type' => 'application/rss+xml' + 'Content-Type' => 'application/rss+xml', ]) ); diff --git a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php index 3b9d09a12a8..993bf759ffb 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ExtensionListTest.php @@ -111,7 +111,7 @@ class ExtensionListTest extends UnitTestCase { 'core' => '8.x', 'name' => 'test name', 'mtime' => 123456789, - ] + ], ], $infos); } @@ -129,7 +129,7 @@ class ExtensionListTest extends UnitTestCase { 'core' => '8.x', 'name' => 'test name', 'mtime' => 123456789, - ] + ], ], $infos); } diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php index 4fda0022b7d..820c6bd47cc 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php @@ -52,7 +52,7 @@ class ModuleHandlerTest extends UnitTestCase { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] + ], ], $this->cacheBackend); return $module_handler; } @@ -107,8 +107,8 @@ class ModuleHandlerTest extends UnitTestCase { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] - ], $this->cacheBackend + ], + ], $this->cacheBackend, ]) ->setMethods(['load']) ->getMock(); @@ -177,7 +177,7 @@ class ModuleHandlerTest extends UnitTestCase { $fixture_module_handler = $this->getModuleHandler(); $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend + $this->root, [], $this->cacheBackend, ]) ->setMethods(['resetImplementations']) ->getMock(); @@ -205,7 +205,7 @@ class ModuleHandlerTest extends UnitTestCase { $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend + $this->root, [], $this->cacheBackend, ]) ->setMethods(['resetImplementations']) ->getMock(); @@ -227,7 +227,7 @@ class ModuleHandlerTest extends UnitTestCase { $module_handler = $this->getMockBuilder(ModuleHandler::class) ->setConstructorArgs([ - $this->root, [], $this->cacheBackend + $this->root, [], $this->cacheBackend, ]) ->setMethods(['resetImplementations']) ->getMock(); @@ -264,8 +264,8 @@ class ModuleHandlerTest extends UnitTestCase { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] - ], $this->cacheBackend + ], + ], $this->cacheBackend, ]) ->setMethods(['loadInclude']) ->getMock(); @@ -353,8 +353,8 @@ class ModuleHandlerTest extends UnitTestCase { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] - ], $this->cacheBackend + ], + ], $this->cacheBackend, ]) ->setMethods(['buildImplementationInfo', 'loadInclude']) ->getMock(); @@ -391,8 +391,8 @@ class ModuleHandlerTest extends UnitTestCase { 'type' => 'module', 'pathname' => 'core/tests/Drupal/Tests/Core/Extension/modules/module_handler_test/module_handler_test.info.yml', 'filename' => 'module_handler_test.module', - ] - ], $this->cacheBackend + ], + ], $this->cacheBackend, ]) ->setMethods(['buildImplementationInfo']) ->getMock(); diff --git a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php index 645daf43d24..f0f9f3bec07 100644 --- a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php +++ b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php @@ -119,7 +119,7 @@ class FileSystemTest extends UnitTestCase { $data[] = [ 'public://dir/test.txt', 'test', - '.txt' + '.txt', ]; return $data; } diff --git a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php index 14e03cb565c..4d95e0b0bcc 100644 --- a/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php +++ b/core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php @@ -19,7 +19,7 @@ class ConfigFormBaseTraitTest extends UnitTestCase { // Set up some configuration in a mocked config factory. $trait->configFactory = $this->getConfigFactoryStub([ 'editable.config' => [], - 'immutable.config' => [] + 'immutable.config' => [], ]); $trait->expects($this->any()) diff --git a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php index 177504c13ad..d9537c3fdbd 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormAjaxResponseBuilderTest.php @@ -86,7 +86,7 @@ class FormAjaxResponseBuilderTest extends UnitTestCase { '#ajax' => [ 'callback' => function (array $form, FormStateInterface $form_state) { return $form['test']; - } + }, ], ]; $request = new Request(); @@ -117,7 +117,7 @@ class FormAjaxResponseBuilderTest extends UnitTestCase { '#ajax' => [ 'callback' => function (array $form, FormStateInterface $form_state) { return new AjaxResponse([]); - } + }, ], ]; $request = new Request(); @@ -142,7 +142,7 @@ class FormAjaxResponseBuilderTest extends UnitTestCase { '#ajax' => [ 'callback' => function (array $form, FormStateInterface $form_state) { return new AjaxResponse([]); - } + }, ], ]; $request = new Request(); @@ -175,7 +175,7 @@ class FormAjaxResponseBuilderTest extends UnitTestCase { '#ajax' => [ 'callback' => function (array $form, FormStateInterface $form_state) { return new AjaxResponse([]); - } + }, ], ]; $request = new Request(); diff --git a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php index f089bc37678..473308f64b3 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormCacheTest.php @@ -331,7 +331,7 @@ class FormCacheTest extends UnitTestCase { public function testSetCacheWithForm() { $form_build_id = 'the_form_build_id'; $form = [ - '#form_id' => 'the_form_id' + '#form_id' => 'the_form_id', ]; $form_state = new FormState(); diff --git a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php index ae42e511a27..7335603686e 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php @@ -1254,7 +1254,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase { public function testSetRedirect() { $route_name = 'foo'; $route_parameters = [ - 'bar' => 'baz' + 'bar' => 'baz', ]; $options = [ 'qux' => 'foo', diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php index cc5514a76be..ea431bf3aa8 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalTaskDefaultTest.php @@ -85,7 +85,7 @@ class LocalTaskDefaultTest extends UnitTestCase { */ public function testGetRouteParametersForStaticRoute() { $this->pluginDefinition = [ - 'route_name' => 'test_route' + 'route_name' => 'test_route', ]; $this->routeProvider->expects($this->once()) @@ -105,7 +105,7 @@ class LocalTaskDefaultTest extends UnitTestCase { public function testGetRouteParametersInPluginDefinitions() { $this->pluginDefinition = [ 'route_name' => 'test_route', - 'route_parameters' => ['parameter' => 'example'] + 'route_parameters' => ['parameter' => 'example'], ]; $this->routeProvider->expects($this->once()) @@ -124,7 +124,7 @@ class LocalTaskDefaultTest extends UnitTestCase { */ public function testGetRouteParametersForDynamicRouteWithNonUpcastedParameters() { $this->pluginDefinition = [ - 'route_name' => 'test_route' + 'route_name' => 'test_route', ]; $route = new Route('/test-route/{parameter}'); @@ -147,7 +147,7 @@ class LocalTaskDefaultTest extends UnitTestCase { */ public function testGetRouteParametersForDynamicRouteWithUpcastedParameters() { $this->pluginDefinition = [ - 'route_name' => 'test_route' + 'route_name' => 'test_route', ]; $route = new Route('/test-route/{parameter}'); @@ -177,17 +177,17 @@ class LocalTaskDefaultTest extends UnitTestCase { [ 'base_route' => 'local_task_default', 'route_name' => 'local_task_default', - 'id' => 'local_task_default' + 'id' => 'local_task_default', ], 'local_task_default', - -10 + -10, ], // If the base route is different from the route of the tab, ignore it. [ [ 'base_route' => 'local_task_example', 'route_name' => 'local_task_other', - 'id' => 'local_task_default' + 'id' => 'local_task_default', ], 'local_task_default', 0, @@ -291,9 +291,9 @@ class LocalTaskDefaultTest extends UnitTestCase { 'attributes' => [ 'class' => [ 'example', - 'is-active' - ] - ] + 'is-active', + ], + ], ], $this->localTaskBase->getOptions($route_match)); } diff --git a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php index 0295e408c7a..0bb828b2ff1 100644 --- a/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/MenuLinkDefaultFormTest.php @@ -46,7 +46,7 @@ class MenuLinkDefaultFormTest extends UnitTestCase { 'weight' => 5, 'expanded' => 1, 'parent' => 'bar', - 'menu_name' => 'foo' + 'menu_name' => 'foo', ], $result); } diff --git a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php index 98a122ca214..b287f12eb3a 100644 --- a/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php @@ -111,14 +111,14 @@ class StaticMenuLinkOverridesTest extends UnitTestCase { $definition_save_1 = [ 'definitions' => [ - 'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE] - ] + 'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE], + ], ]; $definitions_save_2 = [ 'definitions' => [ 'test1' => ['parent' => 'test0', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE], - 'test1__la___ma' => ['parent' => 'test1', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE] - ] + 'test1__la___ma' => ['parent' => 'test1', 'menu_name' => '', 'weight' => 0, 'expanded' => FALSE, 'enabled' => FALSE], + ], ]; $config->expects($this->at(2)) ->method('set') diff --git a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php index 6d60e1d4e77..b7549ce47ac 100644 --- a/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php +++ b/core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php @@ -80,7 +80,7 @@ class ParamConverterManagerTest extends UnitTestCase { $converters[0]['sorted'] = [ 'strawberry', 'raspberry', 'pear', 'peach', - 'pineapple', 'banana', 'apple' + 'pineapple', 'banana', 'apple', ]; $converters[1]['unsorted'] = [ @@ -95,7 +95,7 @@ class ParamConverterManagerTest extends UnitTestCase { $converters[1]['sorted'] = [ 'giraffe', 'zebra', 'eagle', 'ape', - 'cat', 'puppy', 'llama' + 'cat', 'puppy', 'llama', ]; return $converters; diff --git a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php index e6215caac83..0aa2de7b64b 100644 --- a/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php +++ b/core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorTest.php @@ -49,8 +49,8 @@ class PathProcessorTest extends UnitTestCase { $language_prefixes = array_keys($this->languages); $config = [ 'url' => [ - 'prefixes' => array_combine($language_prefixes, $language_prefixes) - ] + 'prefixes' => array_combine($language_prefixes, $language_prefixes), + ], ]; // Create a URL-based language negotiation method definition. @@ -109,7 +109,7 @@ class PathProcessorTest extends UnitTestCase { $config_factory_stub = $this->getConfigFactoryStub( [ 'system.site' => [ - 'page.front' => '/user/login' + 'page.front' => '/user/login', ], 'language.negotiation' => [ 'url' => [ diff --git a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php index 040b1f988e1..092525c75d5 100644 --- a/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php +++ b/core/tests/Drupal/Tests/Core/Render/BubbleableMetadataTest.php @@ -675,17 +675,17 @@ class BubbleableMetadataTest extends UnitTestCase { 'merge-cacheable-metadata' => [ (new BubbleableMetadata())->setCacheContexts(['foo'])->setCacheTags(['foo'])->setCacheMaxAge(20), (new CacheableMetadata())->setCacheContexts(['bar'])->setCacheTags(['bar'])->setCacheMaxAge(60), - (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20) + (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20), ], 'merge-bubbleable-metadata' => [ (new BubbleableMetadata())->setCacheContexts(['foo'])->setCacheTags(['foo'])->setCacheMaxAge(20)->setAttachments(['foo' => []]), (new BubbleableMetadata())->setCacheContexts(['bar'])->setCacheTags(['bar'])->setCacheMaxAge(60)->setAttachments(['bar' => []]), - (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20)->setAttachments(['foo' => [], 'bar' => []]) + (new BubbleableMetadata())->setCacheContexts(['foo', 'bar'])->setCacheTags(['foo', 'bar'])->setCacheMaxAge(20)->setAttachments(['foo' => [], 'bar' => []]), ], 'merge-attachments-metadata' => [ (new BubbleableMetadata())->setAttachments(['foo' => []]), (new BubbleableMetadata())->setAttachments(['baro' => []]), - (new BubbleableMetadata())->setAttachments(['foo' => [], 'bar' => []]) + (new BubbleableMetadata())->setAttachments(['foo' => [], 'bar' => []]), ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php index db463d8b40e..06f11d3b946 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/MachineNameTest.php @@ -59,7 +59,7 @@ class MachineNameTest extends UnitTestCase { 'maxlength' => 32, 'additional_property' => TRUE, '#additional_property_with_hash' => TRUE, - ] + ], ]; $complete_form = [ @@ -67,7 +67,7 @@ class MachineNameTest extends UnitTestCase { '#type' => 'textfield', '#id' => 'source', ], - 'test_machine_name' => $element + 'test_machine_name' => $element, ]; $form_state->setCompleteForm($complete_form); diff --git a/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php b/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php index ead47e471e9..f095ae57368 100644 --- a/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php +++ b/core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php @@ -30,7 +30,7 @@ class TableSelectTest extends UnitTestCase { $element['#value'] = 0; $element['#options'][] = [ - 'title' => new Link('my-text', Url::fromRoute('')) + 'title' => new Link('my-text', Url::fromRoute('')), ]; $element['#attributes'] = []; diff --git a/core/tests/Drupal/Tests/Core/Render/ElementTest.php b/core/tests/Drupal/Tests/Core/Render/ElementTest.php index d168f741e5c..81824483248 100644 --- a/core/tests/Drupal/Tests/Core/Render/ElementTest.php +++ b/core/tests/Drupal/Tests/Core/Render/ElementTest.php @@ -28,7 +28,7 @@ class ElementTest extends UnitTestCase { $element = [ '#property1' => 'property1', '#property2' => 'property2', - 'property3' => 'property3' + 'property3' => 'property3', ]; $properties = Element::properties($element); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php index f55e34832e0..6ad2acbe0da 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php @@ -297,7 +297,7 @@ class RendererBubblingTest extends RendererTestBase { $test_element = [ '#cache' => [ 'keys' => ['parent'], - 'tags' => ['yar', 'har'] + 'tags' => ['yar', 'har'], ], '#markup' => 'parent', 'child' => [ @@ -308,10 +308,10 @@ class RendererBubblingTest extends RendererTestBase { 'tags' => ['fiddle', 'dee'], ], '#attached' => [ - 'library' => ['foo/bar'] + 'library' => ['foo/bar'], ], '#markup' => '', - ] + ], ], ]; $expected_cache_items = [ diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php index 8cfa0fda7c8..0d38afd1061 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php @@ -1125,7 +1125,7 @@ HTML; EOS; $output = str_replace([ '{{ title }}', - '{{ children }}' + '{{ children }}', ], [$vars['#title'], $vars['#children']], $output); return $output; }); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php index 76f9d48b279..7e4b83345eb 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererRecursionTest.php @@ -46,10 +46,10 @@ class RendererRecursionTest extends RendererTestBase { $page = [ 'content' => [ '#pre_render' => [ - $callable + $callable, ], '#suffix' => $parent_markup, - ] + ], ]; $renderer->renderRoot($page); } @@ -78,10 +78,10 @@ class RendererRecursionTest extends RendererTestBase { 'content' => [ 'complex_child' => $complex_child_template, '#post_render' => [ - $callable + $callable, ], '#suffix' => $parent_markup, - ] + ], ]; $output = $renderer->renderRoot($page); @@ -114,10 +114,10 @@ class RendererRecursionTest extends RendererTestBase { $page = [ 'content' => [ '#pre_render' => [ - $callable + $callable, ], '#suffix' => $parent_markup, - ] + ], ]; $output = $renderer->renderRoot($page); $this->assertEquals('

                This is a rendered placeholder!

                ' . $parent_markup, $output, 'Rendered output as expected, with the placeholder replaced.'); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererTest.php b/core/tests/Drupal/Tests/Core/Render/RendererTest.php index eda1f9fc605..adfc890cb08 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererTest.php @@ -180,7 +180,7 @@ class RendererTest extends RendererTestBase { '#pre_render' => [function ($elements) { $elements['#markup'] .= ''; return $elements; - } + }, ], ], 'fooalert("bar");', @@ -193,7 +193,7 @@ class RendererTest extends RendererTestBase { '#pre_render' => [function ($elements) { $elements['#markup'] .= ''; return $elements; - } + }, ], ], 'foo', @@ -206,7 +206,7 @@ class RendererTest extends RendererTestBase { '#pre_render' => [function ($elements) { $elements['#plain_text'] .= ''; return $elements; - } + }, ], ], 'foo<script>alert("bar");</script>', @@ -508,7 +508,7 @@ class RendererTest extends RendererTestBase { $build = [ '#access_callback' => function () use ($access) { return $access; - } + }, ]; $this->assertAccess($build, $access); @@ -527,7 +527,7 @@ class RendererTest extends RendererTestBase { '#access' => $access, '#access_callback' => function () { return TRUE; - } + }, ]; $this->assertAccess($build, $access); @@ -613,7 +613,7 @@ class RendererTest extends RendererTestBase { [ '#markup' => 'kittens', '#cache' => [ - 'tags' => ['kittens-147'] + 'tags' => ['kittens-147'], ], ], ], @@ -961,7 +961,7 @@ class RendererTest extends RendererTestBase { 'contexts' => ['theme'], 'tags' => ['bar'], 'max-age' => 600, - ] + ], ], new TestCacheableDependency(['user.roles'], ['foo'], Cache::PERMANENT), [ @@ -979,7 +979,7 @@ class RendererTest extends RendererTestBase { 'contexts' => ['theme'], 'tags' => ['bar'], 'max-age' => 600, - ] + ], ], new \stdClass(), [ diff --git a/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php b/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php index 38278ab0811..5ff38fa46b6 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php +++ b/core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php @@ -60,7 +60,7 @@ class RoutingFixtures { 'path' => '/path/two', 'methods' => ['GET'], 'requirements' => [ - '_format' => 'json' + '_format' => 'json', ], ]; $routes['route_d'] = [ @@ -70,7 +70,7 @@ class RoutingFixtures { 'path' => '/path/two', 'methods' => ['GET', 'HEAD'], 'requirements' => [ - '_format' => 'html' + '_format' => 'html', ], ]; diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php index a872e305d41..f98a8a9c545 100644 --- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php +++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php @@ -114,12 +114,12 @@ class TwigExtensionTest extends UnitTestCase { ['{{ path(name = "foo", parameters = foo) }}', TRUE], [ '{{ path(name = "foo", parameters = { foo: ["foo", "bar"] }) }}', - TRUE + TRUE, ], ['{{ path(name = "foo", parameters = { foo: foo }) }}', TRUE], [ '{{ path(name = "foo", parameters = { foo: "foo", bar: "bar" }) }}', - TRUE + TRUE, ], ]; } diff --git a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php index 7084278b804..8a6fdc83193 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestDatabaseTest.php @@ -38,7 +38,7 @@ class TestDatabaseTest extends UnitTestCase { public function providerTestConstructor() { return [ ['test1234', 'test1234', 'sites/simpletest/1234'], - ['test123456test234567', 'test123456test234567', 'sites/simpletest/234567'] + ['test123456test234567', 'test123456test234567', 'sites/simpletest/234567'], ]; } diff --git a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php index ede32ebf30e..853a788f5fe 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestSuiteBaseTest.php @@ -40,8 +40,8 @@ class TestSuiteBaseTest extends TestCase { 'Listener.php' => ' [ 'Listener.php' => 'addConstraint('Callback', [ 'callback' => function ($value, ExecutionContextInterface $context) { $context->addViolation('test violation: ' . $value); - } + }, ]) ); $typed_data->setValue('foo'); @@ -147,7 +147,7 @@ class RecursiveContextualValidatorTest extends UnitTestCase { $options = [ 'callback' => function ($value, ExecutionContextInterface $context) { $context->addViolation('test violation'); - } + }, ]; $typed_data = $this->typedDataManager->create( DataDefinition::create('string') @@ -320,7 +320,7 @@ class RecursiveContextualValidatorTest extends UnitTestCase { 'value' => [ 'key1' => 'value1', 'key2' => 'value2', - 'key_with_properties' => $subkey_value + 'key_with_properties' => $subkey_value, ], ]; $tree['properties'] = [ diff --git a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php index 2462148ebe0..4ebecb6097a 100644 --- a/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php +++ b/core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php @@ -79,14 +79,14 @@ EOS; 'modules' => [ 'module_a' => [ 'module_a.post_update.php' => $module_a, - 'module_a.info.yml' => $info_a + 'module_a.info.yml' => $info_a, ], 'module_b' => [ 'module_b.post_update.php' => $module_b, - 'module_b.info.yml' => $info_b + 'module_b.info.yml' => $info_b, ], - ] - ] + ], + ], ], ]); } @@ -103,13 +103,13 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $this->assertEquals([ 'module_a_post_update_a', 'module_a_post_update_b', - 'module_b_post_update_a' + 'module_b_post_update_a', ], $update_registry->getPendingUpdateFunctions()); } @@ -150,12 +150,12 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $this->assertEquals(array_values([ 'module_a_post_update_b', - 'module_b_post_update_a' + 'module_b_post_update_a', ]), array_values($update_registry->getPendingUpdateFunctions())); } @@ -172,7 +172,7 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $expected = []; @@ -197,7 +197,7 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $expected = []; @@ -218,7 +218,7 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $this->assertEquals(['module_a_post_update_a', 'module_a_post_update_b'], array_values($update_registry->getModuleUpdateFunctions('module_a'))); @@ -241,7 +241,7 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $update_registry->registerInvokedUpdates(['module_a_post_update_a']); } @@ -262,7 +262,7 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $update_registry->registerInvokedUpdates(['module_a_post_update_a', 'module_a_post_update_b']); } @@ -283,7 +283,7 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $update_registry->registerInvokedUpdates(['module_a_post_update_a']); } @@ -304,7 +304,7 @@ EOS; $update_registry = new UpdateRegistry('vfs://drupal', 'sites/default', [ 'module_a', - 'module_b' + 'module_b', ], $key_value, FALSE); $update_registry->filterOutInvokedUpdatesByModule('module_a'); diff --git a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php index 91620e61559..5f8474a0dc9 100644 --- a/core/tests/Drupal/Tests/Core/Utility/TokenTest.php +++ b/core/tests/Drupal/Tests/Core/Utility/TokenTest.php @@ -94,7 +94,7 @@ class TokenTest extends UnitTestCase { $container = new ContainerBuilder(); $this->cacheContextManager = new CacheContextsManager($container, [ 'current_user', - 'custom_context' + 'custom_context', ]); $container->set('cache_contexts_manager', $this->cacheContextManager); \Drupal::setContainer($container); @@ -170,7 +170,7 @@ class TokenTest extends UnitTestCase { $this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags()); $this->assertEquals([ 'current_user', - 'custom_context' + 'custom_context', ], $bubbleable_metadata->getCacheContexts()); $this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge()); } @@ -205,7 +205,7 @@ class TokenTest extends UnitTestCase { $this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags()); $this->assertEquals([ 'current_user', - 'custom_context' + 'custom_context', ], $bubbleable_metadata->getCacheContexts()); $this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge()); } @@ -243,7 +243,7 @@ class TokenTest extends UnitTestCase { $this->assertEquals(['node:1'], $bubbleable_metadata->getCacheTags()); $this->assertEquals([ 'current_user', - 'custom_context' + 'custom_context', ], $bubbleable_metadata->getCacheContexts()); $this->assertEquals(10, $bubbleable_metadata->getCacheMaxAge()); }