Issue #2903911 by joshmiller, longwave, anmolgoyal74, ankithashetty, init90, Pooja Ganjage, _gradient_, daffie, borisson_: Fix 'Drupal.Commenting.FunctionComment.ParamMissingDefinition' coding standard
parent
4ae7ef9031
commit
08766c5dee
|
@ -17,10 +17,14 @@ class InvalidPluginDefinitionException extends PluginException {
|
|||
/**
|
||||
* Constructs an InvalidPluginDefinitionException.
|
||||
*
|
||||
* For the remaining parameters see \Exception.
|
||||
*
|
||||
* @param string $plugin_id
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -10,10 +10,14 @@ class PluginNotFoundException extends PluginException {
|
|||
/**
|
||||
* Construct a PluginNotFoundException exception.
|
||||
*
|
||||
* For the remaining parameters see \Exception.
|
||||
*
|
||||
* @param string $plugin_id
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -452,10 +452,12 @@ class LibraryDiscoveryParser {
|
|||
* The containing library definition.
|
||||
* @param array $sub_key
|
||||
* 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
|
||||
* Specifies the overrides, this is an array where the key is the asset to
|
||||
* 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) {
|
||||
foreach ($overrides as $original => $replacement) {
|
||||
|
|
|
@ -64,6 +64,8 @@ class UnmetDependenciesException extends ConfigException {
|
|||
*
|
||||
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
|
||||
* The string translation service.
|
||||
* @param string $extension
|
||||
* The name of the extension that is being installed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
@ -103,13 +103,16 @@ class Schema extends DatabaseSchema {
|
|||
* We introspect the database to collect the information required by insert
|
||||
* and update queries.
|
||||
*
|
||||
* @param $table_name
|
||||
* @param string $table
|
||||
* The non-prefixed name of the table.
|
||||
*
|
||||
* @return
|
||||
* @return mixed|object
|
||||
* An object with two member variables:
|
||||
* - 'blob_fields' that lists all the blob fields in the table.
|
||||
* - 'sequences' that lists the sequences used in that table.
|
||||
* - 'blob_fields' that lists all the blob fields in the 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) {
|
||||
// Generate a key to reference this table's information on.
|
||||
|
@ -233,6 +236,9 @@ EOD;
|
|||
*
|
||||
* @return array
|
||||
* 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') {
|
||||
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.
|
||||
*
|
||||
* @param $name
|
||||
* @param string $name
|
||||
* The name of the table to create.
|
||||
* @param $table
|
||||
* @param array $table
|
||||
* A Schema API table definition array.
|
||||
*
|
||||
* @return
|
||||
* @return array
|
||||
* An array of SQL statements to create the table.
|
||||
*/
|
||||
protected function createTableSql($name, $table) {
|
||||
|
|
|
@ -72,13 +72,13 @@ abstract class Schema implements PlaceholderInterface {
|
|||
/**
|
||||
* 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
|
||||
* default key for prefix.
|
||||
* @param $add_prefix
|
||||
* @param bool $add_prefix
|
||||
* 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.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param $table
|
||||
* @param string $table
|
||||
* The name of the table in drupal (no prefixing).
|
||||
* @param $column
|
||||
* @param string $column
|
||||
* The name of the column.
|
||||
*
|
||||
* @return
|
||||
|
|
|
@ -77,8 +77,6 @@ interface EntityFormInterface extends BaseFormIdInterface {
|
|||
* the submitted form values are copied to entity properties. The form's
|
||||
* entity remains unchanged.
|
||||
*
|
||||
* @see \Drupal\Core\Entity\EntityFormInterface::getEntity()
|
||||
*
|
||||
* @param array $form
|
||||
* A nested array form elements comprising the form.
|
||||
* @param \Drupal\Core\Form\FormStateInterface $form_state
|
||||
|
@ -86,6 +84,8 @@ interface EntityFormInterface extends BaseFormIdInterface {
|
|||
*
|
||||
* @return \Drupal\Core\Entity\EntityInterface
|
||||
* An updated copy of the form's entity object.
|
||||
*
|
||||
* @see \Drupal\Core\Entity\EntityFormInterface::getEntity()
|
||||
*/
|
||||
public function buildEntity(array $form, FormStateInterface $form_state);
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ class EntityDeriver implements ContainerDeriverInterface {
|
|||
* The base plugin ID.
|
||||
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $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) {
|
||||
$this->basePluginId = $base_plugin_id;
|
||||
|
|
|
@ -34,10 +34,11 @@ interface ConditionAggregateInterface extends \Countable {
|
|||
/**
|
||||
* Queries for the existence of a field.
|
||||
*
|
||||
* @param $field
|
||||
* @param string $field
|
||||
* @param string $function
|
||||
* @param string $langcode
|
||||
*
|
||||
* @return ConditionInterface
|
||||
* @return \Drupal\Core\Entity\Query\ConditionInterface
|
||||
*
|
||||
* @see \Drupal\Core\Entity\Query\QueryInterface::exists()
|
||||
*/
|
||||
|
@ -47,8 +48,10 @@ interface ConditionAggregateInterface extends \Countable {
|
|||
* Queries for the nonexistence of a 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()
|
||||
*/
|
||||
|
|
|
@ -54,6 +54,8 @@ interface ConditionInterface {
|
|||
*
|
||||
* @param string $field
|
||||
* @param string $langcode
|
||||
* (optional) For which language the entity should be prepared, defaults to
|
||||
* the current content language.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
|
|
|
@ -369,14 +369,32 @@ class Tables implements TablesInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Join field table if necessary.
|
||||
* Ensure the field table is joined if necessary.
|
||||
*
|
||||
* @param $field_name
|
||||
* Name of the field.
|
||||
* @param string $index_prefix
|
||||
* 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
|
||||
*
|
||||
* @throws \Drupal\Core\Entity\Query\QueryException
|
||||
* The alias of the joined table.
|
||||
*/
|
||||
protected function ensureFieldTable($index_prefix, &$field, $type, $langcode, $base_table, $entity_id_field, $field_id_field, $delta) {
|
||||
$field_name = $field->getName();
|
||||
|
@ -435,6 +453,7 @@ class Tables implements TablesInterface {
|
|||
*
|
||||
* @param string $table
|
||||
* The table name.
|
||||
* @param string $entity_type_id
|
||||
*
|
||||
* @return array|false
|
||||
* An associative array of table field mapping for the given table, keyed by
|
||||
|
|
|
@ -15,6 +15,9 @@ class EntityDataDefinition extends ComplexDataDefinitionBase implements EntityDa
|
|||
* @param string $entity_type_id
|
||||
* (optional) The ID of the entity type, or NULL if the entity type is
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -37,6 +37,8 @@ class ConfigSnapshotSubscriber implements EventSubscriberInterface {
|
|||
/**
|
||||
* Constructs the ConfigSnapshotSubscriber object.
|
||||
*
|
||||
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
|
||||
* The configuration manager.
|
||||
* @param \Drupal\Core\Config\StorageInterface $source_storage
|
||||
* The source storage used to discover configuration changes.
|
||||
* @param \Drupal\Core\Config\StorageInterface $snapshot_storage
|
||||
|
|
|
@ -37,6 +37,8 @@ class SiteSettingsForm extends FormBase {
|
|||
*
|
||||
* @param string $site_path
|
||||
* The site path.
|
||||
* @param \Drupal\Core\Render\RendererInterface $renderer
|
||||
* The renderer.
|
||||
*/
|
||||
public function __construct($site_path, RendererInterface $renderer) {
|
||||
$this->sitePath = $site_path;
|
||||
|
|
|
@ -212,9 +212,13 @@ final class Settings {
|
|||
* module directories setting apcu_ensure_unique_prefix would allow the sites
|
||||
* to share APCu cache items.
|
||||
*
|
||||
* @param $identifier
|
||||
* @param string $identifier
|
||||
* An identifier for the prefix. For example, 'class_loader' or
|
||||
* 'cache_backend'.
|
||||
* @param string $root
|
||||
* The app root.
|
||||
* @param string $site_path
|
||||
* (optional) The site path. Defaults to an empty string.
|
||||
*
|
||||
* @return string
|
||||
* The prefix for APCu user cache keys.
|
||||
|
|
|
@ -48,6 +48,9 @@ class ItemList extends TypedData implements \IteratorAggregate, ListInterface {
|
|||
*
|
||||
* @param array|null $values
|
||||
* 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) {
|
||||
if (!isset($values) || $values === []) {
|
||||
|
|
|
@ -70,6 +70,10 @@ class Map extends TypedData implements \IteratorAggregate, ComplexDataInterface
|
|||
*
|
||||
* @param array|null $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) {
|
||||
if (isset($values) && !is_array($values)) {
|
||||
|
@ -214,6 +218,8 @@ class Map extends TypedData implements \IteratorAggregate, ComplexDataInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @param $property_name
|
||||
* The name of the property.
|
||||
* @param bool $notify
|
||||
* (optional) Whether to forward the notification to the parent. Defaults to
|
||||
* TRUE. By passing FALSE, overrides of this method can re-use the logic
|
||||
|
|
|
@ -14,6 +14,10 @@ class ActionAddForm extends ActionFormBase {
|
|||
/**
|
||||
* {@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
|
||||
* The action ID.
|
||||
*/
|
||||
|
|
|
@ -48,6 +48,10 @@ class BanAdmin extends FormBase {
|
|||
/**
|
||||
* {@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
|
||||
* (optional) IP address to be passed on to
|
||||
* \Drupal::formBuilder()->getForm() for use as the default value of the IP
|
||||
|
|
|
@ -80,6 +80,10 @@ class BanDelete extends ConfirmFormBase {
|
|||
/**
|
||||
* {@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
|
||||
* The IP address record ID to unban.
|
||||
*/
|
||||
|
|
|
@ -70,6 +70,8 @@ class BlockListBuilder extends ConfigEntityListBuilder implements FormInterface
|
|||
* The theme manager.
|
||||
* @param \Drupal\Core\Form\FormBuilderInterface $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) {
|
||||
parent::__construct($entity_type, $storage);
|
||||
|
|
|
@ -74,6 +74,8 @@ class CommentForm extends ContentEntityForm {
|
|||
* The entity type bundle service.
|
||||
* @param \Drupal\Component\Datetime\TimeInterface $time
|
||||
* 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) {
|
||||
parent::__construct($entity_repository, $entity_type_bundle_info, $time);
|
||||
|
|
|
@ -95,6 +95,8 @@ class EntityTypeInfo implements ContainerInjectionInterface {
|
|||
* Bundle information service.
|
||||
* @param \Drupal\Core\Session\AccountInterface $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) {
|
||||
$this->stringTranslation = $translation;
|
||||
|
|
|
@ -67,6 +67,8 @@ class ContentModeration extends WorkflowTypeBase implements ContentModerationInt
|
|||
* The plugin implementation definition.
|
||||
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $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
|
||||
* Moderation information service.
|
||||
*/
|
||||
|
|
|
@ -116,6 +116,8 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface, E
|
|||
* The messenger service.
|
||||
* @param \Drupal\Core\Datetime\DateFormatterInterface $date_formatter
|
||||
* 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) {
|
||||
$this->entityTypeId = $entity_type->id();
|
||||
|
@ -667,6 +669,10 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface, E
|
|||
* The type of the entity.
|
||||
* @param \Drupal\Core\Entity\EntityInterface $entity
|
||||
* 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()
|
||||
*/
|
||||
|
|
|
@ -93,8 +93,14 @@ class ContentTranslationHandlerTest extends KernelTestBase {
|
|||
* Whether or not the entity is the default translation.
|
||||
* @param bool $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
|
||||
* The expected altered element.
|
||||
* @param bool $display_warning
|
||||
* Whether or not the warning message should be displayed.
|
||||
*
|
||||
* @dataProvider providerTestEntityFormSharedElements
|
||||
*
|
||||
|
|
|
@ -57,6 +57,10 @@ class EditorImageDialog extends FormBase {
|
|||
/**
|
||||
* {@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
|
||||
* The text editor to which this dialog corresponds.
|
||||
*/
|
||||
|
|
|
@ -27,8 +27,14 @@ class EditorLinkDialog extends FormBase {
|
|||
/**
|
||||
* {@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
|
||||
* The text editor to which this dialog corresponds.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function buildForm(array $form, FormStateInterface $form_state, Editor $editor = NULL) {
|
||||
// The default values are set directly from \Drupal::request()->request,
|
||||
|
|
|
@ -90,6 +90,9 @@ class FieldConfig extends FieldConfigBase implements FieldConfigInterface {
|
|||
* 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
|
||||
* 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') {
|
||||
// Allow either an injected FieldStorageConfig object, or a field_name and
|
||||
|
|
|
@ -245,6 +245,9 @@ class FieldStorageConfig extends ConfigEntityBase implements FieldStorageConfigI
|
|||
* a 'field_name' property can be accepted in place of 'id'.
|
||||
* - entity_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') {
|
||||
// Check required properties.
|
||||
|
|
|
@ -56,6 +56,8 @@ class FieldStorageConfigListBuilder extends ConfigEntityListBuilder {
|
|||
* The entity type manager.
|
||||
* @param \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_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) {
|
||||
parent::__construct($entity_type, $entity_type_manager->getStorage($entity_type->id()));
|
||||
|
|
|
@ -41,6 +41,10 @@ class FieldStorageConfigEditForm extends EntityForm {
|
|||
/**
|
||||
* {@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
|
||||
* The ID of the field config whose field storage config is being edited.
|
||||
*/
|
||||
|
|
|
@ -39,6 +39,10 @@ abstract class ImageEffectFormBase extends FormBase {
|
|||
/**
|
||||
* {@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
|
||||
* The image style.
|
||||
* @param string $image_effect
|
||||
|
|
|
@ -40,6 +40,8 @@ class ImageStyleTest extends UnitTestCase {
|
|||
* The image effect ID.
|
||||
* @param \Drupal\image\ImageEffectInterface|\PHPUnit\Framework\MockObject\MockObject $image_effect
|
||||
* The image effect used for testing.
|
||||
* @param array $stubs
|
||||
* An array of additional method names to mock.
|
||||
*
|
||||
* @return \Drupal\image\ImageStyleInterface
|
||||
* The mocked image style.
|
||||
|
|
|
@ -122,6 +122,8 @@ class TemporaryJsonapiFileFieldUploader {
|
|||
* The lock service.
|
||||
* @param \Drupal\Core\Config\ConfigFactoryInterface $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) {
|
||||
$this->logger = $logger;
|
||||
|
|
|
@ -86,6 +86,9 @@ class ContentLanguageSettings extends ConfigEntityBase implements ContentLanguag
|
|||
* - target_bundle: The bundle.
|
||||
* Other array elements will be used to set the corresponding properties on
|
||||
* 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') {
|
||||
if (empty($values['target_entity_type_id'])) {
|
||||
|
|
|
@ -81,6 +81,8 @@ class LanguageNegotiator implements LanguageNegotiatorInterface {
|
|||
* The configuration factory.
|
||||
* @param \Drupal\Core\Site\Settings $settings
|
||||
* 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) {
|
||||
$this->languageManager = $language_manager;
|
||||
|
|
|
@ -37,6 +37,8 @@ class LanguageTestController implements ContainerInjectionInterface {
|
|||
*
|
||||
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $httpKernel
|
||||
* An HTTP kernel.
|
||||
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
|
||||
* The language manager.
|
||||
*/
|
||||
public function __construct(HttpKernelInterface $httpKernel, LanguageManagerInterface $language_manager) {
|
||||
$this->httpKernel = $httpKernel;
|
||||
|
|
|
@ -56,6 +56,8 @@ class LocaleDefaultConfigStorage {
|
|||
* The storage object to use for reading configuration data.
|
||||
* @param \Drupal\language\ConfigurableLanguageManagerInterface $language_manager
|
||||
* The language manager.
|
||||
* @param string $install_profile
|
||||
* The current installation profile.
|
||||
*/
|
||||
public function __construct(StorageInterface $config_storage, ConfigurableLanguageManagerInterface $language_manager, $install_profile) {
|
||||
$this->configStorage = $config_storage;
|
||||
|
|
|
@ -77,6 +77,10 @@ class EditorMediaDialog extends FormBase {
|
|||
/**
|
||||
* {@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
|
||||
* The text editor to which this dialog corresponds.
|
||||
*/
|
||||
|
|
|
@ -247,6 +247,8 @@ class MediaUiFunctionalTest extends MediaFunctionalTestBase {
|
|||
* one that allows the user to create media and a second that does not.
|
||||
* @param bool $list_access
|
||||
* 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_multiple_entity_reference_autocomplete_form_alter()
|
||||
|
|
|
@ -55,6 +55,10 @@ class MenuLinkEditForm extends FormBase {
|
|||
/**
|
||||
* {@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
|
||||
* The plugin instance to use for this form.
|
||||
*/
|
||||
|
|
|
@ -12,12 +12,14 @@ class BadPluginDefinitionException extends InvalidPluginDefinitionException {
|
|||
/**
|
||||
* Constructs a BadPluginDefinitionException.
|
||||
*
|
||||
* For the remaining parameters see \Exception.
|
||||
*
|
||||
* @param string $plugin_id
|
||||
* The plugin ID of the mapper.
|
||||
* @param string $property
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -74,6 +74,8 @@ class MigrateSourceTest extends MigrateTestCase {
|
|||
* @param int $status
|
||||
* (optional) The default status for the new rows to be imported. Defaults
|
||||
* 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
|
||||
* A mocked source plugin.
|
||||
|
|
|
@ -43,6 +43,11 @@ class MigrateNodeTypeTest extends MigrateDrupal7TestBase {
|
|||
* The expected node type description.
|
||||
* @param string $help
|
||||
* 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) {
|
||||
/** @var \Drupal\node\NodeTypeInterface $entity */
|
||||
|
|
|
@ -156,7 +156,10 @@ JS;
|
|||
* Asserts the state of the Quick Edit entity toolbar.
|
||||
*
|
||||
* @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) {
|
||||
$quickedit_entity_toolbar = $this->getSession()->getPage()->findById('quickedit-entity-toolbar');
|
||||
|
|
|
@ -249,10 +249,11 @@ class CommentAttributesTest extends CommentTestBase {
|
|||
*
|
||||
* Tests the current page for basic comment RDFa markup.
|
||||
*
|
||||
* @param $comment
|
||||
* @param \Drupal\comment\CommentInterface $comment
|
||||
* Comment object.
|
||||
* @param $account
|
||||
* An array containing information about an anonymous user.
|
||||
* @param array|null $account
|
||||
* (optional) An array containing information about an anonymous user.
|
||||
* Defaults to NULL.
|
||||
*/
|
||||
public function _testBasicCommentRdfaMarkup(CommentInterface $comment, $account = NULL) {
|
||||
$this->drupalGet($this->node->toUrl());
|
||||
|
|
|
@ -143,6 +143,8 @@ abstract class ResourceTestBase extends BrowserTestBase {
|
|||
* The allowed formats for this resource.
|
||||
* @param string[] $authentication
|
||||
* 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']) {
|
||||
$this->resourceConfigStorage->create([
|
||||
|
|
|
@ -18,8 +18,11 @@ class SerializationTestNormalizer implements NormalizerInterface {
|
|||
*
|
||||
* @param object $object
|
||||
* Object to normalize.
|
||||
* @param string $format
|
||||
* Format the normalization result will be encoded as.
|
||||
* @param string|null $format
|
||||
* (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
|
||||
* An array containing a normalized representation of $object, appropriate
|
||||
|
|
|
@ -39,6 +39,8 @@ class NodeStatisticsDatabaseStorage implements StatisticsStorageInterface {
|
|||
* The database connection for the node view storage.
|
||||
* @param \Drupal\Core\State\StateInterface $state
|
||||
* The state service.
|
||||
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
|
||||
* The request stack.
|
||||
*/
|
||||
public function __construct(Connection $connection, StateInterface $state, RequestStack $request_stack) {
|
||||
$this->connection = $connection;
|
||||
|
|
|
@ -64,6 +64,8 @@ class StatisticsPopularBlock extends BlockBase implements ContainerFactoryPlugin
|
|||
* The entity repository service
|
||||
* @param \Drupal\statistics\StatisticsStorageInterface $statistics_storage
|
||||
* 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) {
|
||||
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
||||
|
|
|
@ -510,6 +510,10 @@ class DbUpdateController extends ControllerBase {
|
|||
/**
|
||||
* 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
|
||||
* The current request.
|
||||
*
|
||||
|
|
|
@ -123,6 +123,10 @@ class ThemeSettingsForm extends ConfigFormBase {
|
|||
/**
|
||||
* {@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
|
||||
* The theme name.
|
||||
*/
|
||||
|
|
|
@ -25,6 +25,8 @@ class MonkeysInTheControlRoom implements HttpKernelInterface {
|
|||
*
|
||||
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $app
|
||||
* The wrapper HTTP kernel.
|
||||
* @param \Drupal\Core\Site\Settings $settings
|
||||
* The settings object.
|
||||
*/
|
||||
public function __construct(HttpKernelInterface $app, Settings $settings) {
|
||||
$this->app = $app;
|
||||
|
|
|
@ -204,6 +204,7 @@ class UrlTest extends BrowserTestBase {
|
|||
/**
|
||||
* Checks for class existence in link.
|
||||
*
|
||||
* @param $attribute
|
||||
* @param $link
|
||||
* URL to search.
|
||||
* @param $class
|
||||
|
|
|
@ -196,13 +196,16 @@ class ElementsTableSelectTest extends BrowserTestBase {
|
|||
/**
|
||||
* Helper function for the option check test to submit a form while collecting errors.
|
||||
*
|
||||
* @param $form_element
|
||||
* A form element to test.
|
||||
* @param $edit
|
||||
* @param array $form
|
||||
* Nested array of form elements that comprise the form.
|
||||
* @param array $edit
|
||||
* An array containing post data.
|
||||
*
|
||||
* @return
|
||||
* @return array
|
||||
* 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) {
|
||||
$form_id = $this->randomMachineName();
|
||||
|
|
|
@ -926,6 +926,9 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend
|
|||
*
|
||||
* @param $order
|
||||
* 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) {
|
||||
$this->query->addOrderBy(NULL, NULL, $order, (!empty($by) ? $by : $this->name_alias));
|
||||
|
|
|
@ -18,6 +18,12 @@ class EntityReverse extends RelationshipPluginBase {
|
|||
/**
|
||||
* 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
|
||||
* The views plugin join manager.
|
||||
*/
|
||||
|
|
|
@ -391,7 +391,9 @@ class ViewEditForm extends ViewFormBase {
|
|||
/**
|
||||
* 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
|
||||
* A renderable page build array.
|
||||
|
|
|
@ -81,8 +81,11 @@ abstract class ViewFormBase extends EntityForm {
|
|||
* having them as secondary local tasks isn't desired. The caller is responsible
|
||||
* for setting the active tab's #active property to TRUE.
|
||||
*
|
||||
* @param $display_id
|
||||
* The display_id which is edited on the current request.
|
||||
* @param \Drupal\views_ui\ViewUI $view
|
||||
* The ViewUI entity.
|
||||
*
|
||||
* @return array
|
||||
* An array of tab definitions.
|
||||
*/
|
||||
public function getDisplayTabs(ViewUI $view) {
|
||||
$executable = $view->getExecutable();
|
||||
|
|
|
@ -51,6 +51,8 @@ class WorkspaceListBuilder extends EntityListBuilder {
|
|||
* The entity storage class.
|
||||
* @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
|
||||
* The workspace manager service.
|
||||
* @param \Drupal\workspaces\WorkspaceRepositoryInterface $workspace_repository
|
||||
* The workspace repository service.
|
||||
* @param \Drupal\Core\Render\RendererInterface $renderer
|
||||
* The renderer service.
|
||||
*/
|
||||
|
|
|
@ -62,6 +62,8 @@ class WorkspacePublisher implements WorkspacePublisherInterface {
|
|||
* The workspace manager.
|
||||
* @param \Drupal\workspaces\WorkspaceAssociationInterface $workspace_association
|
||||
* 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) {
|
||||
$this->entityTypeManager = $entity_type_manager;
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
|
||||
<exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/>
|
||||
<exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
|
||||
<exclude name="Drupal.Commenting.FunctionComment.ParamMissingDefinition"/>
|
||||
<exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
|
||||
</rule>
|
||||
<rule ref="Drupal.Commenting.HookComment"/>
|
||||
|
|
|
@ -427,6 +427,8 @@ class InstallHelper implements ContainerInjectionInterface {
|
|||
*
|
||||
* @param array $data
|
||||
* Data of line that was read from the file.
|
||||
* @param string $langcode
|
||||
* Current language code.
|
||||
*
|
||||
* @return array
|
||||
* Data structured as a recipe node.
|
||||
|
|
|
@ -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.');
|
||||
|
||||
$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})";
|
||||
$this->assertStringContainsString($expected_entry, $errors[0], 'Original error logged to the PHP error log when an exception is thrown by a logger');
|
||||
|
||||
|
|
|
@ -135,6 +135,8 @@ class DefaultConfigTest extends KernelTestBase {
|
|||
*
|
||||
* @param \Drupal\Core\Config\StorageInterface $default_config_storage
|
||||
* The default config storage to test.
|
||||
* @param string $module
|
||||
* The module that is being tested.
|
||||
*/
|
||||
protected function doTestsOnConfigStorage(StorageInterface $default_config_storage, $module) {
|
||||
/** @var \Drupal\Core\Config\ConfigManagerInterface $config_manager */
|
||||
|
|
|
@ -1011,6 +1011,8 @@ class SchemaTest extends KernelTestBase {
|
|||
* The beginning field specification.
|
||||
* @param $new_spec
|
||||
* 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) {
|
||||
$table_name = 'test_table_' . ($this->counter++);
|
||||
|
|
|
@ -118,6 +118,8 @@ abstract class EntityLanguageTestBase extends EntityKernelTestBase {
|
|||
*
|
||||
* @param string $entity_type
|
||||
* The type of the entity fields are attached to.
|
||||
* @param string $bundle
|
||||
* The bundle of the entity.
|
||||
*/
|
||||
protected function toggleFieldTranslatability($entity_type, $bundle) {
|
||||
$fields = [$this->fieldName, $this->untranslatableFieldName];
|
||||
|
|
|
@ -582,6 +582,7 @@ class EntityQueryAggregateTest extends EntityKernelTestBase {
|
|||
*
|
||||
* @param array $expected
|
||||
* An array of the expected results.
|
||||
* @param bool $sorted
|
||||
*/
|
||||
protected function assertResults($expected, $sorted = FALSE) {
|
||||
$found = TRUE;
|
||||
|
|
|
@ -187,8 +187,7 @@ class DateTimePlusTest extends TestCase {
|
|||
*
|
||||
* @param \Drupal\Component\Datetime\DateTimePlus $date
|
||||
* DateTimePlus to test.
|
||||
*
|
||||
* @input mixed $input
|
||||
* @param string $input
|
||||
* The original input passed to the test method.
|
||||
* @param array $initial
|
||||
* @see testTimestamp()
|
||||
|
@ -231,6 +230,7 @@ class DateTimePlusTest extends TestCase {
|
|||
* Input argument for DateTimePlus.
|
||||
* @param string $timezone
|
||||
* Timezone argument for DateTimePlus.
|
||||
* @param string $format
|
||||
* @param string $format_date
|
||||
* Format argument for DateTimePlus::format().
|
||||
* @param string $expected
|
||||
|
|
|
@ -312,8 +312,12 @@ EOS;
|
|||
/**
|
||||
* Constructs the expected class output.
|
||||
*
|
||||
* @param string $class
|
||||
* The class name that is being built.
|
||||
* @param string $expected_methods_body
|
||||
* The expected body of decorated methods.
|
||||
* @param string $interface_string
|
||||
* (optional) The expected "implements" clause of the class definition.
|
||||
*
|
||||
* @return string
|
||||
* The code of the entire proxy.
|
||||
|
|
|
@ -578,6 +578,9 @@ class DefaultTableMappingTest extends UnitTestCase {
|
|||
* The field name.
|
||||
* @param array $column_names
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -62,8 +62,12 @@ EOS;
|
|||
/**
|
||||
* Constructs the expected class output.
|
||||
*
|
||||
* @param string $class
|
||||
* The class name that is being built.
|
||||
* @param string $expected_methods_body
|
||||
* The expected body of decorated methods.
|
||||
* @param string $interface_string
|
||||
* (optional) The expected "implements" clause of the class definition.
|
||||
*
|
||||
* @return string
|
||||
* The code of the entire proxy.
|
||||
|
|
|
@ -265,6 +265,9 @@ class PlaceholdersTest implements TrustedCallbackInterface {
|
|||
*
|
||||
* @param string $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
|
||||
* A renderable array.
|
||||
|
|
|
@ -188,6 +188,7 @@ class RecursiveContextualValidatorTest extends UnitTestCase {
|
|||
*
|
||||
* @param array $tree
|
||||
* An array of value, constraints and properties.
|
||||
* @param string $name
|
||||
*
|
||||
* @return \Drupal\Core\TypedData\TypedDataInterface|\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue