Issue #2902407 by mfernea, zaporylie: Fix 'Drupal.Commenting.DataTypeNamespace' coding standard
parent
21707245a5
commit
4d176b95ea
|
@ -461,7 +461,7 @@ function theme_render_and_autoescape($arg) {
|
|||
*
|
||||
* @param array $theme_settings
|
||||
* 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.
|
||||
*
|
||||
* @return
|
||||
|
|
|
@ -38,7 +38,7 @@ interface AccessManagerInterface {
|
|||
/**
|
||||
* Execute access checks against the incoming request.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* The incoming request.
|
||||
* @param \Drupal\Core\Session\AccountInterface $account
|
||||
* (optional) Run access checks for this account. Defaults to the current
|
||||
|
|
|
@ -445,7 +445,7 @@ class ConfigEntityStorage extends EntityStorageBase implements ConfigEntityStora
|
|||
* @param bool $is_syncing
|
||||
* Is the configuration entity being created as part of a config sync.
|
||||
*
|
||||
* @return ConfigEntityInterface
|
||||
* @return \Drupal\Core\Config\ConfigEntityInterface
|
||||
* The configuration entity.
|
||||
*
|
||||
* @see \Drupal\Core\Config\Entity\ConfigEntityStorageInterface::createFromStorageRecord()
|
||||
|
|
|
@ -219,7 +219,7 @@ class QueryFactory implements QueryFactoryInterface, EventSubscriberInterface {
|
|||
/**
|
||||
* Updates configuration entity in the key store.
|
||||
*
|
||||
* @param ConfigCrudEvent $event
|
||||
* @param \Drupal\Core\Config\ConfigCrudEvent $event
|
||||
* The configuration event.
|
||||
*/
|
||||
public function onConfigSave(ConfigCrudEvent $event) {
|
||||
|
|
|
@ -676,13 +676,13 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
|
|||
*
|
||||
* @param \Exception $e
|
||||
* An exception
|
||||
* @param Request $request
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* A Request instance
|
||||
* @param int $type
|
||||
* The type of the request (one of HttpKernelInterface::MASTER_REQUEST or
|
||||
* HttpKernelInterface::SUB_REQUEST)
|
||||
*
|
||||
* @return Response
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* A Response instance
|
||||
*
|
||||
* @throws \Exception
|
||||
|
@ -1187,10 +1187,10 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
|
|||
/**
|
||||
* Attach synthetic values on to kernel.
|
||||
*
|
||||
* @param ContainerInterface $container
|
||||
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
|
||||
* Container object
|
||||
*
|
||||
* @return ContainerInterface
|
||||
* @return \Symfony\Component\DependencyInjection\ContainerInterface
|
||||
*/
|
||||
protected function attachSynthetic(ContainerInterface $container) {
|
||||
$persist = [];
|
||||
|
@ -1213,7 +1213,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface {
|
|||
/**
|
||||
* Compiles a new service container.
|
||||
*
|
||||
* @return ContainerBuilder The compiled service container
|
||||
* @return \Drupal\Core\DependencyInjection\ContainerBuilder The compiled service container
|
||||
*/
|
||||
protected function compileContainer() {
|
||||
// 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.
|
||||
*
|
||||
* @return ContainerBuilder
|
||||
* @return \Drupal\Core\DependencyInjection\ContainerBuilder
|
||||
*/
|
||||
protected function getContainerBuilder() {
|
||||
return new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
|
||||
|
|
|
@ -439,7 +439,7 @@ abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDispl
|
|||
/**
|
||||
* Determines if a field has options for a given display.
|
||||
*
|
||||
* @param FieldDefinitionInterface $definition
|
||||
* @param \Drupal\Core\Field\FieldDefinitionInterface $definition
|
||||
* A field definition.
|
||||
* @return array|null
|
||||
*/
|
||||
|
|
|
@ -37,9 +37,9 @@ class ConfigSnapshotSubscriber implements EventSubscriberInterface {
|
|||
/**
|
||||
* Constructs the ConfigSnapshotSubscriber object.
|
||||
*
|
||||
* @param StorageInterface $source_storage
|
||||
* @param \Drupal\Core\Config\StorageInterface $source_storage
|
||||
* 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.
|
||||
*/
|
||||
public function __construct(ConfigManagerInterface $config_manager, StorageInterface $source_storage, StorageInterface $snapshot_storage) {
|
||||
|
|
|
@ -82,7 +82,7 @@ class EntityReferenceEntityFormatter extends EntityReferenceFormatterBase implem
|
|||
* The view mode.
|
||||
* @param array $third_party_settings
|
||||
* Any third party settings settings.
|
||||
* @param LoggerChannelFactoryInterface $logger_factory
|
||||
* @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory
|
||||
* The logger factory.
|
||||
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
|
||||
* The entity type manager.
|
||||
|
|
|
@ -41,7 +41,7 @@ class MimeTypeGuesser implements MimeTypeGuesserInterface {
|
|||
/**
|
||||
* Constructs a MimeTypeGuesser object.
|
||||
*
|
||||
* @param StreamWrapperManagerInterface $stream_wrapper_manager
|
||||
* @param \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager
|
||||
* The stream wrapper manager.
|
||||
*/
|
||||
public function __construct(StreamWrapperManagerInterface $stream_wrapper_manager) {
|
||||
|
|
|
@ -62,7 +62,7 @@ class DialogRenderer implements MainContentRendererInterface {
|
|||
*
|
||||
* @param array &$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
|
||||
* to determine the target.
|
||||
*
|
||||
|
|
|
@ -67,7 +67,7 @@ class RouteMatch implements RouteMatchInterface {
|
|||
/**
|
||||
* Creates a RouteMatch from a request.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* A request object.
|
||||
*
|
||||
* @return \Drupal\Core\Routing\RouteMatchInterface
|
||||
|
|
|
@ -135,7 +135,7 @@ class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProv
|
|||
* very large route sets to be filtered down to likely candidates, which
|
||||
* may then be filtered in memory more completely.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* A request against which to match.
|
||||
*
|
||||
* @return \Symfony\Component\Routing\RouteCollection
|
||||
|
|
|
@ -78,10 +78,10 @@ class BlockFilterTest extends JavascriptTestBase {
|
|||
/**
|
||||
* Removes any non-visible elements from the passed array.
|
||||
*
|
||||
* @param NodeElement[] $elements
|
||||
* @param \Behat\Mink\Element\NodeElement[] $elements
|
||||
* An array of node elements.
|
||||
*
|
||||
* @return NodeElement[]
|
||||
* @return \Behat\Mink\Element\NodeElement[]
|
||||
*/
|
||||
protected function filterVisibleElements(array $elements) {
|
||||
$elements = array_filter($elements, function (NodeElement $element) {
|
||||
|
|
|
@ -31,7 +31,7 @@ class BlockContentRevisionsTest extends BlockContentTestBase {
|
|||
protected function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
/** @var UserInterface $user */
|
||||
/** @var \Drupal\user\Entity\UserInterface $user */
|
||||
$user = User::load(1);
|
||||
|
||||
// Create initial block.
|
||||
|
|
|
@ -37,7 +37,7 @@ class MigrateBlockContentTest extends MigrateDrupal6TestBase {
|
|||
* Tests the Drupal 6 custom block to Drupal 8 migration.
|
||||
*/
|
||||
public function testBlockMigration() {
|
||||
/** @var BlockContent $block */
|
||||
/** @var \Drupal\block_content\Entity\BlockContent $block */
|
||||
$block = BlockContent::load(1);
|
||||
$this->assertIdentical('My block 1', $block->label());
|
||||
$this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time());
|
||||
|
|
|
@ -41,9 +41,9 @@ class EntityComment extends EntityContentBase {
|
|||
* The plugin_id for the plugin instance.
|
||||
* @param mixed $plugin_definition
|
||||
* The plugin implementation definition.
|
||||
* @param MigrationInterface $migration
|
||||
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
|
||||
* The migration.
|
||||
* @param EntityStorageInterface $storage
|
||||
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
|
||||
* The storage for this entity type.
|
||||
* @param array $bundles
|
||||
* The list of bundles this entity type has.
|
||||
|
|
|
@ -14,7 +14,7 @@ class ConfigSubscriber extends ConfigImportValidateEventSubscriberBase {
|
|||
/**
|
||||
* Checks that the Configuration module is not being uninstalled.
|
||||
*
|
||||
* @param ConfigImporterEvent $event
|
||||
* @param \Drupal\Core\Config\ConfigImporterEvent $event
|
||||
* The config import event.
|
||||
*/
|
||||
public function onConfigImporterValidate(ConfigImporterEvent $event) {
|
||||
|
|
|
@ -121,7 +121,7 @@ class EntityTypeInfo implements ContainerInjectionInterface {
|
|||
/**
|
||||
* 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.
|
||||
*
|
||||
* @see hook_entity_type_alter()
|
||||
|
|
|
@ -136,7 +136,7 @@ class EntityModerationForm extends FormBase {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||
/** @var ContentEntityInterface $entity */
|
||||
/** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
|
||||
$entity = $form_state->get('entity');
|
||||
|
||||
$new_state = $form_state->getValue('new_state');
|
||||
|
|
|
@ -88,11 +88,11 @@ class ModerationStateAccessTest extends BrowserTestBase {
|
|||
* @param string $machine_name
|
||||
* The machine name of the type to create.
|
||||
*
|
||||
* @return NodeType
|
||||
* @return \Drupal\node\Entity\NodeType
|
||||
* The node type just created.
|
||||
*/
|
||||
protected function createNodeType($label, $machine_name) {
|
||||
/** @var NodeType $node_type */
|
||||
/** @var \Drupal\node\Entity\NodeType $node_type */
|
||||
$node_type = NodeType::create([
|
||||
'type' => $machine_name,
|
||||
'label' => $label,
|
||||
|
|
|
@ -69,7 +69,7 @@ class EntityOperationsTest extends KernelTestBase {
|
|||
|
||||
// Verify the entity saved correctly, and that the presence of pending
|
||||
// revisions doesn't affect the default node load.
|
||||
/** @var Node $page */
|
||||
/** @var \Drupal\node\Entity\Node $page */
|
||||
$page = Node::load($id);
|
||||
$this->assertEquals('A', $page->getTitle());
|
||||
$this->assertTrue($page->isDefaultRevision());
|
||||
|
@ -142,7 +142,7 @@ class EntityOperationsTest extends KernelTestBase {
|
|||
$id = $page->id();
|
||||
|
||||
// Verify the entity saved correctly.
|
||||
/** @var Node $page */
|
||||
/** @var \Drupal\node\Entity\Node $page */
|
||||
$page = Node::load($id);
|
||||
$this->assertEquals('A', $page->getTitle());
|
||||
$this->assertTrue($page->isDefaultRevision());
|
||||
|
|
|
@ -22,7 +22,7 @@ class ModerationInformationTest extends UnitTestCase {
|
|||
/**
|
||||
* Builds a mock user.
|
||||
*
|
||||
* @return AccountInterface
|
||||
* @return \Drupal\Core\Session\AccountInterface
|
||||
* The mocked user.
|
||||
*/
|
||||
protected function getUser() {
|
||||
|
@ -32,7 +32,7 @@ class ModerationInformationTest extends UnitTestCase {
|
|||
/**
|
||||
* Returns a mock Entity Type Manager.
|
||||
*
|
||||
* @return EntityTypeManagerInterface
|
||||
* @return \Drupal\Core\Entity\EntityTypeManagerInterface
|
||||
* The mocked entity type manager.
|
||||
*/
|
||||
protected function getEntityTypeManager() {
|
||||
|
|
|
@ -27,7 +27,7 @@ class ContentTranslationMetadataWrapper implements ContentTranslationMetadataWra
|
|||
/**
|
||||
* Initializes an instance of the content translation metadata handler.
|
||||
*
|
||||
* @param EntityInterface $translation
|
||||
* @param \Drupal\Core\Entity\EntityInterface $translation
|
||||
* The entity translation to be wrapped.
|
||||
* @param ContentTranslationHandlerInterface $handler
|
||||
* The content translation handler.
|
||||
|
|
|
@ -434,7 +434,7 @@ function editor_entity_revision_delete(EntityInterface $entity) {
|
|||
*
|
||||
* @param array $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.
|
||||
*/
|
||||
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
|
||||
* An array of file entity UUIDs.
|
||||
* @param EntityInterface $entity
|
||||
* @param \Drupal\Core\Entity\EntityInterface $entity
|
||||
* An entity whose fields to inspect for file references.
|
||||
* @param $count
|
||||
* 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.
|
||||
*
|
||||
* @param EntityInterface $entity
|
||||
* @param \Drupal\Core\Entity\EntityInterface $entity
|
||||
* An entity whose fields to analyze.
|
||||
*
|
||||
* @return array
|
||||
|
|
|
@ -36,7 +36,7 @@ abstract class FieldTestBase extends WebTestBase {
|
|||
*
|
||||
* This function only checks a single column in the field values.
|
||||
*
|
||||
* @param EntityInterface $entity
|
||||
* @param \Drupal\Core\Entity\EntityInterface $entity
|
||||
* The entity to test.
|
||||
* @param $field_name
|
||||
* The name of the field to test
|
||||
|
|
|
@ -33,7 +33,7 @@ abstract class FieldTestBase extends BrowserTestBase {
|
|||
*
|
||||
* This function only checks a single column in the field values.
|
||||
*
|
||||
* @param EntityInterface $entity
|
||||
* @param \Drupal\Core\Entity\EntityInterface $entity
|
||||
* The entity to test.
|
||||
* @param $field_name
|
||||
* The name of the field to test
|
||||
|
|
|
@ -172,7 +172,7 @@ abstract class FieldKernelTestBase extends KernelTestBase {
|
|||
*
|
||||
* This function only checks a single column in the field values.
|
||||
*
|
||||
* @param EntityInterface $entity
|
||||
* @param \Drupal\Core\Entity\EntityInterface $entity
|
||||
* The entity to test.
|
||||
* @param $field_name
|
||||
* The name of the field to test
|
||||
|
|
|
@ -452,7 +452,7 @@ class ManageDisplayTest extends WebTestBase {
|
|||
/**
|
||||
* 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.
|
||||
* @param $view_mode
|
||||
* 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.
|
||||
*
|
||||
* @param EntityInterface $node
|
||||
* @param \Drupal\Core\Entity\EntityInterface $node
|
||||
* The node.
|
||||
* @param $view_mode
|
||||
* 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
|
||||
* assertNodeViewNoText().
|
||||
*
|
||||
* @param EntityInterface $node
|
||||
* @param \Drupal\Core\Entity\EntityInterface $node
|
||||
* The node.
|
||||
* @param $view_mode
|
||||
* The view mode in which the node should be displayed.
|
||||
|
|
|
@ -36,7 +36,7 @@ class FilterID extends StaticMap implements ContainerFactoryPluginInterface {
|
|||
* The plugin definition.
|
||||
* @param \Drupal\Component\Plugin\PluginManagerInterface $filter_manager
|
||||
* The filter plugin manager.
|
||||
* @param TranslationInterface $translator
|
||||
* @param \Drupal\Core\StringTranslation\TranslationInterface $translator
|
||||
* (optional) The string translation service.
|
||||
*/
|
||||
public function __construct(array $configuration, $plugin_id, $plugin_definition, PluginManagerInterface $filter_manager, TranslationInterface $translator = NULL) {
|
||||
|
|
|
@ -24,7 +24,7 @@ class FilterIdTest extends KernelTestBase {
|
|||
/**
|
||||
* The mocked MigrateExecutable.
|
||||
*
|
||||
* @var MigrateExecutableInterface|\PHPUnit_Framework_MockObject_MockObject
|
||||
* @var \Drupal\migrate\MigrateExecutableInterface|\PHPUnit_Framework_MockObject_MockObject
|
||||
*/
|
||||
protected $executable;
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ function language_configuration_element_submit(&$form, FormStateInterface $form_
|
|||
$bundle = $values['bundle'];
|
||||
$form_object = $form_state->getFormObject();
|
||||
if ($form_object instanceof EntityFormInterface) {
|
||||
/** @var EntityFormInterface $form_object */
|
||||
/** @var \Drupal\Core\Entity\EntityFormInterface $form_object */
|
||||
$entity = $form_object->getEntity();
|
||||
if ($entity->getEntityType()->getBundleOf()) {
|
||||
$bundle = $entity->id();
|
||||
|
|
|
@ -81,7 +81,7 @@ class ConfigSubscriber implements EventSubscriberInterface {
|
|||
* then this event must be changed to work with both the old and new schema
|
||||
* definition so this event is update safe.
|
||||
*
|
||||
* @param ConfigCrudEvent $event
|
||||
* @param \Drupal\Core\Config\ConfigCrudEvent $event
|
||||
* The configuration event.
|
||||
*/
|
||||
public function onConfigSave(ConfigCrudEvent $event) {
|
||||
|
|
|
@ -42,7 +42,7 @@ class TranslationStatusForm extends FormBase {
|
|||
/**
|
||||
* Constructs a TranslationStatusForm object.
|
||||
*
|
||||
* @param ModuleHandlerInterface $module_handler
|
||||
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
|
||||
* A module handler.
|
||||
* @param \Drupal\Core\State\StateInterface $state
|
||||
* The state service.
|
||||
|
|
|
@ -86,9 +86,9 @@ abstract class Entity extends DestinationBase implements ContainerFactoryPluginI
|
|||
* The plugin_id for the plugin instance.
|
||||
* @param mixed $plugin_definition
|
||||
* The plugin implementation definition.
|
||||
* @param MigrationInterface $migration
|
||||
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
|
||||
* The migration.
|
||||
* @param EntityStorageInterface $storage
|
||||
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
|
||||
* The storage for this entity type.
|
||||
* @param array $bundles
|
||||
* The list of bundles this entity type has.
|
||||
|
|
|
@ -66,7 +66,7 @@ class MigrateBundleTest extends MigrateTestBase {
|
|||
// Import and validate the term entity was created with the correct bundle.
|
||||
$term_executable = new MigrateExecutable($term_migration, $this);
|
||||
$term_executable->import();
|
||||
/** @var Term $term */
|
||||
/** @var \Drupal\taxonomy\Entity\Term $term */
|
||||
$term = Term::load(1);
|
||||
$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.
|
||||
$term_executable = new MigrateExecutable($term_migration, $this);
|
||||
$term_executable->import();
|
||||
/** @var Term $term */
|
||||
/** @var \Drupal\taxonomy\Entity\Term $term */
|
||||
$term = Term::load(1);
|
||||
$this->assertEquals($term->bundle(), 'categories');
|
||||
$term = Term::load(2);
|
||||
|
@ -146,7 +146,7 @@ class MigrateBundleTest extends MigrateTestBase {
|
|||
// Import and validate the term entities were created with the correct bundle.
|
||||
$term_executable = new MigrateExecutable($term_migration, $this);
|
||||
$term_executable->import();
|
||||
/** @var Term $term */
|
||||
/** @var \Drupal\taxonomy\Entity\Term $term */
|
||||
$term = Term::load(1);
|
||||
$this->assertEquals($term->bundle(), 'categories');
|
||||
$term = Term::load(2);
|
||||
|
|
|
@ -69,7 +69,7 @@ class MigrateRollbackTest extends MigrateTestBase {
|
|||
$vocabulary_executable = new MigrateExecutable($vocabulary_migration, $this);
|
||||
$vocabulary_executable->import();
|
||||
foreach ($vocabulary_data_rows as $row) {
|
||||
/** @var Vocabulary $vocabulary */
|
||||
/** @var \Drupal\taxonomy\Entity\Vocabulary $vocabulary */
|
||||
$vocabulary = Vocabulary::load($row['id']);
|
||||
$this->assertTrue($vocabulary);
|
||||
$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);
|
||||
|
||||
foreach ($term_data_rows as $row) {
|
||||
/** @var Term $term */
|
||||
/** @var \Drupal\taxonomy\Entity\Term $term */
|
||||
$term = Term::load($row['id']);
|
||||
$this->assertTrue($term);
|
||||
$map_row = $term_id_map->getRowBySource(['id' => $row['id']]);
|
||||
|
|
|
@ -20,7 +20,7 @@ abstract class MigrateSourceTestBase extends KernelTestBase {
|
|||
/**
|
||||
* The mocked migration.
|
||||
*
|
||||
* @var MigrationInterface|\Prophecy\Prophecy\ObjectProphecy
|
||||
* @var \Drupal\migrate\Plugin\MigrationInterface|\Prophecy\Prophecy\ObjectProphecy
|
||||
*/
|
||||
protected $migration;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class QueryBatchTest extends KernelTestBase {
|
|||
/**
|
||||
* The mocked migration.
|
||||
*
|
||||
* @var MigrationInterface|\Prophecy\Prophecy\ObjectProphecy
|
||||
* @var \Drupal\migrate\Plugin\MigrationInterface|\Prophecy\Prophecy\ObjectProphecy
|
||||
*/
|
||||
protected $migration;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class EntityFieldStorageConfig extends BaseEntityFieldStorageConfig {
|
|||
* The plugin implementation definition.
|
||||
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
|
||||
* The migration.
|
||||
* @param EntityStorageInterface $storage
|
||||
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
|
||||
* The storage for this entity type.
|
||||
* @param array $bundles
|
||||
* The list of bundles this entity type has.
|
||||
|
|
|
@ -45,7 +45,7 @@ class DeleteNode extends ActionBase implements ContainerFactoryPluginInterface {
|
|||
* The plugin implementation definition.
|
||||
* @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
|
||||
* The tempstore factory.
|
||||
* @param AccountInterface $current_user
|
||||
* @param \Drupal\Core\Session\AccountInterface $current_user
|
||||
* Current user.
|
||||
*/
|
||||
public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) {
|
||||
|
|
|
@ -29,7 +29,7 @@ class Nid extends NumericArgument {
|
|||
* The plugin_id for the plugin instance.
|
||||
* @param mixed $plugin_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) {
|
||||
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
||||
|
|
|
@ -18,7 +18,7 @@ class DeleteForm extends ConfirmFormBase {
|
|||
/**
|
||||
* The alias storage service.
|
||||
*
|
||||
* @var AliasStorageInterface
|
||||
* @var \Drupal\Core\Path\AliasStorageInterface
|
||||
*/
|
||||
protected $aliasStorage;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ use Drupal\Core\Utility\LinkGeneratorInterface;
|
|||
class ResponsiveImageFormatter extends ImageFormatterBase implements ContainerFactoryPluginInterface {
|
||||
|
||||
/**
|
||||
* @var EntityStorageInterface
|
||||
* @var \Drupal\Core\Entity\EntityStorageInterface
|
||||
*/
|
||||
protected $responsiveImageStyleStorage;
|
||||
|
||||
|
|
|
@ -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.');
|
||||
}
|
||||
|
||||
/** @var FieldItemListInterface $items */
|
||||
/** @var \Drupal\Core\Field\FieldItemListInterface $items */
|
||||
$items = $context['target_instance'];
|
||||
$item_class = $items->getItemDefinition()->getClass();
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class TimezoneController {
|
|||
* Daylight saving time indicator. If abbr does not exist then the time
|
||||
* zone is searched solely by offset and isdst.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @return \Symfony\Component\HttpFoundation\JsonResponse
|
||||
* The timezone name in JsonResponse object.
|
||||
*/
|
||||
public function getTimezone($abbreviation = '', $offset = -1, $is_daylight_saving_time = NULL) {
|
||||
|
|
|
@ -68,7 +68,7 @@ class SystemConfigSubscriber implements EventSubscriberInterface {
|
|||
* This event listener checks that the system.site:uuid's in the source and
|
||||
* target match.
|
||||
*
|
||||
* @param ConfigImporterEvent $event
|
||||
* @param \Drupal\Core\Config\ConfigImporterEvent $event
|
||||
* The config import event.
|
||||
*/
|
||||
public function onConfigImporterValidateSiteUUID(ConfigImporterEvent $event) {
|
||||
|
|
|
@ -15,7 +15,7 @@ class MockRouteProvider implements RouteProviderInterface {
|
|||
/**
|
||||
* A collection of routes for this route provider.
|
||||
*
|
||||
* @var RouteCollection
|
||||
* @var \Symfony\Component\Routing\RouteCollection
|
||||
*/
|
||||
protected $routes;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class EntityTestPermissions {
|
|||
/**
|
||||
* 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.
|
||||
*
|
||||
* @return array
|
||||
|
|
|
@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
class IndexTidDepth extends ArgumentPluginBase implements ContainerFactoryPluginInterface {
|
||||
|
||||
/**
|
||||
* @var EntityStorageInterface
|
||||
* @var \Drupal\Core\Entity\EntityStorageInterface
|
||||
*/
|
||||
protected $termStorage;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
class Taxonomy extends NumericArgument implements ContainerFactoryPluginInterface {
|
||||
|
||||
/**
|
||||
* @var EntityStorageInterface
|
||||
* @var \Drupal\Core\Entity\EntityStorageInterface
|
||||
*/
|
||||
protected $termStorage;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class VocabularyVid extends NumericArgument {
|
|||
* The plugin_id for the plugin instance.
|
||||
* @param mixed $plugin_definition
|
||||
* The plugin implementation definition.
|
||||
* @param VocabularyStorageInterface $vocabulary_storage
|
||||
* @param \Drupal\taxonomy\VocabularyStorageInterface $vocabulary_storage
|
||||
* The vocabulary storage.
|
||||
*/
|
||||
public function __construct(array $configuration, $plugin_id, $plugin_definition, VocabularyStorageInterface $vocabulary_storage) {
|
||||
|
|
|
@ -84,7 +84,7 @@ class MigrateTaxonomyTermTest extends MigrateDrupal6TestBase {
|
|||
}
|
||||
|
||||
foreach ($expected_results as $tid => $values) {
|
||||
/** @var Term $term */
|
||||
/** @var \Drupal\taxonomy\Entity\Term $term */
|
||||
$term = $terms[$tid];
|
||||
$language = isset($values['language']) ? $values['language'] . ' - ' : '';
|
||||
$this->assertSame("{$language}term {$tid} of vocabulary {$values['source_vid']}", $term->name->value);
|
||||
|
|
|
@ -41,7 +41,7 @@ class UpdateTestController extends ControllerBase {
|
|||
* @param string $version
|
||||
* 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
|
||||
* for the specified project if one is available; a Response object with no
|
||||
* content otherwise.
|
||||
|
|
|
@ -45,7 +45,7 @@ class CancelUser extends ActionBase implements ContainerFactoryPluginInterface {
|
|||
* The plugin implementation definition.
|
||||
* @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
|
||||
* The tempstore factory.
|
||||
* @param AccountInterface $current_user
|
||||
* @param \Drupal\Core\Session\AccountInterface $current_user
|
||||
* Current user.
|
||||
*/
|
||||
public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) {
|
||||
|
|
|
@ -67,11 +67,11 @@ class UserSearch extends SearchPluginBase implements AccessibleInterface {
|
|||
/**
|
||||
* Creates a UserSearch object.
|
||||
*
|
||||
* @param Connection $database
|
||||
* @param \Drupal\Core\Database\Connection $database
|
||||
* The database connection.
|
||||
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
|
||||
* The entity manager.
|
||||
* @param ModuleHandlerInterface $module_handler
|
||||
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
|
||||
* The module handler.
|
||||
* @param \Drupal\Core\Session\AccountInterface $current_user
|
||||
* The current user.
|
||||
|
|
|
@ -39,7 +39,7 @@ class EntityUser extends EntityContentBase {
|
|||
* The plugin implementation definition.
|
||||
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
|
||||
* The migration.
|
||||
* @param EntityStorageInterface $storage
|
||||
* @param \Drupal\Core\Entity\EntityStorageInterface $storage
|
||||
* The storage for this entity type.
|
||||
* @param array $bundles
|
||||
* The list of bundles this entity type has.
|
||||
|
|
|
@ -68,7 +68,7 @@ class PrivateTempStore {
|
|||
/**
|
||||
* 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
|
||||
* represents a particular collection of data and will contain any number
|
||||
* of key/value pairs.
|
||||
|
|
|
@ -77,7 +77,7 @@ class SharedTempStore {
|
|||
/**
|
||||
* 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
|
||||
* represents a particular collection of data and will contain any number
|
||||
* of key/value pairs.
|
||||
|
|
|
@ -44,7 +44,7 @@ interface ViewsHandlerInterface extends ViewsPluginInterface {
|
|||
/**
|
||||
* Check whether given user has access to this handler.
|
||||
*
|
||||
* @param AccountInterface $account
|
||||
* @param \Drupal\Core\Session\AccountInterface $account
|
||||
* The user account to check.
|
||||
*
|
||||
* @return bool
|
||||
|
|
|
@ -292,7 +292,7 @@ abstract class CachePluginBase extends PluginBase {
|
|||
/**
|
||||
* Returns the row cache tags.
|
||||
*
|
||||
* @param ResultRow $row
|
||||
* @param \Drupal\views\ResultRow $row
|
||||
* A result row.
|
||||
*
|
||||
* @return string[]
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/ClassCommentSniff.php">
|
||||
<exclude name="Drupal.Commenting.ClassComment.Missing"/>
|
||||
</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">
|
||||
<!-- Sniff for these errors: SpacingAfterTagGroup, WrongEnd, SpacingBetween,
|
||||
ContentAfterOpen, SpacingBeforeShort, TagValueIndent, ShortStartSpace,
|
||||
|
|
|
@ -196,7 +196,7 @@ class EntityValidationTest extends EntityKernelTestBase {
|
|||
$this->assertTrue($constraint instanceof CompositeConstraintBase, 'Constraint is composite constraint.');
|
||||
$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.');
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class MatcherDumperTest extends KernelTestBase {
|
|||
/**
|
||||
* A collection of shared fixture data for tests.
|
||||
*
|
||||
* @var RoutingFixtures
|
||||
* @var \Drupal\Tests\Core\Routing\RoutingFixtures
|
||||
*/
|
||||
protected $fixtures;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class RouteProviderTest extends KernelTestBase {
|
|||
/**
|
||||
* A collection of shared fixture data for tests.
|
||||
*
|
||||
* @var RoutingFixtures
|
||||
* @var \Drupal\Tests\Core\Routing\RoutingFixtures
|
||||
*/
|
||||
protected $fixtures;
|
||||
|
||||
|
|
|
@ -164,11 +164,11 @@ class RegistryTest extends KernelTestBase {
|
|||
*/
|
||||
public function testThemeSuggestions() {
|
||||
// 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->isFrontPage()->willReturn(TRUE);
|
||||
$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->getPath()->willReturn('/node/1');
|
||||
$this->container->set('path.current', $path_current->reveal());
|
||||
|
|
|
@ -167,7 +167,7 @@ class DateTimePlusTest extends TestCase {
|
|||
* Assertion helper for testTimestamp and testDateTimestamp since they need
|
||||
* different dataProviders.
|
||||
*
|
||||
* @param DateTimePlus $date
|
||||
* @param \Drupal\Component\Datetime\DateTimePlus $date
|
||||
* DateTimePlus to test.
|
||||
* @input mixed $input
|
||||
* The original input passed to the test method.
|
||||
|
|
|
@ -1043,7 +1043,7 @@ class MockInstantiationService {
|
|||
class MockService {
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
* @var \Symfony\Component\DependencyInjection\ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ class MockService {
|
|||
/**
|
||||
* Sets the container object.
|
||||
*
|
||||
* @param ContainerInterface $container
|
||||
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
|
||||
* The container to inject via setter injection.
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container) {
|
||||
|
@ -1091,7 +1091,7 @@ class MockService {
|
|||
/**
|
||||
* Gets the container object.
|
||||
*
|
||||
* @return ContainerInterface
|
||||
* @return \Symfony\Component\DependencyInjection\ContainerInterface
|
||||
* The internally set container.
|
||||
*/
|
||||
public function getContainer() {
|
||||
|
|
|
@ -97,7 +97,7 @@ class BackendCompilerPassTest extends UnitTestCase {
|
|||
* bag so the setParameter() call effects the parent container as well.
|
||||
*
|
||||
* @param $service
|
||||
* @return ContainerBuilder
|
||||
* @return \Symfony\Component\DependencyInjection\ContainerBuilder
|
||||
*/
|
||||
protected function getSqliteContainer($service) {
|
||||
$container = new ContainerBuilder();
|
||||
|
@ -115,7 +115,7 @@ class BackendCompilerPassTest extends UnitTestCase {
|
|||
* bag so the setParameter() call effects the parent container as well.
|
||||
*
|
||||
* @param $service
|
||||
* @return ContainerBuilder
|
||||
* @return \Symfony\Component\DependencyInjection\ContainerBuilder
|
||||
*/
|
||||
protected function getMysqlContainer($service) {
|
||||
$container = new ContainerBuilder();
|
||||
|
|
|
@ -73,7 +73,7 @@ class EntityFormDisplayAccessControlHandlerTest extends UnitTestCase {
|
|||
/**
|
||||
* Returns a mock Entity Type Manager.
|
||||
*
|
||||
* @return EntityTypeManagerInterface
|
||||
* @return \Drupal\Core\Entity\EntityTypeManagerInterface
|
||||
* The mocked entity type manager.
|
||||
*/
|
||||
protected function getEntityTypeManager() {
|
||||
|
|
|
@ -112,7 +112,7 @@ class EntityAccessCheckTest extends UnitTestCase {
|
|||
*
|
||||
* @param \stdClass $object
|
||||
* Any object, including prophesized mocks based on interfaces.
|
||||
* @return RouteMatchInterface
|
||||
* @return \Drupal\Core\Routing\RouteMatchInterface
|
||||
* A prophesized RouteMatchInterface.
|
||||
*/
|
||||
private function createRouteMatchForObject(\stdClass $object) {
|
||||
|
|
|
@ -67,7 +67,7 @@ class RedirectResponseSubscriberTest extends UnitTestCase {
|
|||
/**
|
||||
* Test destination detection and redirection.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param \Symfony\Component\HttpFoundation\Request $request
|
||||
* The request object with destination query set.
|
||||
* @param string|bool $expected
|
||||
* The expected target URL or FALSE.
|
||||
|
|
|
@ -72,7 +72,7 @@ class ImageTest extends UnitTestCase {
|
|||
*
|
||||
* @param string $class_name
|
||||
* The name of the GD toolkit operation class to be mocked.
|
||||
* @param ImageToolkitInterface $toolkit
|
||||
* @param \Drupal\Core\Image\ImageToolkitInterface $toolkit
|
||||
* The image toolkit object.
|
||||
*
|
||||
* @return \PHPUnit_Framework_MockObject_MockObject
|
||||
|
|
|
@ -16,7 +16,7 @@ abstract class RouteMatchTestBase extends UnitTestCase {
|
|||
*
|
||||
* @param $name
|
||||
* Route name.
|
||||
* @param Route $route
|
||||
* @param \Symfony\Component\Routing\Route $route
|
||||
* Request object
|
||||
* @param array $parameters
|
||||
* Parameters array
|
||||
|
|
Loading…
Reference in New Issue