Issue #2903911 by joshmiller, longwave, anmolgoyal74, ankithashetty, init90, Pooja Ganjage, _gradient_, daffie, borisson_: Fix 'Drupal.Commenting.FunctionComment.ParamMissingDefinition' coding standard

merge-requests/484/head
Alex Pott 2021-03-29 16:22:14 +01:00
parent 4ae7ef9031
commit 08766c5dee
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
75 changed files with 269 additions and 47 deletions

View File

@ -17,10 +17,14 @@ class InvalidPluginDefinitionException extends PluginException {
/** /**
* Constructs an InvalidPluginDefinitionException. * Constructs an InvalidPluginDefinitionException.
* *
* For the remaining parameters see \Exception.
*
* @param string $plugin_id * @param string $plugin_id
* The plugin ID of the mapper. * The plugin ID of the mapper.
* @param string $message
* The exception message.
* @param int $code
* The exception code.
* @param \Exception|null $previous
* The previous throwable used for exception chaining.
* *
* @see \Exception * @see \Exception
*/ */

View File

@ -10,10 +10,14 @@ class PluginNotFoundException extends PluginException {
/** /**
* Construct a PluginNotFoundException exception. * Construct a PluginNotFoundException exception.
* *
* For the remaining parameters see \Exception.
*
* @param string $plugin_id * @param string $plugin_id
* The plugin ID that was not found. * The plugin ID that was not found.
* @param string $message
* The exception message.
* @param int $code
* The exception code.
* @param \Exception|null $previous
* The previous throwable used for exception chaining.
* *
* @see \Exception * @see \Exception
*/ */

View File

@ -452,10 +452,12 @@ class LibraryDiscoveryParser {
* The containing library definition. * The containing library definition.
* @param array $sub_key * @param array $sub_key
* An array containing the sub-keys specifying the library asset, e.g. * An array containing the sub-keys specifying the library asset, e.g.
* @code['js']@endcode or @code['css', 'component']@endcode * ['js'] or ['css', 'component'].
* @param array $overrides * @param array $overrides
* Specifies the overrides, this is an array where the key is the asset to * Specifies the overrides, this is an array where the key is the asset to
* be overridden while the value is overriding asset. * be overridden while the value is overriding asset.
* @param string $theme_path
* The theme or base theme.
*/ */
protected function setOverrideValue(array &$library, array $sub_key, array $overrides, $theme_path) { protected function setOverrideValue(array &$library, array $sub_key, array $overrides, $theme_path) {
foreach ($overrides as $original => $replacement) { foreach ($overrides as $original => $replacement) {

View File

@ -64,6 +64,8 @@ class UnmetDependenciesException extends ConfigException {
* *
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation * @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translation service. * The string translation service.
* @param string $extension
* The name of the extension that is being installed.
* *
* @return string * @return string
*/ */

View File

@ -103,13 +103,16 @@ class Schema extends DatabaseSchema {
* We introspect the database to collect the information required by insert * We introspect the database to collect the information required by insert
* and update queries. * and update queries.
* *
* @param $table_name * @param string $table
* The non-prefixed name of the table. * The non-prefixed name of the table.
* *
* @return * @return mixed|object
* An object with two member variables: * An object with two member variables:
* - 'blob_fields' that lists all the blob fields in the table. * - 'blob_fields' that lists all the blob fields in the table.
* - 'sequences' that lists the sequences used in that table. * - 'sequences' that lists the sequences used in that table.
*
* @throws \Exception
* Exception thrown when the query for the table information fails.
*/ */
public function queryTableInformation($table) { public function queryTableInformation($table) {
// Generate a key to reference this table's information on. // Generate a key to reference this table's information on.
@ -233,6 +236,9 @@ EOD;
* *
* @return array * @return array
* An array containing all the constraint names for the field. * An array containing all the constraint names for the field.
*
* @throws \Exception
* Exception thrown when the query for the table information fails.
*/ */
public function queryFieldInformation($table, $field, $constraint_type = 'c') { public function queryFieldInformation($table, $field, $constraint_type = 'c') {
assert(in_array($constraint_type, ['c', 'f', 'p', 'u', 't', 'x'])); assert(in_array($constraint_type, ['c', 'f', 'p', 'u', 't', 'x']));
@ -267,12 +273,12 @@ EOD;
/** /**
* Generate SQL to create a new table from a Drupal schema definition. * Generate SQL to create a new table from a Drupal schema definition.
* *
* @param $name * @param string $name
* The name of the table to create. * The name of the table to create.
* @param $table * @param array $table
* A Schema API table definition array. * A Schema API table definition array.
* *
* @return * @return array
* An array of SQL statements to create the table. * An array of SQL statements to create the table.
*/ */
protected function createTableSql($name, $table) { protected function createTableSql($name, $table) {

View File

@ -72,13 +72,13 @@ abstract class Schema implements PlaceholderInterface {
/** /**
* Get information about the table name and schema from the prefix. * Get information about the table name and schema from the prefix.
* *
* @param * @param string $table
* Name of table to look prefix up for. Defaults to 'default' because that's * Name of table to look prefix up for. Defaults to 'default' because that's
* default key for prefix. * default key for prefix.
* @param $add_prefix * @param bool $add_prefix
* Boolean that indicates whether the given table name should be prefixed. * Boolean that indicates whether the given table name should be prefixed.
* *
* @return * @return array
* A keyed array with information about the schema, table name and prefix. * A keyed array with information about the schema, table name and prefix.
*/ */
protected function getPrefixInfo($table = 'default', $add_prefix = TRUE) { protected function getPrefixInfo($table = 'default', $add_prefix = TRUE) {
@ -238,9 +238,9 @@ abstract class Schema implements PlaceholderInterface {
/** /**
* Check if a column exists in the given table. * Check if a column exists in the given table.
* *
* @param $table * @param string $table
* The name of the table in drupal (no prefixing). * The name of the table in drupal (no prefixing).
* @param $column * @param string $column
* The name of the column. * The name of the column.
* *
* @return * @return

View File

@ -77,8 +77,6 @@ interface EntityFormInterface extends BaseFormIdInterface {
* the submitted form values are copied to entity properties. The form's * the submitted form values are copied to entity properties. The form's
* entity remains unchanged. * entity remains unchanged.
* *
* @see \Drupal\Core\Entity\EntityFormInterface::getEntity()
*
* @param array $form * @param array $form
* A nested array form elements comprising the form. * A nested array form elements comprising the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state * @param \Drupal\Core\Form\FormStateInterface $form_state
@ -86,6 +84,8 @@ interface EntityFormInterface extends BaseFormIdInterface {
* *
* @return \Drupal\Core\Entity\EntityInterface * @return \Drupal\Core\Entity\EntityInterface
* An updated copy of the form's entity object. * An updated copy of the form's entity object.
*
* @see \Drupal\Core\Entity\EntityFormInterface::getEntity()
*/ */
public function buildEntity(array $form, FormStateInterface $form_state); public function buildEntity(array $form, FormStateInterface $form_state);

View File

@ -50,6 +50,8 @@ class EntityDeriver implements ContainerDeriverInterface {
* The base plugin ID. * The base plugin ID.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager. * The entity type manager.
* @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $bundle_info_service
* The bundle info service.
*/ */
public function __construct($base_plugin_id, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $bundle_info_service) { public function __construct($base_plugin_id, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $bundle_info_service) {
$this->basePluginId = $base_plugin_id; $this->basePluginId = $base_plugin_id;

View File

@ -34,10 +34,11 @@ interface ConditionAggregateInterface extends \Countable {
/** /**
* Queries for the existence of a field. * Queries for the existence of a field.
* *
* @param $field * @param string $field
* @param string $function
* @param string $langcode * @param string $langcode
* *
* @return ConditionInterface * @return \Drupal\Core\Entity\Query\ConditionInterface
* *
* @see \Drupal\Core\Entity\Query\QueryInterface::exists() * @see \Drupal\Core\Entity\Query\QueryInterface::exists()
*/ */
@ -47,8 +48,10 @@ interface ConditionAggregateInterface extends \Countable {
* Queries for the nonexistence of a field. * Queries for the nonexistence of a field.
* *
* @param string $field * @param string $field
* @param string $function
* @param string $langcode
* *
* @return ConditionInterface * @return \Drupal\Core\Entity\Query\ConditionInterface
* *
* @see \Drupal\Core\Entity\Query\QueryInterface::notExists() * @see \Drupal\Core\Entity\Query\QueryInterface::notExists()
*/ */

View File

@ -54,6 +54,8 @@ interface ConditionInterface {
* *
* @param string $field * @param string $field
* @param string $langcode * @param string $langcode
* (optional) For which language the entity should be prepared, defaults to
* the current content language.
* *
* @return $this * @return $this
* *

View File

@ -369,14 +369,32 @@ class Tables implements TablesInterface {
} }
/** /**
* Join field table if necessary. * Ensure the field table is joined if necessary.
* *
* @param $field_name * @param string $index_prefix
* Name of the field. * The table array index prefix. For a base table this will be empty,
* for a target entity reference like 'field_tags.entity:taxonomy_term.name'
* this will be 'entity:taxonomy_term.target_id.'.
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface &$field
* The field storage definition for the field being joined.
* @param string $type
* The join type.
* @param string $langcode
* The langcode we use on the join.
* @param string $base_table
* The table to join to. It can be either the table name, its alias or the
* 'base_table' placeholder.
* @param string $entity_id_field
* The name of the ID field/property for the current entity. For instance:
* tid, nid, etc.
* @param string $field_id_field
* The column representing the id for the field. For example, 'revision_id'
* or 'entity_id'.
* @param string $delta
* A delta which should be used as additional condition.
* *
* @return string * @return string
* * The alias of the joined table.
* @throws \Drupal\Core\Entity\Query\QueryException
*/ */
protected function ensureFieldTable($index_prefix, &$field, $type, $langcode, $base_table, $entity_id_field, $field_id_field, $delta) { protected function ensureFieldTable($index_prefix, &$field, $type, $langcode, $base_table, $entity_id_field, $field_id_field, $delta) {
$field_name = $field->getName(); $field_name = $field->getName();
@ -435,6 +453,7 @@ class Tables implements TablesInterface {
* *
* @param string $table * @param string $table
* The table name. * The table name.
* @param string $entity_type_id
* *
* @return array|false * @return array|false
* An associative array of table field mapping for the given table, keyed by * An associative array of table field mapping for the given table, keyed by

View File

@ -15,6 +15,9 @@ class EntityDataDefinition extends ComplexDataDefinitionBase implements EntityDa
* @param string $entity_type_id * @param string $entity_type_id
* (optional) The ID of the entity type, or NULL if the entity type is * (optional) The ID of the entity type, or NULL if the entity type is
* unknown. Defaults to NULL. * unknown. Defaults to NULL.
* @param string $bundle
* (optional) The bundle of the entity type, or NULL if the bundle is
* unknown. Defaults to NULL.
* *
* @return static * @return static
*/ */

View File

@ -37,6 +37,8 @@ class ConfigSnapshotSubscriber implements EventSubscriberInterface {
/** /**
* Constructs the ConfigSnapshotSubscriber object. * Constructs the ConfigSnapshotSubscriber object.
* *
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
* The configuration manager.
* @param \Drupal\Core\Config\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 \Drupal\Core\Config\StorageInterface $snapshot_storage * @param \Drupal\Core\Config\StorageInterface $snapshot_storage

View File

@ -37,6 +37,8 @@ class SiteSettingsForm extends FormBase {
* *
* @param string $site_path * @param string $site_path
* The site path. * The site path.
* @param \Drupal\Core\Render\RendererInterface $renderer
* The renderer.
*/ */
public function __construct($site_path, RendererInterface $renderer) { public function __construct($site_path, RendererInterface $renderer) {
$this->sitePath = $site_path; $this->sitePath = $site_path;

View File

@ -212,9 +212,13 @@ final class Settings {
* module directories setting apcu_ensure_unique_prefix would allow the sites * module directories setting apcu_ensure_unique_prefix would allow the sites
* to share APCu cache items. * to share APCu cache items.
* *
* @param $identifier * @param string $identifier
* An identifier for the prefix. For example, 'class_loader' or * An identifier for the prefix. For example, 'class_loader' or
* 'cache_backend'. * 'cache_backend'.
* @param string $root
* The app root.
* @param string $site_path
* (optional) The site path. Defaults to an empty string.
* *
* @return string * @return string
* The prefix for APCu user cache keys. * The prefix for APCu user cache keys.

View File

@ -48,6 +48,9 @@ class ItemList extends TypedData implements \IteratorAggregate, ListInterface {
* *
* @param array|null $values * @param array|null $values
* An array of values of the field items, or NULL to unset the field. * An array of values of the field items, or NULL to unset the field.
* @param bool $notify
* (optional) Whether to notify the parent object of the change. Defaults to
* TRUE.
*/ */
public function setValue($values, $notify = TRUE) { public function setValue($values, $notify = TRUE) {
if (!isset($values) || $values === []) { if (!isset($values) || $values === []) {

View File

@ -70,6 +70,10 @@ class Map extends TypedData implements \IteratorAggregate, ComplexDataInterface
* *
* @param array|null $values * @param array|null $values
* An array of property values. * An array of property values.
* @param bool $notify
* (optional) Whether to notify the parent object of the change. Defaults to
* TRUE. If a property is updated from a parent object, set it to FALSE to
* avoid being notified again.
*/ */
public function setValue($values, $notify = TRUE) { public function setValue($values, $notify = TRUE) {
if (isset($values) && !is_array($values)) { if (isset($values) && !is_array($values)) {
@ -214,6 +218,8 @@ class Map extends TypedData implements \IteratorAggregate, ComplexDataInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param $property_name
* The name of the property.
* @param bool $notify * @param bool $notify
* (optional) Whether to forward the notification to the parent. Defaults to * (optional) Whether to forward the notification to the parent. Defaults to
* TRUE. By passing FALSE, overrides of this method can re-use the logic * TRUE. By passing FALSE, overrides of this method can re-use the logic

View File

@ -14,6 +14,10 @@ class ActionAddForm extends ActionFormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param string $action_id * @param string $action_id
* The action ID. * The action ID.
*/ */

View File

@ -48,6 +48,10 @@ class BanAdmin extends FormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* A nested array form elements comprising the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param string $default_ip * @param string $default_ip
* (optional) IP address to be passed on to * (optional) IP address to be passed on to
* \Drupal::formBuilder()->getForm() for use as the default value of the IP * \Drupal::formBuilder()->getForm() for use as the default value of the IP

View File

@ -80,6 +80,10 @@ class BanDelete extends ConfirmFormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* A nested array form elements comprising the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param string $ban_id * @param string $ban_id
* The IP address record ID to unban. * The IP address record ID to unban.
*/ */

View File

@ -70,6 +70,8 @@ class BlockListBuilder extends ConfigEntityListBuilder implements FormInterface
* The theme manager. * The theme manager.
* @param \Drupal\Core\Form\FormBuilderInterface $form_builder * @param \Drupal\Core\Form\FormBuilderInterface $form_builder
* The form builder. * The form builder.
* @param \Drupal\Core\Messenger\MessengerInterface $messenger
* The messenger service.
*/ */
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ThemeManagerInterface $theme_manager, FormBuilderInterface $form_builder, MessengerInterface $messenger) { public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ThemeManagerInterface $theme_manager, FormBuilderInterface $form_builder, MessengerInterface $messenger) {
parent::__construct($entity_type, $storage); parent::__construct($entity_type, $storage);

View File

@ -74,6 +74,8 @@ class CommentForm extends ContentEntityForm {
* The entity type bundle service. * The entity type bundle service.
* @param \Drupal\Component\Datetime\TimeInterface $time * @param \Drupal\Component\Datetime\TimeInterface $time
* The time service. * The time service.
* @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
* The entity field manager service.
*/ */
public function __construct(EntityRepositoryInterface $entity_repository, AccountInterface $current_user, RendererInterface $renderer, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, EntityFieldManagerInterface $entity_field_manager = NULL) { public function __construct(EntityRepositoryInterface $entity_repository, AccountInterface $current_user, RendererInterface $renderer, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, EntityFieldManagerInterface $entity_field_manager = NULL) {
parent::__construct($entity_repository, $entity_type_bundle_info, $time); parent::__construct($entity_repository, $entity_type_bundle_info, $time);

View File

@ -95,6 +95,8 @@ class EntityTypeInfo implements ContainerInjectionInterface {
* Bundle information service. * Bundle information service.
* @param \Drupal\Core\Session\AccountInterface $current_user * @param \Drupal\Core\Session\AccountInterface $current_user
* Current user. * Current user.
* @param \Drupal\content_moderation\StateTransitionValidationInterface $validator
* State transition validator.
*/ */
public function __construct(TranslationInterface $translation, ModerationInformationInterface $moderation_information, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $bundle_info, AccountInterface $current_user, StateTransitionValidationInterface $validator) { public function __construct(TranslationInterface $translation, ModerationInformationInterface $moderation_information, EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $bundle_info, AccountInterface $current_user, StateTransitionValidationInterface $validator) {
$this->stringTranslation = $translation; $this->stringTranslation = $translation;

View File

@ -67,6 +67,8 @@ class ContentModeration extends WorkflowTypeBase implements ContentModerationInt
* The plugin implementation definition. * The plugin implementation definition.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager. * The entity type manager.
* @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
* The entity type bundle info.
* @param \Drupal\content_moderation\ModerationInformationInterface $moderation_info * @param \Drupal\content_moderation\ModerationInformationInterface $moderation_info
* Moderation information service. * Moderation information service.
*/ */

View File

@ -116,6 +116,8 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface, E
* The messenger service. * The messenger service.
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter * @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
* The date formatter service. * The date formatter service.
* @param \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository
* The installed entity definition repository service.
*/ */
public function __construct(EntityTypeInterface $entity_type, LanguageManagerInterface $language_manager, ContentTranslationManagerInterface $manager, EntityTypeManagerInterface $entity_type_manager, AccountInterface $current_user, MessengerInterface $messenger, DateFormatterInterface $date_formatter, EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository) { public function __construct(EntityTypeInterface $entity_type, LanguageManagerInterface $language_manager, ContentTranslationManagerInterface $manager, EntityTypeManagerInterface $entity_type_manager, AccountInterface $current_user, MessengerInterface $messenger, DateFormatterInterface $date_formatter, EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository) {
$this->entityTypeId = $entity_type->id(); $this->entityTypeId = $entity_type->id();
@ -667,6 +669,10 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface, E
* The type of the entity. * The type of the entity.
* @param \Drupal\Core\Entity\EntityInterface $entity * @param \Drupal\Core\Entity\EntityInterface $entity
* The entity whose form is being built. * The entity whose form is being built.
* @param array $form
* A nested array form elements comprising the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* *
* @see \Drupal\content_translation\ContentTranslationHandler::entityFormAlter() * @see \Drupal\content_translation\ContentTranslationHandler::entityFormAlter()
*/ */

View File

@ -93,8 +93,14 @@ class ContentTranslationHandlerTest extends KernelTestBase {
* Whether or not the entity is the default translation. * Whether or not the entity is the default translation.
* @param bool $translation_form * @param bool $translation_form
* Whether or not the form is a translation form. * Whether or not the form is a translation form.
* @param bool $is_submitted
* Whether or not the form should be marked as submitted.
* @param bool $is_rebuilding
* Whether or not the form should be flagged for rebuild.
* @param array $expected * @param array $expected
* The expected altered element. * The expected altered element.
* @param bool $display_warning
* Whether or not the warning message should be displayed.
* *
* @dataProvider providerTestEntityFormSharedElements * @dataProvider providerTestEntityFormSharedElements
* *

View File

@ -57,6 +57,10 @@ class EditorImageDialog extends FormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param \Drupal\editor\Entity\Editor $editor * @param \Drupal\editor\Entity\Editor $editor
* The text editor to which this dialog corresponds. * The text editor to which this dialog corresponds.
*/ */

View File

@ -27,8 +27,14 @@ class EditorLinkDialog extends FormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param \Drupal\editor\Entity\Editor $editor * @param \Drupal\editor\Entity\Editor $editor
* The text editor to which this dialog corresponds. * The text editor to which this dialog corresponds.
*
* @return array
*/ */
public function buildForm(array $form, FormStateInterface $form_state, Editor $editor = NULL) { public function buildForm(array $form, FormStateInterface $form_state, Editor $editor = NULL) {
// The default values are set directly from \Drupal::request()->request, // The default values are set directly from \Drupal::request()->request,

View File

@ -90,6 +90,9 @@ class FieldConfig extends FieldConfigBase implements FieldConfigInterface {
* bundle to which the field is attached to. Other array elements will be * bundle to which the field is attached to. Other array elements will be
* used to set the corresponding properties on the class; see the class * used to set the corresponding properties on the class; see the class
* property documentation for details. * property documentation for details.
* @param string $entity_type
* (optional) The entity type on which the field should be created.
* Defaults to "field_config".
*/ */
public function __construct(array $values, $entity_type = 'field_config') { public function __construct(array $values, $entity_type = 'field_config') {
// Allow either an injected FieldStorageConfig object, or a field_name and // Allow either an injected FieldStorageConfig object, or a field_name and

View File

@ -245,6 +245,9 @@ class FieldStorageConfig extends ConfigEntityBase implements FieldStorageConfigI
* a 'field_name' property can be accepted in place of 'id'. * a 'field_name' property can be accepted in place of 'id'.
* - entity_type: required. * - entity_type: required.
* - type: required. * - type: required.
* @param string $entity_type
* (optional) The entity type on which the field should be created.
* Defaults to "field_storage_config".
*/ */
public function __construct(array $values, $entity_type = 'field_storage_config') { public function __construct(array $values, $entity_type = 'field_storage_config') {
// Check required properties. // Check required properties.

View File

@ -56,6 +56,8 @@ class FieldStorageConfigListBuilder extends ConfigEntityListBuilder {
* The entity type manager. * The entity type manager.
* @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager * @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager
* The 'field type' plugin manager. * The 'field type' plugin manager.
* @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $bundle_info_service
* The bundle info service.
*/ */
public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, FieldTypePluginManagerInterface $field_type_manager, EntityTypeBundleInfoInterface $bundle_info_service) { public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, FieldTypePluginManagerInterface $field_type_manager, EntityTypeBundleInfoInterface $bundle_info_service) {
parent::__construct($entity_type, $entity_type_manager->getStorage($entity_type->id())); parent::__construct($entity_type, $entity_type_manager->getStorage($entity_type->id()));

View File

@ -41,6 +41,10 @@ class FieldStorageConfigEditForm extends EntityForm {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* A nested array form elements comprising the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param string $field_config * @param string $field_config
* The ID of the field config whose field storage config is being edited. * The ID of the field config whose field storage config is being edited.
*/ */

View File

@ -39,6 +39,10 @@ abstract class ImageEffectFormBase extends FormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* A nested array form elements comprising the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param \Drupal\image\ImageStyleInterface $image_style * @param \Drupal\image\ImageStyleInterface $image_style
* The image style. * The image style.
* @param string $image_effect * @param string $image_effect

View File

@ -40,6 +40,8 @@ class ImageStyleTest extends UnitTestCase {
* The image effect ID. * The image effect ID.
* @param \Drupal\image\ImageEffectInterface|\PHPUnit\Framework\MockObject\MockObject $image_effect * @param \Drupal\image\ImageEffectInterface|\PHPUnit\Framework\MockObject\MockObject $image_effect
* The image effect used for testing. * The image effect used for testing.
* @param array $stubs
* An array of additional method names to mock.
* *
* @return \Drupal\image\ImageStyleInterface * @return \Drupal\image\ImageStyleInterface
* The mocked image style. * The mocked image style.

View File

@ -122,6 +122,8 @@ class TemporaryJsonapiFileFieldUploader {
* The lock service. * The lock service.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory. * The config factory.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* (optional) The event dispatcher.
*/ */
public function __construct(LoggerInterface $logger, FileSystemInterface $file_system, $mime_type_guesser, Token $token, LockBackendInterface $lock, ConfigFactoryInterface $config_factory, EventDispatcherInterface $event_dispatcher = NULL) { public function __construct(LoggerInterface $logger, FileSystemInterface $file_system, $mime_type_guesser, Token $token, LockBackendInterface $lock, ConfigFactoryInterface $config_factory, EventDispatcherInterface $event_dispatcher = NULL) {
$this->logger = $logger; $this->logger = $logger;

View File

@ -86,6 +86,9 @@ class ContentLanguageSettings extends ConfigEntityBase implements ContentLanguag
* - target_bundle: The bundle. * - target_bundle: The bundle.
* Other array elements will be used to set the corresponding properties on * Other array elements will be used to set the corresponding properties on
* the class; see the class property documentation for details. * the class; see the class property documentation for details.
* @param string $entity_type
* (optional) The entity type ID that is being created. Defaults to
* "language_content_settings".
*/ */
public function __construct(array $values, $entity_type = 'language_content_settings') { public function __construct(array $values, $entity_type = 'language_content_settings') {
if (empty($values['target_entity_type_id'])) { if (empty($values['target_entity_type_id'])) {

View File

@ -81,6 +81,8 @@ class LanguageNegotiator implements LanguageNegotiatorInterface {
* The configuration factory. * The configuration factory.
* @param \Drupal\Core\Site\Settings $settings * @param \Drupal\Core\Site\Settings $settings
* The settings instance. * The settings instance.
* @param \Symfony\Component\HttpFoundation\RequestStack $requestStack
* The request stack service.
*/ */
public function __construct(ConfigurableLanguageManagerInterface $language_manager, PluginManagerInterface $negotiator_manager, ConfigFactoryInterface $config_factory, Settings $settings, RequestStack $requestStack) { public function __construct(ConfigurableLanguageManagerInterface $language_manager, PluginManagerInterface $negotiator_manager, ConfigFactoryInterface $config_factory, Settings $settings, RequestStack $requestStack) {
$this->languageManager = $language_manager; $this->languageManager = $language_manager;

View File

@ -37,6 +37,8 @@ class LanguageTestController implements ContainerInjectionInterface {
* *
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $httpKernel * @param \Symfony\Component\HttpKernel\HttpKernelInterface $httpKernel
* An HTTP kernel. * An HTTP kernel.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
*/ */
public function __construct(HttpKernelInterface $httpKernel, LanguageManagerInterface $language_manager) { public function __construct(HttpKernelInterface $httpKernel, LanguageManagerInterface $language_manager) {
$this->httpKernel = $httpKernel; $this->httpKernel = $httpKernel;

View File

@ -56,6 +56,8 @@ class LocaleDefaultConfigStorage {
* The storage object to use for reading configuration data. * The storage object to use for reading configuration data.
* @param \Drupal\language\ConfigurableLanguageManagerInterface $language_manager * @param \Drupal\language\ConfigurableLanguageManagerInterface $language_manager
* The language manager. * The language manager.
* @param string $install_profile
* The current installation profile.
*/ */
public function __construct(StorageInterface $config_storage, ConfigurableLanguageManagerInterface $language_manager, $install_profile) { public function __construct(StorageInterface $config_storage, ConfigurableLanguageManagerInterface $language_manager, $install_profile) {
$this->configStorage = $config_storage; $this->configStorage = $config_storage;

View File

@ -77,6 +77,10 @@ class EditorMediaDialog extends FormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* A nested array form elements comprising the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param \Drupal\editor\EditorInterface $editor * @param \Drupal\editor\EditorInterface $editor
* The text editor to which this dialog corresponds. * The text editor to which this dialog corresponds.
*/ */

View File

@ -247,6 +247,8 @@ class MediaUiFunctionalTest extends MediaFunctionalTestBase {
* one that allows the user to create media and a second that does not. * one that allows the user to create media and a second that does not.
* @param bool $list_access * @param bool $list_access
* Whether to grant the test user access to list media. * Whether to grant the test user access to list media.
* @param string $widget_id
* The widget ID to test.
* *
* @see media_field_widget_entity_reference_autocomplete_form_alter() * @see media_field_widget_entity_reference_autocomplete_form_alter()
* @see media_field_widget_multiple_entity_reference_autocomplete_form_alter() * @see media_field_widget_multiple_entity_reference_autocomplete_form_alter()

View File

@ -55,6 +55,10 @@ class MenuLinkEditForm extends FormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param \Drupal\Core\Menu\MenuLinkInterface $menu_link_plugin * @param \Drupal\Core\Menu\MenuLinkInterface $menu_link_plugin
* The plugin instance to use for this form. * The plugin instance to use for this form.
*/ */

View File

@ -12,12 +12,14 @@ class BadPluginDefinitionException extends InvalidPluginDefinitionException {
/** /**
* Constructs a BadPluginDefinitionException. * Constructs a BadPluginDefinitionException.
* *
* For the remaining parameters see \Exception.
*
* @param string $plugin_id * @param string $plugin_id
* The plugin ID of the mapper. * The plugin ID of the mapper.
* @param string $property * @param string $property
* The name of the property that is missing from the plugin. * The name of the property that is missing from the plugin.
* @param int $code
* (optional) The exception code. Defaults to 0.
* @param \Exception|null $previous
* The previous throwable used for exception chaining.
* *
* @see \Exception * @see \Exception
*/ */

View File

@ -74,6 +74,8 @@ class MigrateSourceTest extends MigrateTestCase {
* @param int $status * @param int $status
* (optional) The default status for the new rows to be imported. Defaults * (optional) The default status for the new rows to be imported. Defaults
* to MigrateIdMapInterface::STATUS_NEEDS_UPDATE. * to MigrateIdMapInterface::STATUS_NEEDS_UPDATE.
* @param int $high_water_value
* (optional) The high water mark to start from, if set.
* *
* @return \Drupal\migrate\Plugin\MigrateSourceInterface * @return \Drupal\migrate\Plugin\MigrateSourceInterface
* A mocked source plugin. * A mocked source plugin.

View File

@ -43,6 +43,11 @@ class MigrateNodeTypeTest extends MigrateDrupal7TestBase {
* The expected node type description. * The expected node type description.
* @param string $help * @param string $help
* The expected help text. * The expected help text.
* @param bool $display_submitted
* @param bool $new_revision
* @param array $expected_available_menus
* @param string $expected_parent
* @param string|null $body_label
*/ */
protected function assertEntity($id, $label, $description, $help, $display_submitted, $new_revision, $expected_available_menus, $expected_parent, $body_label = NULL) { protected function assertEntity($id, $label, $description, $help, $display_submitted, $new_revision, $expected_available_menus, $expected_parent, $body_label = NULL) {
/** @var \Drupal\node\NodeTypeInterface $entity */ /** @var \Drupal\node\NodeTypeInterface $entity */

View File

@ -156,7 +156,10 @@ JS;
* Asserts the state of the Quick Edit entity toolbar. * Asserts the state of the Quick Edit entity toolbar.
* *
* @param string $expected_entity_label * @param string $expected_entity_label
* The expected label in the Quick Edit Entity Toolbar. * The expected entity label in the Quick Edit Entity Toolbar.
* @param string|null $expected_field_label
* The expected field label in the Quick Edit Entity Toolbar, or NULL
* if no field label is expected.
*/ */
protected function assertQuickEditEntityToolbar($expected_entity_label, $expected_field_label) { protected function assertQuickEditEntityToolbar($expected_entity_label, $expected_field_label) {
$quickedit_entity_toolbar = $this->getSession()->getPage()->findById('quickedit-entity-toolbar'); $quickedit_entity_toolbar = $this->getSession()->getPage()->findById('quickedit-entity-toolbar');

View File

@ -249,10 +249,11 @@ class CommentAttributesTest extends CommentTestBase {
* *
* Tests the current page for basic comment RDFa markup. * Tests the current page for basic comment RDFa markup.
* *
* @param $comment * @param \Drupal\comment\CommentInterface $comment
* Comment object. * Comment object.
* @param $account * @param array|null $account
* An array containing information about an anonymous user. * (optional) An array containing information about an anonymous user.
* Defaults to NULL.
*/ */
public function _testBasicCommentRdfaMarkup(CommentInterface $comment, $account = NULL) { public function _testBasicCommentRdfaMarkup(CommentInterface $comment, $account = NULL) {
$this->drupalGet($this->node->toUrl()); $this->drupalGet($this->node->toUrl());

View File

@ -143,6 +143,8 @@ abstract class ResourceTestBase extends BrowserTestBase {
* The allowed formats for this resource. * The allowed formats for this resource.
* @param string[] $authentication * @param string[] $authentication
* The allowed authentication providers for this resource. * The allowed authentication providers for this resource.
* @param string[] $methods
* The allowed methods for this resource.
*/ */
protected function provisionResource($formats = [], $authentication = [], array $methods = ['GET', 'POST', 'PATCH', 'DELETE']) { protected function provisionResource($formats = [], $authentication = [], array $methods = ['GET', 'POST', 'PATCH', 'DELETE']) {
$this->resourceConfigStorage->create([ $this->resourceConfigStorage->create([

View File

@ -18,8 +18,11 @@ class SerializationTestNormalizer implements NormalizerInterface {
* *
* @param object $object * @param object $object
* Object to normalize. * Object to normalize.
* @param string $format * @param string|null $format
* Format the normalization result will be encoded as. * (optional) Format the normalization result will be encoded as. Defaults
* to NULL
* @param array $context
* (optional) The context data. Defaults to an empty array.
* *
* @return array * @return array
* An array containing a normalized representation of $object, appropriate * An array containing a normalized representation of $object, appropriate

View File

@ -39,6 +39,8 @@ class NodeStatisticsDatabaseStorage implements StatisticsStorageInterface {
* The database connection for the node view storage. * The database connection for the node view storage.
* @param \Drupal\Core\State\StateInterface $state * @param \Drupal\Core\State\StateInterface $state
* The state service. * The state service.
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* The request stack.
*/ */
public function __construct(Connection $connection, StateInterface $state, RequestStack $request_stack) { public function __construct(Connection $connection, StateInterface $state, RequestStack $request_stack) {
$this->connection = $connection; $this->connection = $connection;

View File

@ -64,6 +64,8 @@ class StatisticsPopularBlock extends BlockBase implements ContainerFactoryPlugin
* The entity repository service * The entity repository service
* @param \Drupal\statistics\StatisticsStorageInterface $statistics_storage * @param \Drupal\statistics\StatisticsStorageInterface $statistics_storage
* The storage for statistics. * The storage for statistics.
* @param \Drupal\Core\Render\RendererInterface $renderer
* The renderer configuration array.
*/ */
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityRepositoryInterface $entity_repository, StatisticsStorageInterface $statistics_storage, RendererInterface $renderer) { public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityRepositoryInterface $entity_repository, StatisticsStorageInterface $statistics_storage, RendererInterface $renderer) {
parent::__construct($configuration, $plugin_id, $plugin_definition); parent::__construct($configuration, $plugin_id, $plugin_definition);

View File

@ -510,6 +510,10 @@ class DbUpdateController extends ControllerBase {
/** /**
* Renders a list of requirement errors or warnings. * Renders a list of requirement errors or warnings.
* *
* @param $severity
* The severity of the message, as per RFC 3164.
* @param array $requirements
* The array of requirement values.
* @param \Symfony\Component\HttpFoundation\Request $request * @param \Symfony\Component\HttpFoundation\Request $request
* The current request. * The current request.
* *

View File

@ -123,6 +123,10 @@ class ThemeSettingsForm extends ConfigFormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
* *
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param string $theme * @param string $theme
* The theme name. * The theme name.
*/ */

View File

@ -25,6 +25,8 @@ class MonkeysInTheControlRoom implements HttpKernelInterface {
* *
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $app * @param \Symfony\Component\HttpKernel\HttpKernelInterface $app
* The wrapper HTTP kernel. * The wrapper HTTP kernel.
* @param \Drupal\Core\Site\Settings $settings
* The settings object.
*/ */
public function __construct(HttpKernelInterface $app, Settings $settings) { public function __construct(HttpKernelInterface $app, Settings $settings) {
$this->app = $app; $this->app = $app;

View File

@ -204,6 +204,7 @@ class UrlTest extends BrowserTestBase {
/** /**
* Checks for class existence in link. * Checks for class existence in link.
* *
* @param $attribute
* @param $link * @param $link
* URL to search. * URL to search.
* @param $class * @param $class

View File

@ -196,13 +196,16 @@ class ElementsTableSelectTest extends BrowserTestBase {
/** /**
* Helper function for the option check test to submit a form while collecting errors. * Helper function for the option check test to submit a form while collecting errors.
* *
* @param $form_element * @param array $form
* A form element to test. * Nested array of form elements that comprise the form.
* @param $edit * @param array $edit
* An array containing post data. * An array containing post data.
* *
* @return * @return array
* An array containing the processed form, the form_state and any errors. * An array containing the processed form, the form_state and any errors.
*
* @internal param $form_element A form element to test.
* A form element to test.
*/ */
private function formSubmitHelper($form, $edit) { private function formSubmitHelper($form, $edit) {
$form_id = $this->randomMachineName(); $form_id = $this->randomMachineName();

View File

@ -926,6 +926,9 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend
* *
* @param $order * @param $order
* The order selected in the UI. * The order selected in the UI.
* @param string|null $by
* (optional) This parameter sets the direction for which to order.
* Defaults to NULL.
*/ */
public function summarySort($order, $by = NULL) { public function summarySort($order, $by = NULL) {
$this->query->addOrderBy(NULL, NULL, $order, (!empty($by) ? $by : $this->name_alias)); $this->query->addOrderBy(NULL, NULL, $order, (!empty($by) ? $by : $this->name_alias));

View File

@ -18,6 +18,12 @@ class EntityReverse extends RelationshipPluginBase {
/** /**
* Constructs an EntityReverse object. * Constructs an EntityReverse object.
* *
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param array $plugin_definition
* The plugin implementation definition.
* @param \Drupal\views\Plugin\ViewsHandlerManager $join_manager * @param \Drupal\views\Plugin\ViewsHandlerManager $join_manager
* The views plugin join manager. * The views plugin join manager.
*/ */

View File

@ -391,7 +391,9 @@ class ViewEditForm extends ViewFormBase {
/** /**
* Helper function to get the display details section of the edit UI. * Helper function to get the display details section of the edit UI.
* *
* @param $display * @param \Drupal\views_ui\ViewUI $view
* The ViewUI entity.
* @param array $display
* *
* @return array * @return array
* A renderable page build array. * A renderable page build array.

View File

@ -81,8 +81,11 @@ abstract class ViewFormBase extends EntityForm {
* having them as secondary local tasks isn't desired. The caller is responsible * having them as secondary local tasks isn't desired. The caller is responsible
* for setting the active tab's #active property to TRUE. * for setting the active tab's #active property to TRUE.
* *
* @param $display_id * @param \Drupal\views_ui\ViewUI $view
* The display_id which is edited on the current request. * The ViewUI entity.
*
* @return array
* An array of tab definitions.
*/ */
public function getDisplayTabs(ViewUI $view) { public function getDisplayTabs(ViewUI $view) {
$executable = $view->getExecutable(); $executable = $view->getExecutable();

View File

@ -51,6 +51,8 @@ class WorkspaceListBuilder extends EntityListBuilder {
* The entity storage class. * The entity storage class.
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager * @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
* The workspace manager service. * The workspace manager service.
* @param \Drupal\workspaces\WorkspaceRepositoryInterface $workspace_repository
* The workspace repository service.
* @param \Drupal\Core\Render\RendererInterface $renderer * @param \Drupal\Core\Render\RendererInterface $renderer
* The renderer service. * The renderer service.
*/ */

View File

@ -62,6 +62,8 @@ class WorkspacePublisher implements WorkspacePublisherInterface {
* The workspace manager. * The workspace manager.
* @param \Drupal\workspaces\WorkspaceAssociationInterface $workspace_association * @param \Drupal\workspaces\WorkspaceAssociationInterface $workspace_association
* The workspace association service. * The workspace association service.
* @param \Drupal\workspaces\WorkspaceInterface $source
* The source workspace entity.
*/ */
public function __construct(EntityTypeManagerInterface $entity_type_manager, Connection $database, WorkspaceManagerInterface $workspace_manager, WorkspaceAssociationInterface $workspace_association, WorkspaceInterface $source) { public function __construct(EntityTypeManagerInterface $entity_type_manager, Connection $database, WorkspaceManagerInterface $workspace_manager, WorkspaceAssociationInterface $workspace_association, WorkspaceInterface $source) {
$this->entityTypeManager = $entity_type_manager; $this->entityTypeManager = $entity_type_manager;

View File

@ -70,7 +70,6 @@
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/> <exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/> <exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/>
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/> <exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
<exclude name="Drupal.Commenting.FunctionComment.ParamMissingDefinition"/>
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/> <exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
</rule> </rule>
<rule ref="Drupal.Commenting.HookComment"/> <rule ref="Drupal.Commenting.HookComment"/>

View File

@ -427,6 +427,8 @@ class InstallHelper implements ContainerInjectionInterface {
* *
* @param array $data * @param array $data
* Data of line that was read from the file. * Data of line that was read from the file.
* @param string $langcode
* Current language code.
* *
* @return array * @return array
* Data structured as a recipe node. * Data structured as a recipe node.

View File

@ -265,7 +265,7 @@ class UncaughtExceptionTest extends BrowserTestBase {
$this->assertStringContainsString('Failed to log error', $errors[0], 'The error handling logs when an error could not be logged to the logger.'); $this->assertStringContainsString('Failed to log error', $errors[0], 'The error handling logs when an error could not be logged to the logger.');
$expected_path = \Drupal::root() . '/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php'; $expected_path = \Drupal::root() . '/core/modules/system/tests/modules/error_service_test/src/MonkeysInTheControlRoom.php';
$expected_line = 59; $expected_line = 61;
$expected_entry = "Failed to log error: Exception: Deforestation in Drupal\\error_service_test\\MonkeysInTheControlRoom->handle() (line ${expected_line} of ${expected_path})"; $expected_entry = "Failed to log error: Exception: Deforestation in Drupal\\error_service_test\\MonkeysInTheControlRoom->handle() (line ${expected_line} of ${expected_path})";
$this->assertStringContainsString($expected_entry, $errors[0], 'Original error logged to the PHP error log when an exception is thrown by a logger'); $this->assertStringContainsString($expected_entry, $errors[0], 'Original error logged to the PHP error log when an exception is thrown by a logger');

View File

@ -135,6 +135,8 @@ class DefaultConfigTest extends KernelTestBase {
* *
* @param \Drupal\Core\Config\StorageInterface $default_config_storage * @param \Drupal\Core\Config\StorageInterface $default_config_storage
* The default config storage to test. * The default config storage to test.
* @param string $module
* The module that is being tested.
*/ */
protected function doTestsOnConfigStorage(StorageInterface $default_config_storage, $module) { protected function doTestsOnConfigStorage(StorageInterface $default_config_storage, $module) {
/** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */ /** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */

View File

@ -1011,6 +1011,8 @@ class SchemaTest extends KernelTestBase {
* The beginning field specification. * The beginning field specification.
* @param $new_spec * @param $new_spec
* The ending field specification. * The ending field specification.
* @param $test_data
* (optional) A test value to insert and test, if specified.
*/ */
protected function assertFieldChange($old_spec, $new_spec, $test_data = NULL) { protected function assertFieldChange($old_spec, $new_spec, $test_data = NULL) {
$table_name = 'test_table_' . ($this->counter++); $table_name = 'test_table_' . ($this->counter++);

View File

@ -118,6 +118,8 @@ abstract class EntityLanguageTestBase extends EntityKernelTestBase {
* *
* @param string $entity_type * @param string $entity_type
* The type of the entity fields are attached to. * The type of the entity fields are attached to.
* @param string $bundle
* The bundle of the entity.
*/ */
protected function toggleFieldTranslatability($entity_type, $bundle) { protected function toggleFieldTranslatability($entity_type, $bundle) {
$fields = [$this->fieldName, $this->untranslatableFieldName]; $fields = [$this->fieldName, $this->untranslatableFieldName];

View File

@ -582,6 +582,7 @@ class EntityQueryAggregateTest extends EntityKernelTestBase {
* *
* @param array $expected * @param array $expected
* An array of the expected results. * An array of the expected results.
* @param bool $sorted
*/ */
protected function assertResults($expected, $sorted = FALSE) { protected function assertResults($expected, $sorted = FALSE) {
$found = TRUE; $found = TRUE;

View File

@ -187,8 +187,7 @@ class DateTimePlusTest extends TestCase {
* *
* @param \Drupal\Component\Datetime\DateTimePlus $date * @param \Drupal\Component\Datetime\DateTimePlus $date
* DateTimePlus to test. * DateTimePlus to test.
* * @param string $input
* @input mixed $input
* The original input passed to the test method. * The original input passed to the test method.
* @param array $initial * @param array $initial
* @see testTimestamp() * @see testTimestamp()
@ -231,6 +230,7 @@ class DateTimePlusTest extends TestCase {
* Input argument for DateTimePlus. * Input argument for DateTimePlus.
* @param string $timezone * @param string $timezone
* Timezone argument for DateTimePlus. * Timezone argument for DateTimePlus.
* @param string $format
* @param string $format_date * @param string $format_date
* Format argument for DateTimePlus::format(). * Format argument for DateTimePlus::format().
* @param string $expected * @param string $expected

View File

@ -312,8 +312,12 @@ EOS;
/** /**
* Constructs the expected class output. * Constructs the expected class output.
* *
* @param string $class
* The class name that is being built.
* @param string $expected_methods_body * @param string $expected_methods_body
* The expected body of decorated methods. * The expected body of decorated methods.
* @param string $interface_string
* (optional) The expected "implements" clause of the class definition.
* *
* @return string * @return string
* The code of the entire proxy. * The code of the entire proxy.

View File

@ -578,6 +578,9 @@ class DefaultTableMappingTest extends UnitTestCase {
* The field name. * The field name.
* @param array $column_names * @param array $column_names
* An array of column names for the storage definition. * An array of column names for the storage definition.
* @param bool $base_field
* Flag indicating whether the field should be treated as a base or bundle
* field.
* *
* @return \Drupal\Core\Field\FieldStorageDefinitionInterface|\PHPUnit\Framework\MockObject\MockObject * @return \Drupal\Core\Field\FieldStorageDefinitionInterface|\PHPUnit\Framework\MockObject\MockObject
*/ */

View File

@ -62,8 +62,12 @@ EOS;
/** /**
* Constructs the expected class output. * Constructs the expected class output.
* *
* @param string $class
* The class name that is being built.
* @param string $expected_methods_body * @param string $expected_methods_body
* The expected body of decorated methods. * The expected body of decorated methods.
* @param string $interface_string
* (optional) The expected "implements" clause of the class definition.
* *
* @return string * @return string
* The code of the entire proxy. * The code of the entire proxy.

View File

@ -265,6 +265,9 @@ class PlaceholdersTest implements TrustedCallbackInterface {
* *
* @param string $animal * @param string $animal
* An animal. * An animal.
* @param bool $use_animal_as_array_key
* TRUE if the $animal parameter should be used as an array key, FALSE
* if it should be used as a plain string.
* *
* @return array * @return array
* A renderable array. * A renderable array.

View File

@ -188,6 +188,7 @@ class RecursiveContextualValidatorTest extends UnitTestCase {
* *
* @param array $tree * @param array $tree
* An array of value, constraints and properties. * An array of value, constraints and properties.
* @param string $name
* *
* @return \Drupal\Core\TypedData\TypedDataInterface|\PHPUnit\Framework\MockObject\MockObject * @return \Drupal\Core\TypedData\TypedDataInterface|\PHPUnit\Framework\MockObject\MockObject
*/ */