Skip to content

Commit

Permalink
Issue #3100251 by Hardik_Patel_12, longwave: Several code comments ha…
Browse files Browse the repository at this point in the history
…ve incorrect namespaces for classes or interfaces they reference
  • Loading branch information
xjm committed May 2, 2020
1 parent 0db69ac commit 6efd43f
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions lib/Drupal/Core/Entity/entity.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* 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
Expand All @@ -67,7 +67,7 @@
* 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,
Expand Down
2 changes: 1 addition & 1 deletion lib/Drupal/Core/Language/LanguageManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function getNativeLanguages();
* @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);
Expand Down
2 changes: 1 addition & 1 deletion modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function getButtons() {
*/
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 [];
}
Expand Down
2 changes: 1 addition & 1 deletion modules/contact/src/ContactFormInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getRedirectPath();
*
* 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function build(RouteMatchInterface $route_match) {
$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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function import(Row $row, array $old_destination_id_values = []) {
$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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function test2() {
/**
* 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion modules/taxonomy/src/TermBreadcrumbBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TermBreadcrumbBuilder implements BreadcrumbBuilderInterface {
/**
* The taxonomy storage.
*
* @var \Drupal\Taxonomy\TermStorageInterface
* @var \Drupal\taxonomy\TermStorageInterface
*/
protected $termStorage;

Expand Down
4 changes: 2 additions & 2 deletions modules/user/tests/src/Kernel/UserValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function testValidation() {
/**
* 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.
Expand All @@ -208,7 +208,7 @@ protected function assertLengthViolation(EntityInterface $entity, $field_name, $
/**
* 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.
Expand Down
4 changes: 2 additions & 2 deletions tests/Drupal/Tests/Component/Utility/NumberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ public static function providerTestValidStep() {
}

/**
* 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 [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class EntityRevisionRouteEnhancerTest extends UnitTestCase {

/**
* @var \Drupal\entity\RouteEnhancer\EntityRevisionRouteEnhancer
* @var \Drupal\Core\Routing\RouteEnhancer\EntityRevisionRouteEnhancer
*/
protected $routeEnhancer;

Expand Down

0 comments on commit 6efd43f

Please sign in to comment.