Unverified Commit 08766c5d authored by alexpott's avatar alexpott
Browse files

Issue #2903911 by joshmiller, longwave, anmolgoyal74, ankithashetty, init90,...

Issue #2903911 by joshmiller, longwave, anmolgoyal74, ankithashetty, init90, Pooja Ganjage, _gradient_, daffie, borisson_: Fix 'Drupal.Commenting.FunctionComment.ParamMissingDefinition' coding standard
parent 4ae7ef90
...@@ -17,10 +17,14 @@ class InvalidPluginDefinitionException extends PluginException { ...@@ -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
*/ */
......
...@@ -10,10 +10,14 @@ class PluginNotFoundException extends PluginException { ...@@ -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
*/ */
......
...@@ -452,10 +452,12 @@ protected function isValidUri($string) { ...@@ -452,10 +452,12 @@ protected function isValidUri($string) {
* 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) {
......
...@@ -64,6 +64,8 @@ public function getExtension() { ...@@ -64,6 +64,8 @@ public function getExtension() {
* *
* @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
*/ */
......
...@@ -103,13 +103,16 @@ protected function ensureIdentifiersLength($table_identifier_part, $column_ident ...@@ -103,13 +103,16 @@ protected function ensureIdentifiersLength($table_identifier_part, $column_ident
* 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 @@ protected function resetTableInformation($table) { ...@@ -233,6 +236,9 @@ protected function resetTableInformation($table) {
* *
* @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 @@ public function queryFieldInformation($table, $field, $constraint_type = 'c') { ...@@ -267,12 +273,12 @@ public function queryFieldInformation($table, $field, $constraint_type = 'c') {
/** /**
* 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) {
......
...@@ -72,13 +72,13 @@ public function nextPlaceholder() { ...@@ -72,13 +72,13 @@ public function nextPlaceholder() {
/** /**
* 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 @@ public function findTables($table_expression) { ...@@ -238,9 +238,9 @@ public function findTables($table_expression) {
/** /**
* 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
......
...@@ -77,8 +77,6 @@ public function getEntityFromRouteMatch(RouteMatchInterface $route_match, $entit ...@@ -77,8 +77,6 @@ public function getEntityFromRouteMatch(RouteMatchInterface $route_match, $entit
* 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 @@ public function getEntityFromRouteMatch(RouteMatchInterface $route_match, $entit ...@@ -86,6 +84,8 @@ public function getEntityFromRouteMatch(RouteMatchInterface $route_match, $entit
* *
* @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);
......
...@@ -50,6 +50,8 @@ class EntityDeriver implements ContainerDeriverInterface { ...@@ -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;
......
...@@ -34,10 +34,11 @@ public function condition($field, $function = NULL, $value = NULL, $operator = N ...@@ -34,10 +34,11 @@ public function condition($field, $function = NULL, $value = NULL, $operator = N
/** /**
* 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 @@ public function exists($field, $function, $langcode = NULL); ...@@ -47,8 +48,10 @@ public function exists($field, $function, $langcode = NULL);
* 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()
*/ */
......
...@@ -54,6 +54,8 @@ public function exists($field, $langcode = NULL); ...@@ -54,6 +54,8 @@ public function exists($field, $langcode = NULL);
* *
* @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
* *
......
...@@ -369,14 +369,32 @@ protected function ensureEntityTable($index_prefix, $property, $type, $langcode, ...@@ -369,14 +369,32 @@ protected function ensureEntityTable($index_prefix, $property, $type, $langcode,
} }
/** /**
* 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 @@ protected function addJoin($type, $table, $join_condition, $langcode, $delta = N ...@@ -435,6 +453,7 @@ protected function addJoin($type, $table, $join_condition, $langcode, $delta = N
* *
* @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
......
...@@ -15,6 +15,9 @@ class EntityDataDefinition extends ComplexDataDefinitionBase implements EntityDa ...@@ -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
*/ */
......
...@@ -37,6 +37,8 @@ class ConfigSnapshotSubscriber implements EventSubscriberInterface { ...@@ -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
......
...@@ -37,6 +37,8 @@ class SiteSettingsForm extends FormBase { ...@@ -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;
......
...@@ -212,9 +212,13 @@ public static function getHashSalt() { ...@@ -212,9 +212,13 @@ public static function getHashSalt() {
* 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.
......
...@@ -48,6 +48,9 @@ public function getValue() { ...@@ -48,6 +48,9 @@ public function getValue() {
* *
* @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 === []) {
......
...@@ -70,6 +70,10 @@ public function getValue() { ...@@ -70,6 +70,10 @@ public function getValue() {
* *
* @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 @@ public function __clone() { ...@@ -214,6 +218,8 @@ public function __clone() {
/** /**
* {@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
......
...@@ -14,6 +14,10 @@ class ActionAddForm extends ActionFormBase { ...@@ -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.
*/ */
......
...@@ -48,6 +48,10 @@ public function getFormId() { ...@@ -48,6 +48,10 @@ public function getFormId() {
/** /**
* {@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
......
...@@ -80,6 +80,10 @@ public function getCancelUrl() { ...@@ -80,6 +80,10 @@ public function getCancelUrl() {
/** /**
* {@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.
*/ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment