Revert "Issue #3327853 by Spokje, bbrala, longwave: Don't allow {@inheritDoc} annotation in PHPDocBlocks"

This reverts commit a997dea2dd.
merge-requests/3173/head
Dave Long 2022-12-20 12:32:48 +00:00
parent a997dea2dd
commit 5011ccc4c7
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
13 changed files with 31 additions and 47 deletions

View File

@ -29,7 +29,7 @@ class EntityAutocompleteMatcher implements EntityAutocompleteMatcherInterface {
}
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getMatches($target_type, $selection_handler, $selection_settings, $string = '') {
$matches = [];

View File

@ -55,7 +55,7 @@ class Media extends CKEditor5PluginDefault implements ContainerFactoryPluginInte
}
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(

View File

@ -48,7 +48,7 @@ class MediaLibrary extends CKEditor5PluginDefault implements ContainerFactoryPlu
}
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(

View File

@ -23,7 +23,7 @@ class DblogTypes extends InOperator {
}
/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function valueForm(&$form, FormStateInterface $form_state) {
parent::valueForm($form, $form_state);

View File

@ -13,28 +13,28 @@ use Drupal\Core\StreamWrapper\StreamWrapperInterface;
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 @@ class DummyExternalReadOnlyWrapper extends ReadOnlyStream {
}
/**
* {@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;

View File

@ -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();

View File

@ -496,7 +496,7 @@ class Migration extends PluginBase implements MigrationInterface, RequirementsIn
}
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function getRequirements(): array {
return $this->requirements;

View File

@ -364,7 +364,7 @@ class Connection extends DatabaseConnection implements SupportsTemporaryTablesIn
}
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public function hasJson(): bool {
try {

View File

@ -12,7 +12,7 @@ use Drupal\Core\Url;
class JSInteractionTestForm extends FormBase {
/**
* {@inheritdoc}
* @inheritDoc
*/
public function getFormId() {
return __CLASS__;

View File

@ -40,7 +40,7 @@ class UserControllerTest extends KernelTestBase {
];
/**
* {@inheritdoc}
* {@inheritDoc}
*/
protected function setUp(): void {

View File

@ -18,7 +18,7 @@ class ViewsConfigEntityTestViewsData implements EntityViewsDataInterface {
}
/**
* {@inheritdoc}
* @inheritDoc
*/
public function getViewsTableForEntityType(EntityTypeInterface $entity_type) {
return 'views_config_entity_test';

View File

@ -93,7 +93,7 @@ class WorkspaceRequestSubscriber implements EventSubscriberInterface {
}
/**
* {@inheritdoc}
* {@inheritDoc}
*/
public static function getSubscribedEvents(): array {
// Use a priority of 190 in order to run after the generic core subscriber.

View File

@ -251,22 +251,6 @@
<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">