diff --git a/core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php b/core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php index ba0dbf84f6639ae045a722404f209710b38e0538..ab18ba090d7a3f4030b0f1d60c1fd39938717c7d 100644 --- a/core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php +++ b/core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php @@ -29,7 +29,7 @@ public function __construct(SelectionPluginManagerInterface $selection_manager) } /** - * {@inheritDoc} + * {@inheritdoc} */ public function getMatches($target_type, $selection_handler, $selection_settings, $string = '') { $matches = []; diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php index 2beb219ac776d4ffe2f549e71f50fb4a5d2ea05e..c6b9f345a98ab15a08e76a86bcf5d40cda93788a 100644 --- a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php +++ b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Media.php @@ -55,7 +55,7 @@ public function __construct(array $configuration, string $plugin_id, CKEditor5Pl } /** - * {@inheritDoc} + * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { return new static( diff --git a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php index 47cf82319978a409cd7810e4c825e8d1c074e6f2..4196cd1b7b04b18d18a7b01f6fc4610777f88bab 100644 --- a/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php +++ b/core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/MediaLibrary.php @@ -48,7 +48,7 @@ public function __construct(array $configuration, string $plugin_id, CKEditor5Pl } /** - * {@inheritDoc} + * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { return new static( diff --git a/core/modules/dblog/src/Plugin/views/filter/DblogTypes.php b/core/modules/dblog/src/Plugin/views/filter/DblogTypes.php index b6dd27f602efe80e675ca6d85c039e45552859eb..ed8f5471669cf7ad8f34aab41317bf75d4f3c6c0 100644 --- a/core/modules/dblog/src/Plugin/views/filter/DblogTypes.php +++ b/core/modules/dblog/src/Plugin/views/filter/DblogTypes.php @@ -23,7 +23,7 @@ public function getValueOptions() { } /** - * {@inheritDoc} + * {@inheritdoc} */ protected function valueForm(&$form, FormStateInterface $form_state) { parent::valueForm($form, $form_state); diff --git a/core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php b/core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php index 1727b7950ab61d9aff270dbaf6bf1ad1762429d1..347de4a3bef4d9d63ae802524b4e14730d07fb5a 100644 --- a/core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php +++ b/core/modules/file/tests/file_test/src/StreamWrapper/DummyExternalReadOnlyWrapper.php @@ -13,28 +13,28 @@ class DummyExternalReadOnlyWrapper extends ReadOnlyStream { /** - * @inheritDoc + * {@inheritdoc} */ public static function getType() { return StreamWrapperInterface::READ_VISIBLE; } /** - * @inheritDoc + * {@inheritdoc} */ public function getName() { return t('Dummy external stream wrapper (readonly)'); } /** - * @inheritDoc + * {@inheritdoc} */ public function getDescription() { return t('Dummy external read-only stream wrapper for testing.'); } /** - * @inheritDoc + * {@inheritdoc} */ public function getExternalUrl() { [, $target] = explode('://', $this->uri, 2); @@ -42,105 +42,105 @@ public function getExternalUrl() { } /** - * @inheritDoc + * {@inheritdoc} */ public function realpath() { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function dirname($uri = NULL) { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function dir_closedir() { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function dir_opendir($path, $options) { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function dir_readdir() { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function dir_rewinddir() { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function stream_cast($cast_as) { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function stream_close() { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function stream_eof() { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function stream_read($count) { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function stream_seek($offset, $whence = SEEK_SET) { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function stream_set_option($option, $arg1, $arg2) { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function stream_stat() { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function stream_tell() { return FALSE; } /** - * @inheritDoc + * {@inheritdoc} */ public function url_stat($path, $flags) { return FALSE; diff --git a/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php b/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php index 4282b62947f909a0e805f5710ed439557c61898c..9a8d96d31e3ce7769468685a6e70e97dd5fd0776 100644 --- a/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php +++ b/core/modules/jsonapi/tests/src/Kernel/Normalizer/LinkCollectionNormalizerTest.php @@ -46,7 +46,7 @@ class LinkCollectionNormalizerTest extends KernelTestBase { protected $testUsers; /** - * {@inheritDoc} + * {@inheritdoc} */ protected static $modules = [ 'jsonapi', @@ -56,7 +56,7 @@ class LinkCollectionNormalizerTest extends KernelTestBase { ]; /** - * {@inheritDoc} + * {@inheritdoc} */ protected function setUp(): void { parent::setUp(); diff --git a/core/modules/migrate/src/Plugin/Migration.php b/core/modules/migrate/src/Plugin/Migration.php index 78c194d62c4d9aeee560263a8fd9c0e378dd3256..e9cdfc38cd524b0cade8170f935b8db1442aa0f2 100644 --- a/core/modules/migrate/src/Plugin/Migration.php +++ b/core/modules/migrate/src/Plugin/Migration.php @@ -506,7 +506,7 @@ public function getIdMap() { } /** - * {@inheritDoc} + * {@inheritdoc} */ public function getRequirements(): array { return $this->requirements; diff --git a/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php b/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php index 58d500e361d3257aaf74fc8670cf0c4fa7972ec9..8417ed831be937ed2f9964419671c011cfc9a3e8 100644 --- a/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php +++ b/core/modules/pgsql/src/Driver/Database/pgsql/Connection.php @@ -364,7 +364,7 @@ public function rollbackSavepoint($savepoint_name = 'mimic_implicit_commit') { } /** - * {@inheritDoc} + * {@inheritdoc} */ public function hasJson(): bool { try { diff --git a/core/modules/system/tests/modules/js_interaction_test/src/Controller/JSInteractionTestForm.php b/core/modules/system/tests/modules/js_interaction_test/src/Controller/JSInteractionTestForm.php index 1439ec16b4ed37db1ee2ec42c607bc643637fb48..026b341d42fd9c2b3e1ee3ffb1b26a3dff93d44e 100644 --- a/core/modules/system/tests/modules/js_interaction_test/src/Controller/JSInteractionTestForm.php +++ b/core/modules/system/tests/modules/js_interaction_test/src/Controller/JSInteractionTestForm.php @@ -12,7 +12,7 @@ class JSInteractionTestForm extends FormBase { /** - * @inheritDoc + * {@inheritdoc} */ public function getFormId() { return __CLASS__; diff --git a/core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php b/core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php index 942a9f5b9a8c4d17269e45dbf3f2d4e47114a0e6..c2d0f21041e15bcae78147e90e47c77c64e69611 100644 --- a/core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php +++ b/core/modules/user/tests/src/Kernel/Controller/UserControllerTest.php @@ -40,7 +40,7 @@ class UserControllerTest extends KernelTestBase { ]; /** - * {@inheritDoc} + * {@inheritdoc} */ protected function setUp(): void { diff --git a/core/modules/views/tests/modules/views_config_entity_test/src/ViewsConfigEntityTestViewsData.php b/core/modules/views/tests/modules/views_config_entity_test/src/ViewsConfigEntityTestViewsData.php index 97138f1c404aa7cb89c3128fde57a34fa6fb26d7..4e19ebc46437b8f0be969bd75551ccae5f0a6656 100644 --- a/core/modules/views/tests/modules/views_config_entity_test/src/ViewsConfigEntityTestViewsData.php +++ b/core/modules/views/tests/modules/views_config_entity_test/src/ViewsConfigEntityTestViewsData.php @@ -18,7 +18,7 @@ public function getViewsData() { } /** - * @inheritDoc + * {@inheritdoc} */ public function getViewsTableForEntityType(EntityTypeInterface $entity_type) { return 'views_config_entity_test'; diff --git a/core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php b/core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php index 2852f30365879aaf0cb4f956dacf1067468a9545..7d9592fb08b635dbb6f944307bbaa7aff223232b 100644 --- a/core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php +++ b/core/modules/workspaces/src/EventSubscriber/WorkspaceRequestSubscriber.php @@ -93,7 +93,7 @@ public function onKernelRequest(RequestEvent $event) { } /** - * {@inheritDoc} + * {@inheritdoc} */ public static function getSubscribedEvents(): array { // Use a priority of 190 in order to run after the generic core subscriber. diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 9836486b3eaa9eae0b437030a2cecff2aa076066..27853d5a33d3f13eb999cd08b3d69d93ba6b5e19 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -251,6 +251,22 @@ <rule ref="PSR2.Namespaces.NamespaceDeclaration"/> <rule ref="PSR2.Namespaces.UseDeclaration"/> + <!-- SlevomatCodingStandard sniffs --> + <rule ref="SlevomatCodingStandard.Commenting.ForbiddenAnnotations"> + <properties> + <property name="forbiddenAnnotations" type="array"> + <element value="@inheritDoc"/> + </property> + </properties> + </rule> + <rule ref="SlevomatCodingStandard.Commenting.ForbiddenComments"> + <properties> + <property name="forbiddenCommentPatterns" type="array"> + <element value="/@inheritDoc/"/> + </property> + </properties> + </rule> + <!-- Squiz sniffs --> <rule ref="Squiz.Arrays.ArrayBracketSpacing"/> <rule ref="Squiz.Arrays.ArrayDeclaration">