Skip to content
Snippets Groups Projects
Commit c691ada1 authored by Dharti Patel's avatar Dharti Patel Committed by Owen Bush
Browse files

Issue #3312286 by Dharti Patel, Arturo1007, owenbush: Drupal coding Standard Issues

parent d4c251a7
Branches
Tags
No related merge requests found
......@@ -23,16 +23,16 @@ function hook_field_inheritance_inheritance_class_alter(&$class, $field) {
* Alter the computed value for an inherited field.
*
* @param array $value
* Array of field item values
* Array of field item values.
* @param array $context
* Array of context information for the field inheritance, with keys:
* Array of context information for the field inheritance, with keys:
* - source_field
* - source_entity
* - destination_field
* - destination_entity
* - method
* - method.
*/
function field_inheritance_field_inheritance_compute_value_alter(&$value, $context) {
function field_inheritance_field_inheritance_compute_value_alter(array &$value, array $context) {
if ($context['destination_field'] === 'my_field') {
$value[0]['value'] = 'foo';
}
......
......@@ -127,7 +127,7 @@ class FieldInheritance extends ConfigEntityBase implements FieldInheritanceInter
* {@inheritdoc}
*/
public function type() {
return isset($this->type) ? $this->type : NULL;
return $this->type ?? NULL;
}
/**
......@@ -142,49 +142,49 @@ class FieldInheritance extends ConfigEntityBase implements FieldInheritanceInter
* {@inheritdoc}
*/
public function sourceEntityType() {
return isset($this->sourceEntityType) ? $this->sourceEntityType : NULL;
return $this->sourceEntityType ?? NULL;
}
/**
* {@inheritdoc}
*/
public function destinationEntityType() {
return isset($this->destinationEntityType) ? $this->destinationEntityType : NULL;
return $this->destinationEntityType ?? NULL;
}
/**
* {@inheritdoc}
*/
public function sourceEntityBundle() {
return isset($this->sourceEntityBundle) ? $this->sourceEntityBundle : NULL;
return $this->sourceEntityBundle ?? NULL;
}
/**
* {@inheritdoc}
*/
public function destinationEntityBundle() {
return isset($this->destinationEntityBundle) ? $this->destinationEntityBundle : NULL;
return $this->destinationEntityBundle ?? NULL;
}
/**
* {@inheritdoc}
*/
public function sourceField() {
return isset($this->sourceField) ? $this->sourceField : NULL;
return $this->sourceField ?? NULL;
}
/**
* {@inheritdoc}
*/
public function destinationField() {
return isset($this->destinationField) ? $this->destinationField : NULL;
return $this->destinationField ?? NULL;
}
/**
* {@inheritdoc}
*/
public function plugin() {
return isset($this->plugin) ? $this->plugin : NULL;
return $this->plugin ?? NULL;
}
/**
......
......@@ -419,7 +419,6 @@ class FieldInheritanceForm extends EntityForm {
];
}
return $form;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment