Issue #2902407 by mfernea, zaporylie: Fix 'Drupal.Commenting.DataTypeNamespace' coding standard

8.5.x
Nathaniel Catchpole 2017-11-16 15:00:40 +00:00
parent 21707245a5
commit 4d176b95ea
73 changed files with 97 additions and 96 deletions

View File

@ -461,7 +461,7 @@ function theme_render_and_autoescape($arg) {
* *
* @param array $theme_settings * @param array $theme_settings
* An array of theme settings from system setting form or a Drupal 7 variable. * An array of theme settings from system setting form or a Drupal 7 variable.
* @param Config $config * @param \Drupal\Core\Config\Config $config
* The configuration object to update. * The configuration object to update.
* *
* @return * @return

View File

@ -38,7 +38,7 @@ interface AccessManagerInterface {
/** /**
* Execute access checks against the incoming request. * Execute access checks against the incoming request.
* *
* @param Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* The incoming request. * The incoming request.
* @param \Drupal\Core\Session\AccountInterface $account * @param \Drupal\Core\Session\AccountInterface $account
* (optional) Run access checks for this account. Defaults to the current * (optional) Run access checks for this account. Defaults to the current

View File

@ -445,7 +445,7 @@ class ConfigEntityStorage extends EntityStorageBase implements ConfigEntityStora
* @param bool $is_syncing * @param bool $is_syncing
* Is the configuration entity being created as part of a config sync. * Is the configuration entity being created as part of a config sync.
* *
* @return ConfigEntityInterface * @return \Drupal\Core\Config\ConfigEntityInterface
* The configuration entity. * The configuration entity.
* *
* @see \Drupal\Core\Config\Entity\ConfigEntityStorageInterface::createFromStorageRecord() * @see \Drupal\Core\Config\Entity\ConfigEntityStorageInterface::createFromStorageRecord()

View File

@ -219,7 +219,7 @@ class QueryFactory implements QueryFactoryInterface, EventSubscriberInterface {
/** /**
* Updates configuration entity in the key store. * Updates configuration entity in the key store.
* *
* @param ConfigCrudEvent $event * @param \Drupal\Core\Config\ConfigCrudEvent $event
* The configuration event. * The configuration event.
*/ */
public function onConfigSave(ConfigCrudEvent $event) { public function onConfigSave(ConfigCrudEvent $event) {

View File

@ -676,13 +676,13 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
* *
* @param \Exception $e * @param \Exception $e
* An exception * An exception
* @param Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* A Request instance * A Request instance
* @param int $type * @param int $type
* The type of the request (one of HttpKernelInterface::MASTER_REQUEST or * The type of the request (one of HttpKernelInterface::MASTER_REQUEST or
* HttpKernelInterface::SUB_REQUEST) * HttpKernelInterface::SUB_REQUEST)
* *
* @return Response * @return \Symfony\Component\HttpFoundation\Response
* A Response instance * A Response instance
* *
* @throws \Exception * @throws \Exception
@ -1187,10 +1187,10 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
/** /**
* Attach synthetic values on to kernel. * Attach synthetic values on to kernel.
* *
* @param ContainerInterface $container * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* Container object * Container object
* *
* @return ContainerInterface * @return \Symfony\Component\DependencyInjection\ContainerInterface
*/ */
protected function attachSynthetic(ContainerInterface $container) { protected function attachSynthetic(ContainerInterface $container) {
$persist = []; $persist = [];
@ -1213,7 +1213,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
/** /**
* Compiles a new service container. * Compiles a new service container.
* *
* @return ContainerBuilder The compiled service container * @return \Drupal\Core\DependencyInjection\ContainerBuilder The compiled service container
*/ */
protected function compileContainer() { protected function compileContainer() {
// We are forcing a container build so it is reasonable to assume that the // We are forcing a container build so it is reasonable to assume that the
@ -1334,7 +1334,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
/** /**
* Gets a new ContainerBuilder instance used to build the service container. * Gets a new ContainerBuilder instance used to build the service container.
* *
* @return ContainerBuilder * @return \Drupal\Core\DependencyInjection\ContainerBuilder
*/ */
protected function getContainerBuilder() { protected function getContainerBuilder() {
return new ContainerBuilder(new ParameterBag($this->getKernelParameters())); return new ContainerBuilder(new ParameterBag($this->getKernelParameters()));

View File

@ -439,7 +439,7 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl
/** /**
* Determines if a field has options for a given display. * Determines if a field has options for a given display.
* *
* @param FieldDefinitionInterface $definition * @param \Drupal\Core\Field\FieldDefinitionInterface $definition
* A field definition. * A field definition.
* @return array|null * @return array|null
*/ */

View File

@ -37,9 +37,9 @@ class ConfigSnapshotSubscriber implements EventSubscriberInterface {
/** /**
* Constructs the ConfigSnapshotSubscriber object. * Constructs the ConfigSnapshotSubscriber object.
* *
* @param StorageInterface $source_storage * @param \Drupal\Core\Config\StorageInterface $source_storage
* The source storage used to discover configuration changes. * The source storage used to discover configuration changes.
* @param StorageInterface $snapshot_storage * @param \Drupal\Core\Config\StorageInterface $snapshot_storage
* The snapshot storage used to write configuration changes. * The snapshot storage used to write configuration changes.
*/ */
public function __construct(ConfigManagerInterface $config_manager, StorageInterface $source_storage, StorageInterface $snapshot_storage) { public function __construct(ConfigManagerInterface $config_manager, StorageInterface $source_storage, StorageInterface $snapshot_storage) {

View File

@ -82,7 +82,7 @@ class EntityReferenceEntityFormatter extends EntityReferenceFormatterBase implem
* The view mode. * The view mode.
* @param array $third_party_settings * @param array $third_party_settings
* Any third party settings settings. * Any third party settings settings.
* @param LoggerChannelFactoryInterface $logger_factory * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory
* The logger factory. * The logger factory.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager. * The entity type manager.

View File

@ -41,7 +41,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface {
/** /**
* Constructs a MimeTypeGuesser object. * Constructs a MimeTypeGuesser object.
* *
* @param StreamWrapperManagerInterface $stream_wrapper_manager * @param \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager
* The stream wrapper manager. * The stream wrapper manager.
*/ */
public function __construct(StreamWrapperManagerInterface $stream_wrapper_manager) { public function __construct(StreamWrapperManagerInterface $stream_wrapper_manager) {

View File

@ -62,7 +62,7 @@ class DialogRenderer implements MainContentRendererInterface {
* *
* @param array &$options * @param array &$options
* The 'target' option, if set, is used, and then removed from $options. * The 'target' option, if set, is used, and then removed from $options.
* @param RouteMatchInterface $route_match * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* When no 'target' option is set in $options, $route_match is used instead * When no 'target' option is set in $options, $route_match is used instead
* to determine the target. * to determine the target.
* *

View File

@ -67,7 +67,7 @@ class RouteMatch implements RouteMatchInterface {
/** /**
* Creates a RouteMatch from a request. * Creates a RouteMatch from a request.
* *
* @param Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* A request object. * A request object.
* *
* @return \Drupal\Core\Routing\RouteMatchInterface * @return \Drupal\Core\Routing\RouteMatchInterface

View File

@ -135,7 +135,7 @@ class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProv
* very large route sets to be filtered down to likely candidates, which * very large route sets to be filtered down to likely candidates, which
* may then be filtered in memory more completely. * may then be filtered in memory more completely.
* *
* @param Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* A request against which to match. * A request against which to match.
* *
* @return \Symfony\Component\Routing\RouteCollection * @return \Symfony\Component\Routing\RouteCollection

View File

@ -78,10 +78,10 @@ class BlockFilterTest extends JavascriptTestBase {
/** /**
* Removes any non-visible elements from the passed array. * Removes any non-visible elements from the passed array.
* *
* @param NodeElement[] $elements * @param \Behat\Mink\Element\NodeElement[] $elements
* An array of node elements. * An array of node elements.
* *
* @return NodeElement[] * @return \Behat\Mink\Element\NodeElement[]
*/ */
protected function filterVisibleElements(array $elements) { protected function filterVisibleElements(array $elements) {
$elements = array_filter($elements, function (NodeElement $element) { $elements = array_filter($elements, function (NodeElement $element) {

View File

@ -31,7 +31,7 @@ class BlockContentRevisionsTest extends BlockContentTestBase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
/** @var UserInterface $user */ /** @var \Drupal\user\Entity\UserInterface $user */
$user = User::load(1); $user = User::load(1);
// Create initial block. // Create initial block.

View File

@ -37,7 +37,7 @@ class MigrateBlockContentTest extends MigrateDrupal6TestBase {
* Tests the Drupal 6 custom block to Drupal 8 migration. * Tests the Drupal 6 custom block to Drupal 8 migration.
*/ */
public function testBlockMigration() { public function testBlockMigration() {
/** @var BlockContent $block */ /** @var \Drupal\block_content\Entity\BlockContent $block */
$block = BlockContent::load(1); $block = BlockContent::load(1);
$this->assertIdentical('My block 1', $block->label()); $this->assertIdentical('My block 1', $block->label());
$this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time()); $this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time());

View File

@ -41,9 +41,9 @@ class EntityComment extends EntityContentBase {
* The plugin_id for the plugin instance. * The plugin_id for the plugin instance.
* @param mixed $plugin_definition * @param mixed $plugin_definition
* The plugin implementation definition. * The plugin implementation definition.
* @param MigrationInterface $migration * @param \Drupal\migrate\Plugin\MigrationInterface $migration
* The migration. * The migration.
* @param EntityStorageInterface $storage * @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The storage for this entity type. * The storage for this entity type.
* @param array $bundles * @param array $bundles
* The list of bundles this entity type has. * The list of bundles this entity type has.

View File

@ -14,7 +14,7 @@ class ConfigSubscriber extends ConfigImportValidateEventSubscriberBase {
/** /**
* Checks that the Configuration module is not being uninstalled. * Checks that the Configuration module is not being uninstalled.
* *
* @param ConfigImporterEvent $event * @param \Drupal\Core\Config\ConfigImporterEvent $event
* The config import event. * The config import event.
*/ */
public function onConfigImporterValidate(ConfigImporterEvent $event) { public function onConfigImporterValidate(ConfigImporterEvent $event) {

View File

@ -121,7 +121,7 @@ class EntityTypeInfo implements ContainerInjectionInterface {
/** /**
* Adds Moderation configuration to appropriate entity types. * Adds Moderation configuration to appropriate entity types.
* *
* @param EntityTypeInterface[] $entity_types * @param \Drupal\Core\Entity\EntityTypeInterface[] $entity_types
* The master entity type list to alter. * The master entity type list to alter.
* *
* @see hook_entity_type_alter() * @see hook_entity_type_alter()

View File

@ -136,7 +136,7 @@ class EntityModerationForm extends FormBase {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function submitForm(array &$form, FormStateInterface $form_state) { public function submitForm(array &$form, FormStateInterface $form_state) {
/** @var ContentEntityInterface $entity */ /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
$entity = $form_state->get('entity'); $entity = $form_state->get('entity');
$new_state = $form_state->getValue('new_state'); $new_state = $form_state->getValue('new_state');

View File

@ -88,11 +88,11 @@ class ModerationStateAccessTest extends BrowserTestBase {
* @param string $machine_name * @param string $machine_name
* The machine name of the type to create. * The machine name of the type to create.
* *
* @return NodeType * @return \Drupal\node\Entity\NodeType
* The node type just created. * The node type just created.
*/ */
protected function createNodeType($label, $machine_name) { protected function createNodeType($label, $machine_name) {
/** @var NodeType $node_type */ /** @var \Drupal\node\Entity\NodeType $node_type */
$node_type = NodeType::create([ $node_type = NodeType::create([
'type' => $machine_name, 'type' => $machine_name,
'label' => $label, 'label' => $label,

View File

@ -69,7 +69,7 @@ class EntityOperationsTest extends KernelTestBase {
// Verify the entity saved correctly, and that the presence of pending // Verify the entity saved correctly, and that the presence of pending
// revisions doesn't affect the default node load. // revisions doesn't affect the default node load.
/** @var Node $page */ /** @var \Drupal\node\Entity\Node $page */
$page = Node::load($id); $page = Node::load($id);
$this->assertEquals('A', $page->getTitle()); $this->assertEquals('A', $page->getTitle());
$this->assertTrue($page->isDefaultRevision()); $this->assertTrue($page->isDefaultRevision());
@ -142,7 +142,7 @@ class EntityOperationsTest extends KernelTestBase {
$id = $page->id(); $id = $page->id();
// Verify the entity saved correctly. // Verify the entity saved correctly.
/** @var Node $page */ /** @var \Drupal\node\Entity\Node $page */
$page = Node::load($id); $page = Node::load($id);
$this->assertEquals('A', $page->getTitle()); $this->assertEquals('A', $page->getTitle());
$this->assertTrue($page->isDefaultRevision()); $this->assertTrue($page->isDefaultRevision());

View File

@ -22,7 +22,7 @@ class ModerationInformationTest extends UnitTestCase {
/** /**
* Builds a mock user. * Builds a mock user.
* *
* @return AccountInterface * @return \Drupal\Core\Session\AccountInterface
* The mocked user. * The mocked user.
*/ */
protected function getUser() { protected function getUser() {
@ -32,7 +32,7 @@ class ModerationInformationTest extends UnitTestCase {
/** /**
* Returns a mock Entity Type Manager. * Returns a mock Entity Type Manager.
* *
* @return EntityTypeManagerInterface * @return \Drupal\Core\Entity\EntityTypeManagerInterface
* The mocked entity type manager. * The mocked entity type manager.
*/ */
protected function getEntityTypeManager() { protected function getEntityTypeManager() {

View File

@ -27,7 +27,7 @@ class ContentTranslationMetadataWrapper implements ContentTranslationMetadataWra
/** /**
* Initializes an instance of the content translation metadata handler. * Initializes an instance of the content translation metadata handler.
* *
* @param EntityInterface $translation * @param \Drupal\Core\Entity\EntityInterface $translation
* The entity translation to be wrapped. * The entity translation to be wrapped.
* @param ContentTranslationHandlerInterface $handler * @param ContentTranslationHandlerInterface $handler
* The content translation handler. * The content translation handler.

View File

@ -434,7 +434,7 @@ function editor_entity_revision_delete(EntityInterface $entity) {
* *
* @param array $uuids * @param array $uuids
* An array of file entity UUIDs. * An array of file entity UUIDs.
* @param EntityInterface $entity * @param \Drupal\Core\Entity\EntityInterface $entity
* An entity whose fields to inspect for file references. * An entity whose fields to inspect for file references.
*/ */
function _editor_record_file_usage(array $uuids, EntityInterface $entity) { function _editor_record_file_usage(array $uuids, EntityInterface $entity) {
@ -454,7 +454,7 @@ function _editor_record_file_usage(array $uuids, EntityInterface $entity) {
* *
* @param array $uuids * @param array $uuids
* An array of file entity UUIDs. * An array of file entity UUIDs.
* @param EntityInterface $entity * @param \Drupal\Core\Entity\EntityInterface $entity
* An entity whose fields to inspect for file references. * An entity whose fields to inspect for file references.
* @param $count * @param $count
* The number of references to delete. Should be 1 when deleting a single * The number of references to delete. Should be 1 when deleting a single
@ -545,7 +545,7 @@ function editor_file_download($uri) {
/** /**
* Finds all files referenced (data-entity-uuid) by formatted text fields. * Finds all files referenced (data-entity-uuid) by formatted text fields.
* *
* @param EntityInterface $entity * @param \Drupal\Core\Entity\EntityInterface $entity
* An entity whose fields to analyze. * An entity whose fields to analyze.
* *
* @return array * @return array

View File

@ -36,7 +36,7 @@ abstract class FieldTestBase extends WebTestBase {
* *
* This function only checks a single column in the field values. * This function only checks a single column in the field values.
* *
* @param EntityInterface $entity * @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to test. * The entity to test.
* @param $field_name * @param $field_name
* The name of the field to test * The name of the field to test

View File

@ -33,7 +33,7 @@ abstract class FieldTestBase extends BrowserTestBase {
* *
* This function only checks a single column in the field values. * This function only checks a single column in the field values.
* *
* @param EntityInterface $entity * @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to test. * The entity to test.
* @param $field_name * @param $field_name
* The name of the field to test * The name of the field to test

View File

@ -172,7 +172,7 @@ abstract class FieldKernelTestBase extends KernelTestBase {
* *
* This function only checks a single column in the field values. * This function only checks a single column in the field values.
* *
* @param EntityInterface $entity * @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to test. * The entity to test.
* @param $field_name * @param $field_name
* The name of the field to test * The name of the field to test

View File

@ -452,7 +452,7 @@ class ManageDisplayTest extends WebTestBase {
/** /**
* Asserts that a string is found in the rendered node in a view mode. * Asserts that a string is found in the rendered node in a view mode.
* *
* @param EntityInterface $node * @param \Drupal\Core\Entity\EntityInterface $node
* The node. * The node.
* @param $view_mode * @param $view_mode
* The view mode in which the node should be displayed. * The view mode in which the node should be displayed.
@ -471,7 +471,7 @@ class ManageDisplayTest extends WebTestBase {
/** /**
* Asserts that a string is not found in the rendered node in a view mode. * Asserts that a string is not found in the rendered node in a view mode.
* *
* @param EntityInterface $node * @param \Drupal\Core\Entity\EntityInterface $node
* The node. * The node.
* @param $view_mode * @param $view_mode
* The view mode in which the node should be displayed. * The view mode in which the node should be displayed.
@ -492,7 +492,7 @@ class ManageDisplayTest extends WebTestBase {
* This helper function is used by assertNodeViewText() and * This helper function is used by assertNodeViewText() and
* assertNodeViewNoText(). * assertNodeViewNoText().
* *
* @param EntityInterface $node * @param \Drupal\Core\Entity\EntityInterface $node
* The node. * The node.
* @param $view_mode * @param $view_mode
* The view mode in which the node should be displayed. * The view mode in which the node should be displayed.

View File

@ -36,7 +36,7 @@ class FilterID extends StaticMap implements ContainerFactoryPluginInterface {
* The plugin definition. * The plugin definition.
* @param \Drupal\Component\Plugin\PluginManagerInterface $filter_manager * @param \Drupal\Component\Plugin\PluginManagerInterface $filter_manager
* The filter plugin manager. * The filter plugin manager.
* @param TranslationInterface $translator * @param \Drupal\Core\StringTranslation\TranslationInterface $translator
* (optional) The string translation service. * (optional) The string translation service.
*/ */
public function __construct(array $configuration, $plugin_id, $plugin_definition, PluginManagerInterface $filter_manager, TranslationInterface $translator = NULL) { public function __construct(array $configuration, $plugin_id, $plugin_definition, PluginManagerInterface $filter_manager, TranslationInterface $translator = NULL) {

View File

@ -24,7 +24,7 @@ class FilterIdTest extends KernelTestBase {
/** /**
* The mocked MigrateExecutable. * The mocked MigrateExecutable.
* *
* @var MigrateExecutableInterface|\PHPUnit_Framework_MockObject_MockObject * @var \Drupal\migrate\MigrateExecutableInterface|\PHPUnit_Framework_MockObject_MockObject
*/ */
protected $executable; protected $executable;

View File

@ -193,7 +193,7 @@ function language_configuration_element_submit(&$form, FormStateInterface $form_
$bundle = $values['bundle']; $bundle = $values['bundle'];
$form_object = $form_state->getFormObject(); $form_object = $form_state->getFormObject();
if ($form_object instanceof EntityFormInterface) { if ($form_object instanceof EntityFormInterface) {
/** @var EntityFormInterface $form_object */ /** @var \Drupal\Core\Entity\EntityFormInterface $form_object */
$entity = $form_object->getEntity(); $entity = $form_object->getEntity();
if ($entity->getEntityType()->getBundleOf()) { if ($entity->getEntityType()->getBundleOf()) {
$bundle = $entity->id(); $bundle = $entity->id();

View File

@ -81,7 +81,7 @@ class ConfigSubscriber implements EventSubscriberInterface {
* then this event must be changed to work with both the old and new schema * then this event must be changed to work with both the old and new schema
* definition so this event is update safe. * definition so this event is update safe.
* *
* @param ConfigCrudEvent $event * @param \Drupal\Core\Config\ConfigCrudEvent $event
* The configuration event. * The configuration event.
*/ */
public function onConfigSave(ConfigCrudEvent $event) { public function onConfigSave(ConfigCrudEvent $event) {

View File

@ -42,7 +42,7 @@ class TranslationStatusForm extends FormBase {
/** /**
* Constructs a TranslationStatusForm object. * Constructs a TranslationStatusForm object.
* *
* @param ModuleHandlerInterface $module_handler * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* A module handler. * A module handler.
* @param \Drupal\Core\State\StateInterface $state * @param \Drupal\Core\State\StateInterface $state
* The state service. * The state service.

View File

@ -86,9 +86,9 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
* The plugin_id for the plugin instance. * The plugin_id for the plugin instance.
* @param mixed $plugin_definition * @param mixed $plugin_definition
* The plugin implementation definition. * The plugin implementation definition.
* @param MigrationInterface $migration * @param \Drupal\migrate\Plugin\MigrationInterface $migration
* The migration. * The migration.
* @param EntityStorageInterface $storage * @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The storage for this entity type. * The storage for this entity type.
* @param array $bundles * @param array $bundles
* The list of bundles this entity type has. * The list of bundles this entity type has.

View File

@ -66,7 +66,7 @@ class MigrateBundleTest extends MigrateTestBase {
// Import and validate the term entity was created with the correct bundle. // Import and validate the term entity was created with the correct bundle.
$term_executable = new MigrateExecutable($term_migration, $this); $term_executable = new MigrateExecutable($term_migration, $this);
$term_executable->import(); $term_executable->import();
/** @var Term $term */ /** @var \Drupal\taxonomy\Entity\Term $term */
$term = Term::load(1); $term = Term::load(1);
$this->assertEquals($term->bundle(), 'categories'); $this->assertEquals($term->bundle(), 'categories');
} }
@ -104,7 +104,7 @@ class MigrateBundleTest extends MigrateTestBase {
// Import and validate the term entities were created with the correct bundle. // Import and validate the term entities were created with the correct bundle.
$term_executable = new MigrateExecutable($term_migration, $this); $term_executable = new MigrateExecutable($term_migration, $this);
$term_executable->import(); $term_executable->import();
/** @var Term $term */ /** @var \Drupal\taxonomy\Entity\Term $term */
$term = Term::load(1); $term = Term::load(1);
$this->assertEquals($term->bundle(), 'categories'); $this->assertEquals($term->bundle(), 'categories');
$term = Term::load(2); $term = Term::load(2);
@ -146,7 +146,7 @@ class MigrateBundleTest extends MigrateTestBase {
// Import and validate the term entities were created with the correct bundle. // Import and validate the term entities were created with the correct bundle.
$term_executable = new MigrateExecutable($term_migration, $this); $term_executable = new MigrateExecutable($term_migration, $this);
$term_executable->import(); $term_executable->import();
/** @var Term $term */ /** @var \Drupal\taxonomy\Entity\Term $term */
$term = Term::load(1); $term = Term::load(1);
$this->assertEquals($term->bundle(), 'categories'); $this->assertEquals($term->bundle(), 'categories');
$term = Term::load(2); $term = Term::load(2);

View File

@ -69,7 +69,7 @@ class MigrateRollbackTest extends MigrateTestBase {
$vocabulary_executable = new MigrateExecutable($vocabulary_migration, $this); $vocabulary_executable = new MigrateExecutable($vocabulary_migration, $this);
$vocabulary_executable->import(); $vocabulary_executable->import();
foreach ($vocabulary_data_rows as $row) { foreach ($vocabulary_data_rows as $row) {
/** @var Vocabulary $vocabulary */ /** @var \Drupal\taxonomy\Entity\Vocabulary $vocabulary */
$vocabulary = Vocabulary::load($row['id']); $vocabulary = Vocabulary::load($row['id']);
$this->assertTrue($vocabulary); $this->assertTrue($vocabulary);
$map_row = $vocabulary_id_map->getRowBySource(['id' => $row['id']]); $map_row = $vocabulary_id_map->getRowBySource(['id' => $row['id']]);
@ -122,7 +122,7 @@ class MigrateRollbackTest extends MigrateTestBase {
$map_row['source_row_status'], MigrateIdMapInterface::ROLLBACK_PRESERVE); $map_row['source_row_status'], MigrateIdMapInterface::ROLLBACK_PRESERVE);
foreach ($term_data_rows as $row) { foreach ($term_data_rows as $row) {
/** @var Term $term */ /** @var \Drupal\taxonomy\Entity\Term $term */
$term = Term::load($row['id']); $term = Term::load($row['id']);
$this->assertTrue($term); $this->assertTrue($term);
$map_row = $term_id_map->getRowBySource(['id' => $row['id']]); $map_row = $term_id_map->getRowBySource(['id' => $row['id']]);

View File

@ -20,7 +20,7 @@ abstract class MigrateSourceTestBase extends KernelTestBase {
/** /**
* The mocked migration. * The mocked migration.
* *
* @var MigrationInterface|\Prophecy\Prophecy\ObjectProphecy * @var \Drupal\migrate\Plugin\MigrationInterface|\Prophecy\Prophecy\ObjectProphecy
*/ */
protected $migration; protected $migration;

View File

@ -19,7 +19,7 @@ class QueryBatchTest extends KernelTestBase {
/** /**
* The mocked migration. * The mocked migration.
* *
* @var MigrationInterface|\Prophecy\Prophecy\ObjectProphecy * @var \Drupal\migrate\Plugin\MigrationInterface|\Prophecy\Prophecy\ObjectProphecy
*/ */
protected $migration; protected $migration;

View File

@ -43,7 +43,7 @@ class EntityFieldStorageConfig extends BaseEntityFieldStorageConfig {
* The plugin implementation definition. * The plugin implementation definition.
* @param \Drupal\migrate\Plugin\MigrationInterface $migration * @param \Drupal\migrate\Plugin\MigrationInterface $migration
* The migration. * The migration.
* @param EntityStorageInterface $storage * @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The storage for this entity type. * The storage for this entity type.
* @param array $bundles * @param array $bundles
* The list of bundles this entity type has. * The list of bundles this entity type has.

View File

@ -45,7 +45,7 @@ class DeleteNode extends ActionBase implements ContainerFactoryPluginInterface {
* The plugin implementation definition. * The plugin implementation definition.
* @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
* The tempstore factory. * The tempstore factory.
* @param AccountInterface $current_user * @param \Drupal\Core\Session\AccountInterface $current_user
* Current user. * Current user.
*/ */
public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) { public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) {

View File

@ -29,7 +29,7 @@ class Nid extends NumericArgument {
* The plugin_id for the plugin instance. * The plugin_id for the plugin instance.
* @param mixed $plugin_definition * @param mixed $plugin_definition
* The plugin implementation definition. * The plugin implementation definition.
* @param NodeStorageInterface $node_storage * @param \Drupal\node\NodeStorageInterface $node_storage
*/ */
public function __construct(array $configuration, $plugin_id, $plugin_definition, NodeStorageInterface $node_storage) { public function __construct(array $configuration, $plugin_id, $plugin_definition, NodeStorageInterface $node_storage) {
parent::__construct($configuration, $plugin_id, $plugin_definition); parent::__construct($configuration, $plugin_id, $plugin_definition);

View File

@ -18,7 +18,7 @@ class DeleteForm extends ConfirmFormBase {
/** /**
* The alias storage service. * The alias storage service.
* *
* @var AliasStorageInterface * @var \Drupal\Core\Path\AliasStorageInterface
*/ */
protected $aliasStorage; protected $aliasStorage;

View File

@ -32,7 +32,7 @@ use Drupal\Core\Utility\LinkGeneratorInterface;
class ResponsiveImageFormatter extends ImageFormatterBase implements ContainerFactoryPluginInterface { class ResponsiveImageFormatter extends ImageFormatterBase implements ContainerFactoryPluginInterface {
/** /**
* @var EntityStorageInterface * @var \Drupal\Core\Entity\EntityStorageInterface
*/ */
protected $responsiveImageStyleStorage; protected $responsiveImageStyleStorage;

View File

@ -35,7 +35,7 @@ class FieldNormalizer extends ListNormalizer implements DenormalizerInterface {
throw new InvalidArgumentException('The field passed in via $context[\'target_instance\'] must have a parent set.'); throw new InvalidArgumentException('The field passed in via $context[\'target_instance\'] must have a parent set.');
} }
/** @var FieldItemListInterface $items */ /** @var \Drupal\Core\Field\FieldItemListInterface $items */
$items = $context['target_instance']; $items = $context['target_instance'];
$item_class = $items->getItemDefinition()->getClass(); $item_class = $items->getItemDefinition()->getClass();

View File

@ -24,7 +24,7 @@ class TimezoneController {
* Daylight saving time indicator. If abbr does not exist then the time * Daylight saving time indicator. If abbr does not exist then the time
* zone is searched solely by offset and isdst. * zone is searched solely by offset and isdst.
* *
* @return JsonResponse * @return \Symfony\Component\HttpFoundation\JsonResponse
* The timezone name in JsonResponse object. * The timezone name in JsonResponse object.
*/ */
public function getTimezone($abbreviation = '', $offset = -1, $is_daylight_saving_time = NULL) { public function getTimezone($abbreviation = '', $offset = -1, $is_daylight_saving_time = NULL) {

View File

@ -68,7 +68,7 @@ class SystemConfigSubscriber implements EventSubscriberInterface {
* This event listener checks that the system.site:uuid's in the source and * This event listener checks that the system.site:uuid's in the source and
* target match. * target match.
* *
* @param ConfigImporterEvent $event * @param \Drupal\Core\Config\ConfigImporterEvent $event
* The config import event. * The config import event.
*/ */
public function onConfigImporterValidateSiteUUID(ConfigImporterEvent $event) { public function onConfigImporterValidateSiteUUID(ConfigImporterEvent $event) {

View File

@ -15,7 +15,7 @@ class MockRouteProvider implements RouteProviderInterface {
/** /**
* A collection of routes for this route provider. * A collection of routes for this route provider.
* *
* @var RouteCollection * @var \Symfony\Component\Routing\RouteCollection
*/ */
protected $routes; protected $routes;

View File

@ -32,7 +32,7 @@ class EntityTestPermissions {
/** /**
* Returns a list of entity test permissions for a given entity test bundle. * Returns a list of entity test permissions for a given entity test bundle.
* *
* @param EntityTestBundle $type * @param \Drupal\entity_test\Entity\EntityTestBundle $type
* The entity test bundle. * The entity test bundle.
* *
* @return array * @return array

View File

@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class IndexTidDepth extends ArgumentPluginBase implements ContainerFactoryPluginInterface { class IndexTidDepth extends ArgumentPluginBase implements ContainerFactoryPluginInterface {
/** /**
* @var EntityStorageInterface * @var \Drupal\Core\Entity\EntityStorageInterface
*/ */
protected $termStorage; protected $termStorage;

View File

@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
class Taxonomy extends NumericArgument implements ContainerFactoryPluginInterface { class Taxonomy extends NumericArgument implements ContainerFactoryPluginInterface {
/** /**
* @var EntityStorageInterface * @var \Drupal\Core\Entity\EntityStorageInterface
*/ */
protected $termStorage; protected $termStorage;

View File

@ -31,7 +31,7 @@ class VocabularyVid extends NumericArgument {
* The plugin_id for the plugin instance. * The plugin_id for the plugin instance.
* @param mixed $plugin_definition * @param mixed $plugin_definition
* The plugin implementation definition. * The plugin implementation definition.
* @param VocabularyStorageInterface $vocabulary_storage * @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage
* The vocabulary storage. * The vocabulary storage.
*/ */
public function __construct(array $configuration, $plugin_id, $plugin_definition, VocabularyStorageInterface $vocabulary_storage) { public function __construct(array $configuration, $plugin_id, $plugin_definition, VocabularyStorageInterface $vocabulary_storage) {

View File

@ -84,7 +84,7 @@ class MigrateTaxonomyTermTest extends MigrateDrupal6TestBase {
} }
foreach ($expected_results as $tid => $values) { foreach ($expected_results as $tid => $values) {
/** @var Term $term */ /** @var \Drupal\taxonomy\Entity\Term $term */
$term = $terms[$tid]; $term = $terms[$tid];
$language = isset($values['language']) ? $values['language'] . ' - ' : ''; $language = isset($values['language']) ? $values['language'] . ' - ' : '';
$this->assertSame("{$language}term {$tid} of vocabulary {$values['source_vid']}", $term->name->value); $this->assertSame("{$language}term {$tid} of vocabulary {$values['source_vid']}", $term->name->value);

View File

@ -41,7 +41,7 @@ class UpdateTestController extends ControllerBase {
* @param string $version * @param string $version
* The version of Drupal core. * The version of Drupal core.
* *
* @return BinaryFileResponse|Response * @return \Symfony\Component\HttpFoundation\BinaryFileResponse|Response
* A BinaryFileResponse object containing the content of the XML release file * A BinaryFileResponse object containing the content of the XML release file
* for the specified project if one is available; a Response object with no * for the specified project if one is available; a Response object with no
* content otherwise. * content otherwise.

View File

@ -45,7 +45,7 @@ class CancelUser extends ActionBase implements ContainerFactoryPluginInterface {
* The plugin implementation definition. * The plugin implementation definition.
* @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
* The tempstore factory. * The tempstore factory.
* @param AccountInterface $current_user * @param \Drupal\Core\Session\AccountInterface $current_user
* Current user. * Current user.
*/ */
public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) { public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) {

View File

@ -67,11 +67,11 @@ class UserSearch extends SearchPluginBase implements AccessibleInterface {
/** /**
* Creates a UserSearch object. * Creates a UserSearch object.
* *
* @param Connection $database * @param \Drupal\Core\Database\Connection $database
* The database connection. * The database connection.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager. * The entity manager.
* @param ModuleHandlerInterface $module_handler * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler. * The module handler.
* @param \Drupal\Core\Session\AccountInterface $current_user * @param \Drupal\Core\Session\AccountInterface $current_user
* The current user. * The current user.

View File

@ -39,7 +39,7 @@ class EntityUser extends EntityContentBase {
* The plugin implementation definition. * The plugin implementation definition.
* @param \Drupal\migrate\Plugin\MigrationInterface $migration * @param \Drupal\migrate\Plugin\MigrationInterface $migration
* The migration. * The migration.
* @param EntityStorageInterface $storage * @param \Drupal\Core\Entity\EntityStorageInterface $storage
* The storage for this entity type. * The storage for this entity type.
* @param array $bundles * @param array $bundles
* The list of bundles this entity type has. * The list of bundles this entity type has.

View File

@ -68,7 +68,7 @@ class PrivateTempStore {
/** /**
* Constructs a new object for accessing data from a key/value store. * Constructs a new object for accessing data from a key/value store.
* *
* @param KeyValueStoreExpirableInterface $storage * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $storage
* The key/value storage object used for this data. Each storage object * The key/value storage object used for this data. Each storage object
* represents a particular collection of data and will contain any number * represents a particular collection of data and will contain any number
* of key/value pairs. * of key/value pairs.

View File

@ -77,7 +77,7 @@ class SharedTempStore {
/** /**
* Constructs a new object for accessing data from a key/value store. * Constructs a new object for accessing data from a key/value store.
* *
* @param KeyValueStoreExpirableInterface $storage * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $storage
* The key/value storage object used for this data. Each storage object * The key/value storage object used for this data. Each storage object
* represents a particular collection of data and will contain any number * represents a particular collection of data and will contain any number
* of key/value pairs. * of key/value pairs.

View File

@ -44,7 +44,7 @@ interface ViewsHandlerInterface extends ViewsPluginInterface {
/** /**
* Check whether given user has access to this handler. * Check whether given user has access to this handler.
* *
* @param AccountInterface $account * @param \Drupal\Core\Session\AccountInterface $account
* The user account to check. * The user account to check.
* *
* @return bool * @return bool

View File

@ -292,7 +292,7 @@ abstract class CachePluginBase extends PluginBase {
/** /**
* Returns the row cache tags. * Returns the row cache tags.
* *
* @param ResultRow $row * @param \Drupal\views\ResultRow $row
* A result row. * A result row.
* *
* @return string[] * @return string[]

View File

@ -28,6 +28,7 @@
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/ClassCommentSniff.php"> <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/ClassCommentSniff.php">
<exclude name="Drupal.Commenting.ClassComment.Missing"/> <exclude name="Drupal.Commenting.ClassComment.Missing"/>
</rule> </rule>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/DataTypeNamespaceSniff.php"/>
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php"> <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php">
<!-- Sniff for these errors: SpacingAfterTagGroup, WrongEnd, SpacingBetween, <!-- Sniff for these errors: SpacingAfterTagGroup, WrongEnd, SpacingBetween,
ContentAfterOpen, SpacingBeforeShort, TagValueIndent, ShortStartSpace, ContentAfterOpen, SpacingBeforeShort, TagValueIndent, ShortStartSpace,

View File

@ -196,7 +196,7 @@ class EntityValidationTest extends EntityKernelTestBase {
$this->assertTrue($constraint instanceof CompositeConstraintBase, 'Constraint is composite constraint.'); $this->assertTrue($constraint instanceof CompositeConstraintBase, 'Constraint is composite constraint.');
$this->assertEqual('type', $violations[0]->getPropertyPath()); $this->assertEqual('type', $violations[0]->getPropertyPath());
/** @var CompositeConstraintBase $constraint */ /** @var \Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase $constraint */
$this->assertEqual($constraint->coversFields(), ['name', 'type'], 'Information about covered fields can be retrieved.'); $this->assertEqual($constraint->coversFields(), ['name', 'type'], 'Information about covered fields can be retrieved.');
} }

View File

@ -23,7 +23,7 @@ class MatcherDumperTest extends KernelTestBase {
/** /**
* A collection of shared fixture data for tests. * A collection of shared fixture data for tests.
* *
* @var RoutingFixtures * @var \Drupal\Tests\Core\Routing\RoutingFixtures
*/ */
protected $fixtures; protected $fixtures;

View File

@ -41,7 +41,7 @@ class RouteProviderTest extends KernelTestBase {
/** /**
* A collection of shared fixture data for tests. * A collection of shared fixture data for tests.
* *
* @var RoutingFixtures * @var \Drupal\Tests\Core\Routing\RoutingFixtures
*/ */
protected $fixtures; protected $fixtures;

View File

@ -164,11 +164,11 @@ class RegistryTest extends KernelTestBase {
*/ */
public function testThemeSuggestions() { public function testThemeSuggestions() {
// Mock the current page as the front page. // Mock the current page as the front page.
/** @var PathMatcherInterface $path_matcher */ /** @var \Drupal\Core\Path\PathMatcherInterface $path_matcher */
$path_matcher = $this->prophesize(PathMatcherInterface::class); $path_matcher = $this->prophesize(PathMatcherInterface::class);
$path_matcher->isFrontPage()->willReturn(TRUE); $path_matcher->isFrontPage()->willReturn(TRUE);
$this->container->set('path.matcher', $path_matcher->reveal()); $this->container->set('path.matcher', $path_matcher->reveal());
/** @var CurrentPathStack $path_matcher */ /** @var \Drupal\Core\Path\CurrentPathStack $path_matcher */
$path_current = $this->prophesize(CurrentPathStack::class); $path_current = $this->prophesize(CurrentPathStack::class);
$path_current->getPath()->willReturn('/node/1'); $path_current->getPath()->willReturn('/node/1');
$this->container->set('path.current', $path_current->reveal()); $this->container->set('path.current', $path_current->reveal());

View File

@ -167,7 +167,7 @@ class DateTimePlusTest extends TestCase {
* Assertion helper for testTimestamp and testDateTimestamp since they need * Assertion helper for testTimestamp and testDateTimestamp since they need
* different dataProviders. * different dataProviders.
* *
* @param DateTimePlus $date * @param \Drupal\Component\Datetime\DateTimePlus $date
* DateTimePlus to test. * DateTimePlus to test.
* @input mixed $input * @input mixed $input
* The original input passed to the test method. * The original input passed to the test method.

View File

@ -1043,7 +1043,7 @@ class MockInstantiationService {
class MockService { class MockService {
/** /**
* @var ContainerInterface * @var \Symfony\Component\DependencyInjection\ContainerInterface
*/ */
protected $container; protected $container;
@ -1081,7 +1081,7 @@ class MockService {
/** /**
* Sets the container object. * Sets the container object.
* *
* @param ContainerInterface $container * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* The container to inject via setter injection. * The container to inject via setter injection.
*/ */
public function setContainer(ContainerInterface $container) { public function setContainer(ContainerInterface $container) {
@ -1091,7 +1091,7 @@ class MockService {
/** /**
* Gets the container object. * Gets the container object.
* *
* @return ContainerInterface * @return \Symfony\Component\DependencyInjection\ContainerInterface
* The internally set container. * The internally set container.
*/ */
public function getContainer() { public function getContainer() {

View File

@ -97,7 +97,7 @@ class BackendCompilerPassTest extends UnitTestCase {
* bag so the setParameter() call effects the parent container as well. * bag so the setParameter() call effects the parent container as well.
* *
* @param $service * @param $service
* @return ContainerBuilder * @return \Symfony\Component\DependencyInjection\ContainerBuilder
*/ */
protected function getSqliteContainer($service) { protected function getSqliteContainer($service) {
$container = new ContainerBuilder(); $container = new ContainerBuilder();
@ -115,7 +115,7 @@ class BackendCompilerPassTest extends UnitTestCase {
* bag so the setParameter() call effects the parent container as well. * bag so the setParameter() call effects the parent container as well.
* *
* @param $service * @param $service
* @return ContainerBuilder * @return \Symfony\Component\DependencyInjection\ContainerBuilder
*/ */
protected function getMysqlContainer($service) { protected function getMysqlContainer($service) {
$container = new ContainerBuilder(); $container = new ContainerBuilder();

View File

@ -73,7 +73,7 @@ class EntityFormDisplayAccessControlHandlerTest extends UnitTestCase {
/** /**
* Returns a mock Entity Type Manager. * Returns a mock Entity Type Manager.
* *
* @return EntityTypeManagerInterface * @return \Drupal\Core\Entity\EntityTypeManagerInterface
* The mocked entity type manager. * The mocked entity type manager.
*/ */
protected function getEntityTypeManager() { protected function getEntityTypeManager() {

View File

@ -112,7 +112,7 @@ class EntityAccessCheckTest extends UnitTestCase {
* *
* @param \stdClass $object * @param \stdClass $object
* Any object, including prophesized mocks based on interfaces. * Any object, including prophesized mocks based on interfaces.
* @return RouteMatchInterface * @return \Drupal\Core\Routing\RouteMatchInterface
* A prophesized RouteMatchInterface. * A prophesized RouteMatchInterface.
*/ */
private function createRouteMatchForObject(\stdClass $object) { private function createRouteMatchForObject(\stdClass $object) {

View File

@ -67,7 +67,7 @@ class RedirectResponseSubscriberTest extends UnitTestCase {
/** /**
* Test destination detection and redirection. * Test destination detection and redirection.
* *
* @param Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* The request object with destination query set. * The request object with destination query set.
* @param string|bool $expected * @param string|bool $expected
* The expected target URL or FALSE. * The expected target URL or FALSE.

View File

@ -72,7 +72,7 @@ class ImageTest extends UnitTestCase {
* *
* @param string $class_name * @param string $class_name
* The name of the GD toolkit operation class to be mocked. * The name of the GD toolkit operation class to be mocked.
* @param ImageToolkitInterface $toolkit * @param \Drupal\Core\Image\ImageToolkitInterface $toolkit
* The image toolkit object. * The image toolkit object.
* *
* @return \PHPUnit_Framework_MockObject_MockObject * @return \PHPUnit_Framework_MockObject_MockObject

View File

@ -16,7 +16,7 @@ abstract class RouteMatchTestBase extends UnitTestCase {
* *
* @param $name * @param $name
* Route name. * Route name.
* @param Route $route * @param \Symfony\Component\Routing\Route $route
* Request object * Request object
* @param array $parameters * @param array $parameters
* Parameters array * Parameters array