From 767d453d30ef94a7af831ecb3810192bfbfff795 Mon Sep 17 00:00:00 2001 From: xjm Date: Fri, 1 May 2020 20:23:15 -0500 Subject: [PATCH] Issue #3100251 by Hardik_Patel_12, longwave: Several code comments have incorrect namespaces for classes or interfaces they reference --- core/lib/Drupal/Core/Entity/entity.api.php | 4 ++-- core/lib/Drupal/Core/Language/LanguageManagerInterface.php | 2 +- core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php | 2 +- core/modules/contact/src/ContactFormInterface.php | 2 +- .../forum/src/Breadcrumb/ForumListingBreadcrumbBuilder.php | 2 +- .../image/src/Plugin/migrate/destination/EntityImageStyle.php | 2 +- .../tests/src/Kernel/MigrateEntityContentValidationTest.php | 2 +- .../src/Plugin/migrate/EntityReferenceTranslationDeriver.php | 4 ++-- core/modules/taxonomy/src/TermBreadcrumbBuilder.php | 2 +- core/modules/user/tests/src/Kernel/UserValidationTest.php | 4 ++-- core/tests/Drupal/Tests/Component/Utility/NumberTest.php | 4 ++-- .../Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/lib/Drupal/Core/Entity/entity.api.php b/core/lib/Drupal/Core/Entity/entity.api.php index 6c1d38387e8..c7616fc2d06 100644 --- a/core/lib/Drupal/Core/Entity/entity.api.php +++ b/core/lib/Drupal/Core/Entity/entity.api.php @@ -57,7 +57,7 @@ use Drupal\node\Entity\NodeType; * hook are of the specific entity class, not the generic Entity class, so in * your implementation, you can make the $entity argument something like $node * and give it a specific type hint (which should normally be to the specific - * interface, such as \Drupal\Node\NodeInterface for nodes). + * interface, such as \Drupal\node\NodeInterface for nodes). * - $storage in the code examples is assumed to be an entity storage * class. See the @link entity_api Entity API topic @endlink for * information on how to instantiate the correct storage class for an @@ -67,7 +67,7 @@ use Drupal\node\Entity\NodeType; * information on how to instantiate the correct view builder class for * an entity type. * - During many operations, static methods are called on the entity class, - * which implements \Drupal\Entity\EntityInterface. + * which implements \Drupal\Core\Entity\EntityInterface. * * @section entities_revisions_translations Entities, revisions and translations * A content entity can have multiple stored variants: based on its definition, diff --git a/core/lib/Drupal/Core/Language/LanguageManagerInterface.php b/core/lib/Drupal/Core/Language/LanguageManagerInterface.php index 624b5b40239..9a6b213d645 100644 --- a/core/lib/Drupal/Core/Language/LanguageManagerInterface.php +++ b/core/lib/Drupal/Core/Language/LanguageManagerInterface.php @@ -99,7 +99,7 @@ interface LanguageManagerInterface { * @param string $langcode * The language code. * - * @return \Drupal\core\Language\LanguageInterface|null + * @return \Drupal\Core\Language\LanguageInterface|null * A fully-populated language object or NULL. */ public function getLanguage($langcode); diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php index ec286a68ec9..cd33f515149 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php @@ -349,7 +349,7 @@ class Internal extends CKEditorPluginBase implements ContainerFactoryPluginInter */ protected function generateFormatTagsSetting(Editor $editor) { // When no text format is associated yet, assume no tag is allowed. - // @see \Drupal\Editor\EditorInterface::hasAssociatedFilterFormat() + // @see \Drupal\editor\EditorInterface::hasAssociatedFilterFormat() if (!$editor->hasAssociatedFilterFormat()) { return []; } diff --git a/core/modules/contact/src/ContactFormInterface.php b/core/modules/contact/src/ContactFormInterface.php index d179c1563d5..ef3b3ebfa80 100644 --- a/core/modules/contact/src/ContactFormInterface.php +++ b/core/modules/contact/src/ContactFormInterface.php @@ -38,7 +38,7 @@ interface ContactFormInterface extends ConfigEntityInterface { * * Empty redirect property results a url object of front page. * - * @return \Drupal\core\Url + * @return \Drupal\Core\Url * The redirect url object. */ public function getRedirectUrl(); diff --git a/core/modules/forum/src/Breadcrumb/ForumListingBreadcrumbBuilder.php b/core/modules/forum/src/Breadcrumb/ForumListingBreadcrumbBuilder.php index 91ea1a01c36..cb3bd89f893 100644 --- a/core/modules/forum/src/Breadcrumb/ForumListingBreadcrumbBuilder.php +++ b/core/modules/forum/src/Breadcrumb/ForumListingBreadcrumbBuilder.php @@ -25,7 +25,7 @@ class ForumListingBreadcrumbBuilder extends ForumBreadcrumbBuilderBase { $breadcrumb->addCacheContexts(['route']); // Add all parent forums to breadcrumbs. - /** @var \Drupal\Taxonomy\TermInterface $term */ + /** @var \Drupal\taxonomy\TermInterface $term */ $term = $route_match->getParameter('taxonomy_term'); $term_id = $term->id(); $breadcrumb->addCacheableDependency($term); diff --git a/core/modules/image/src/Plugin/migrate/destination/EntityImageStyle.php b/core/modules/image/src/Plugin/migrate/destination/EntityImageStyle.php index 3fc1e7f4ed9..51c73b5ad6d 100644 --- a/core/modules/image/src/Plugin/migrate/destination/EntityImageStyle.php +++ b/core/modules/image/src/Plugin/migrate/destination/EntityImageStyle.php @@ -30,7 +30,7 @@ class EntityImageStyle extends EntityConfigBase { $row->setDestinationProperty('effects', []); } - /** @var \Drupal\Image\Entity\ImageStyle $style */ + /** @var \Drupal\image\Entity\ImageStyle $style */ $style = $this->getEntity($row, $old_destination_id_values); // Iterate the effects array so each effect plugin can be initialized. diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php index 198b386c591..c0cf029412f 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php @@ -143,7 +143,7 @@ class MigrateEntityContentValidationTest extends KernelTestBase { /** * Reacts to map message event. * - * @param \Drupal\Migrate\Event\MigrateIdMapMessageEvent $event + * @param \Drupal\migrate\Event\MigrateIdMapMessageEvent $event * The migration event. */ public function mapMessageRecorder(MigrateIdMapMessageEvent $event) { diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php b/core/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php index bc336958607..603cbbe70a5 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/EntityReferenceTranslationDeriver.php @@ -66,9 +66,9 @@ class EntityReferenceTranslationDeriver extends DeriverBase implements Container * * @param string $base_plugin_id * The base plugin ID. - * @param \Drupal\core\Entity\EntityFieldManagerInterface $entity_field_manager + * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager * The entity field manager. - * @param \Drupal\core\Entity\EntityTypeManagerInterface $entity_type_manager + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * The entity type manager. */ public function __construct($base_plugin_id, EntityFieldManagerInterface $entity_field_manager, EntityTypeManagerInterface $entity_type_manager) { diff --git a/core/modules/taxonomy/src/TermBreadcrumbBuilder.php b/core/modules/taxonomy/src/TermBreadcrumbBuilder.php index 3ea856dae2a..7ae4bd5e322 100644 --- a/core/modules/taxonomy/src/TermBreadcrumbBuilder.php +++ b/core/modules/taxonomy/src/TermBreadcrumbBuilder.php @@ -33,7 +33,7 @@ class TermBreadcrumbBuilder implements BreadcrumbBuilderInterface { /** * The taxonomy storage. * - * @var \Drupal\Taxonomy\TermStorageInterface + * @var \Drupal\taxonomy\TermStorageInterface */ protected $termStorage; diff --git a/core/modules/user/tests/src/Kernel/UserValidationTest.php b/core/modules/user/tests/src/Kernel/UserValidationTest.php index b11811cf5ca..b12d7379a14 100644 --- a/core/modules/user/tests/src/Kernel/UserValidationTest.php +++ b/core/modules/user/tests/src/Kernel/UserValidationTest.php @@ -186,7 +186,7 @@ class UserValidationTest extends KernelTestBase { /** * Verifies that a length violation exists for the given field. * - * @param \Drupal\core\Entity\EntityInterface $entity + * @param \Drupal\Core\Entity\EntityInterface $entity * The entity object to validate. * @param string $field_name * The field that violates the maximum length. @@ -208,7 +208,7 @@ class UserValidationTest extends KernelTestBase { /** * Verifies that a AllowedValues violation exists for the given field. * - * @param \Drupal\core\Entity\EntityInterface $entity + * @param \Drupal\Core\Entity\EntityInterface $entity * The entity object to validate. * @param string $field_name * The name of the field to verify. diff --git a/core/tests/Drupal/Tests/Component/Utility/NumberTest.php b/core/tests/Drupal/Tests/Component/Utility/NumberTest.php index 1fc05d3ad78..0c5a5fa5072 100644 --- a/core/tests/Drupal/Tests/Component/Utility/NumberTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/NumberTest.php @@ -93,9 +93,9 @@ class NumberTest extends TestCase { } /** - * Data provider for \Drupal\Test\Component\Utility\NumberTest::testValidStepOffset(). + * Data provider for \Drupal\Tests\Component\Utility\NumberTest::testValidStepOffset(). * - * @see \Drupal\Test\Component\Utility\NumberTest::testValidStepOffset() + * @see \Drupal\Tests\Component\Utility\NumberTest::testValidStepOffset() */ public static function providerTestValidStepOffset() { return [ diff --git a/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php b/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php index dcd681ddf3b..db481e8c8e0 100644 --- a/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php +++ b/core/tests/Drupal/Tests/Core/Enhancer/EntityRevisionRouteEnhancerTest.php @@ -16,7 +16,7 @@ use Symfony\Component\Routing\Route; class EntityRevisionRouteEnhancerTest extends UnitTestCase { /** - * @var \Drupal\entity\RouteEnhancer\EntityRevisionRouteEnhancer + * @var \Drupal\Core\Routing\RouteEnhancer\EntityRevisionRouteEnhancer */ protected $routeEnhancer;