From 853202a0001bdb3df808a999481404000b010283 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Sun, 8 May 2016 12:33:57 -0500 Subject: [PATCH] Issue #2572619 by attiks, andypost, pfrenssen, vprocessor, tatarbj, andriyun, alexpott: Fix 'Drupal.Classes.ClassDeclaration' coding standard --- .../Drupal/Core/Cache/Context/LanguagesCacheContext.php | 2 +- core/lib/Drupal/Core/CoreServiceProvider.php | 2 +- .../Drupal/Core/Entity/Sql/SqlContentEntityStorage.php | 2 +- core/lib/Drupal/Core/Extension/InfoParserInterface.php | 2 +- core/lib/Drupal/Core/Render/Element/Pager.php | 2 +- .../Render/MainContent/MainContentRendererInterface.php | 2 +- .../Core/TypedData/ComplexDataDefinitionInterface.php | 2 +- core/lib/Drupal/Core/TypedData/ComplexDataInterface.php | 2 +- core/lib/Drupal/Core/TypedData/DataReferenceBase.php | 2 +- .../Core/TypedData/DataReferenceDefinitionInterface.php | 2 +- core/lib/Drupal/Core/TypedData/DataReferenceInterface.php | 2 +- .../src/Controller/TestMultipleFormController.php | 2 +- .../book/src/Access/BookNodeIsRemovableAccessCheck.php | 2 +- .../forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php | 2 +- .../src/Plugin/migrate/cckfield/CckFieldPluginBase.php | 2 +- .../src/Plugin/views/relationship/NodeTermData.php | 2 +- .../views/src/Plugin/views/relationship/EntityReverse.php | 2 +- core/phpcs.xml.dist | 8 +------- .../Core/Entity/EntityAccessControlHandlerTest.php | 2 +- .../KernelTests/Core/Entity/EntityBundleFieldTest.php | 2 +- .../Core/Entity/EntityFieldDefaultValueTest.php | 2 +- .../Drupal/KernelTests/Core/Entity/EntityFieldTest.php | 2 +- .../Drupal/KernelTests/Core/Entity/EntitySchemaTest.php | 2 +- .../EventDispatcher/ContainerAwareEventDispatcherTest.php | 1 + core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php | 2 +- 25 files changed, 25 insertions(+), 30 deletions(-) diff --git a/core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php b/core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php index eb7ce68bea57..a13b763fa069 100644 --- a/core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php +++ b/core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php @@ -8,7 +8,7 @@ /** * Defines the LanguagesCacheContext service, for "per language" caching. */ -class LanguagesCacheContext implements CalculatedCacheContextInterface { +class LanguagesCacheContext implements CalculatedCacheContextInterface { /** * The language manager. diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php index 51b1c5103ff9..91178915d57d 100644 --- a/core/lib/Drupal/Core/CoreServiceProvider.php +++ b/core/lib/Drupal/Core/CoreServiceProvider.php @@ -40,7 +40,7 @@ * * @ingroup container */ -class CoreServiceProvider implements ServiceProviderInterface, ServiceModifierInterface { +class CoreServiceProvider implements ServiceProviderInterface, ServiceModifierInterface { /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php index 72c74580a2ff..d58445477ff4 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php @@ -36,7 +36,7 @@ * * @ingroup entity_api */ -class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEntityStorageInterface, DynamicallyFieldableEntityStorageSchemaInterface, EntityBundleListenerInterface { +class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEntityStorageInterface, DynamicallyFieldableEntityStorageSchemaInterface, EntityBundleListenerInterface { /** * The mapping of field columns to SQL tables. diff --git a/core/lib/Drupal/Core/Extension/InfoParserInterface.php b/core/lib/Drupal/Core/Extension/InfoParserInterface.php index e5c99fe184e8..468a94a5932a 100644 --- a/core/lib/Drupal/Core/Extension/InfoParserInterface.php +++ b/core/lib/Drupal/Core/Extension/InfoParserInterface.php @@ -5,7 +5,7 @@ /** * Interface for classes that parses Drupal's info.yml files. */ -interface InfoParserInterface { +interface InfoParserInterface { /** * Parses Drupal module, theme and profile .info.yml files. diff --git a/core/lib/Drupal/Core/Render/Element/Pager.php b/core/lib/Drupal/Core/Render/Element/Pager.php index 7032b528c975..6ba3dff75779 100644 --- a/core/lib/Drupal/Core/Render/Element/Pager.php +++ b/core/lib/Drupal/Core/Render/Element/Pager.php @@ -30,7 +30,7 @@ * * @RenderElement("pager") */ -class Pager extends RenderElement{ +class Pager extends RenderElement { /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php b/core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php index d78c56a508e3..aa8b60c86a98 100644 --- a/core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php +++ b/core/lib/Drupal/Core/Render/MainContent/MainContentRendererInterface.php @@ -13,7 +13,7 @@ * (HTML, JSON …) and/or in a certain decorated manner (e.g. in the case of the * default HTML main content renderer: with a page display variant applied). */ -interface MainContentRendererInterface { +interface MainContentRendererInterface { /** * Renders the main content render array into a response. diff --git a/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php b/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php index e7a3c1a622bd..2fe1a107658f 100644 --- a/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php +++ b/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php @@ -9,7 +9,7 @@ * * @ingroup typed_data */ -interface ComplexDataDefinitionInterface extends DataDefinitionInterface { +interface ComplexDataDefinitionInterface extends DataDefinitionInterface { /** * Gets the definition of a contained property. diff --git a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php index 39280ff6df01..6396cb8f516d 100644 --- a/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php +++ b/core/lib/Drupal/Core/TypedData/ComplexDataInterface.php @@ -18,7 +18,7 @@ * * @ingroup typed_data */ -interface ComplexDataInterface extends TraversableTypedDataInterface { +interface ComplexDataInterface extends TraversableTypedDataInterface { /** * Gets the data definition. diff --git a/core/lib/Drupal/Core/TypedData/DataReferenceBase.php b/core/lib/Drupal/Core/TypedData/DataReferenceBase.php index dbdddb130abf..a41b01c65df6 100644 --- a/core/lib/Drupal/Core/TypedData/DataReferenceBase.php +++ b/core/lib/Drupal/Core/TypedData/DataReferenceBase.php @@ -14,7 +14,7 @@ * * @see \Drupal\Core\TypedData\DataReferenceDefinition */ -abstract class DataReferenceBase extends TypedData implements DataReferenceInterface { +abstract class DataReferenceBase extends TypedData implements DataReferenceInterface { /** * The referenced data. diff --git a/core/lib/Drupal/Core/TypedData/DataReferenceDefinitionInterface.php b/core/lib/Drupal/Core/TypedData/DataReferenceDefinitionInterface.php index 4275c62afa6f..f209a8fbd236 100644 --- a/core/lib/Drupal/Core/TypedData/DataReferenceDefinitionInterface.php +++ b/core/lib/Drupal/Core/TypedData/DataReferenceDefinitionInterface.php @@ -10,7 +10,7 @@ * * @ingroup typed_data */ -interface DataReferenceDefinitionInterface extends DataDefinitionInterface { +interface DataReferenceDefinitionInterface extends DataDefinitionInterface { /** * Gets the data definition of the referenced data. diff --git a/core/lib/Drupal/Core/TypedData/DataReferenceInterface.php b/core/lib/Drupal/Core/TypedData/DataReferenceInterface.php index 53ffe0ee98de..878c44df746b 100644 --- a/core/lib/Drupal/Core/TypedData/DataReferenceInterface.php +++ b/core/lib/Drupal/Core/TypedData/DataReferenceInterface.php @@ -7,7 +7,7 @@ * * @see \Drupal\Core\TypedData\DataReferenceDefinitionInterface */ -interface DataReferenceInterface { +interface DataReferenceInterface { /** * Gets the referenced data. diff --git a/core/modules/block/tests/modules/block_test/src/Controller/TestMultipleFormController.php b/core/modules/block/tests/modules/block_test/src/Controller/TestMultipleFormController.php index 27f7a1795744..e7aac65500e9 100644 --- a/core/modules/block/tests/modules/block_test/src/Controller/TestMultipleFormController.php +++ b/core/modules/block/tests/modules/block_test/src/Controller/TestMultipleFormController.php @@ -8,7 +8,7 @@ /** * Controller for block_test module */ -class TestMultipleFormController extends ControllerBase { +class TestMultipleFormController extends ControllerBase { public function testMultipleForms() { $form_state = new FormState(); diff --git a/core/modules/book/src/Access/BookNodeIsRemovableAccessCheck.php b/core/modules/book/src/Access/BookNodeIsRemovableAccessCheck.php index 0809e574e268..ffe124c8557c 100644 --- a/core/modules/book/src/Access/BookNodeIsRemovableAccessCheck.php +++ b/core/modules/book/src/Access/BookNodeIsRemovableAccessCheck.php @@ -10,7 +10,7 @@ /** * Determines whether the requested node can be removed from its book. */ -class BookNodeIsRemovableAccessCheck implements AccessInterface{ +class BookNodeIsRemovableAccessCheck implements AccessInterface { /** * Book Manager Service. diff --git a/core/modules/forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php b/core/modules/forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php index 4bde297cfd96..6604001f72be 100644 --- a/core/modules/forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php +++ b/core/modules/forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php @@ -17,7 +17,7 @@ * This just holds the dependency-injected config, entity manager, and forum * manager objects. */ -abstract class ForumBreadcrumbBuilderBase implements BreadcrumbBuilderInterface { +abstract class ForumBreadcrumbBuilderBase implements BreadcrumbBuilderInterface { use StringTranslationTrait; /** diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php index abe3d0439090..87d545730b55 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php @@ -17,7 +17,7 @@ * * @ingroup migration */ -abstract class CckFieldPluginBase extends PluginBase implements MigrateCckFieldInterface { +abstract class CckFieldPluginBase extends PluginBase implements MigrateCckFieldInterface { /** * {@inheritdoc} diff --git a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php index faa5d70e7e85..40c8fc73a14c 100644 --- a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php +++ b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php @@ -16,7 +16,7 @@ * * @ViewsRelationship("node_term_data") */ -class NodeTermData extends RelationshipPluginBase { +class NodeTermData extends RelationshipPluginBase { /** * The vocabulary storage. diff --git a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php index c1b88217809a..42d6fa1e744c 100644 --- a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php +++ b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php @@ -13,7 +13,7 @@ * * @ViewsRelationship("entity_reverse") */ -class EntityReverse extends RelationshipPluginBase { +class EntityReverse extends RelationshipPluginBase { /** * Constructs an EntityReverse object. diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 52bc19ae346d..aa93c421e3d8 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -13,13 +13,7 @@ <!-- Only include specific sniffs that pass. This ensures that, if new sniffs are added, HEAD does not fail.--> <!-- Drupal sniffs --> <rule ref="Drupal.Classes.ClassCreateInstance"/> - <rule ref="Drupal.Classes.ClassDeclaration"> - <exclude name="Drupal.Classes.ClassDeclaration.BraceOnNewLine"/> - <exclude name="Drupal.Classes.ClassDeclaration.SpaceAfterName"/> - <exclude name="Drupal.Classes.ClassDeclaration.SpaceBeforeBrace"/> - <exclude name="Drupal.Classes.ClassDeclaration.SpaceBeforeExtends"/> - <exclude name="Drupal.Classes.ClassDeclaration.SpaceBeforeImplements"/> - </rule> + <rule ref="Drupal.Classes.ClassDeclaration"/> <rule ref="Drupal.Classes.FullyQualifiedNamespace"/> <rule ref="Drupal.Classes.UnusedUseStatement"/> <rule ref="Drupal.CSS.ClassDefinitionNameSpacing"/> diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php index 724c2101c679..77210d5c4dad 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php @@ -18,7 +18,7 @@ * * @group Entity */ -class EntityAccessControlHandlerTest extends EntityLanguageTestBase { +class EntityAccessControlHandlerTest extends EntityLanguageTestBase { /** * Asserts entity access correctly grants or denies access. diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php index aaed408ebf6a..ec8fd1cfe46d 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityBundleFieldTest.php @@ -7,7 +7,7 @@ * * @group Entity */ -class EntityBundleFieldTest extends EntityKernelTestBase { +class EntityBundleFieldTest extends EntityKernelTestBase { /** * Modules to enable. diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php index 9ca3d0866d06..c806409f5b59 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php @@ -10,7 +10,7 @@ * * @group Entity */ -class EntityFieldDefaultValueTest extends EntityKernelTestBase { +class EntityFieldDefaultValueTest extends EntityKernelTestBase { /** * The UUID object to be used for generating UUIDs. diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php index e685682fee67..63ac58d7c870 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php @@ -23,7 +23,7 @@ * * @group Entity */ -class EntityFieldTest extends EntityKernelTestBase { +class EntityFieldTest extends EntityKernelTestBase { /** * Modules to enable. diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php index 00696118e4a4..fdf72df4a391 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php @@ -9,7 +9,7 @@ * * @group system */ -class EntitySchemaTest extends EntityKernelTestBase { +class EntitySchemaTest extends EntityKernelTestBase { /** * The database connection used. diff --git a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php index 930dbe5624da..dfd12bbda02d 100644 --- a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php +++ b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php @@ -1,4 +1,5 @@ <?php +// @codingStandardsIgnoreFile namespace Drupal\Tests\Component\EventDispatcher; diff --git a/core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php b/core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php index 927360664daa..932edb727d3c 100644 --- a/core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php +++ b/core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php @@ -147,7 +147,7 @@ function ($context) { } -class NaughtyRecursiveLogger implements LoggerInterface { +class NaughtyRecursiveLogger implements LoggerInterface { use LoggerTrait; protected $channel; -- GitLab