Skip to content
Snippets Groups Projects
Commit 05e213ea authored by howard ge's avatar howard ge Committed by howard ge
Browse files

Issue #3002515 by g089h515r806: Coding standards

parent 0383237d
No related branches found
No related tags found
No related merge requests found
Showing with 8 additions and 34 deletions
......@@ -3,7 +3,6 @@
namespace Drupal\field_validation\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
use Drupal\field_validation\FieldValidationRuleInterface;
use Drupal\field_validation\FieldValidationRulePluginCollection;
......@@ -82,8 +81,7 @@ class FieldValidationRuleSet extends ConfigEntityBase implements FieldValidation
protected $field_validation_rules = [];
/**
* Holds the collection of fieldValidationRules that are used
* by this FieldValidationRuleSet.
* Holds the collection of fieldValidationRules.
*
* @var \Drupal\field_validation\FieldValidationRulePluginCollection
*/
......
......@@ -92,7 +92,7 @@ class DateRangeFieldValidationRule extends ConfigurableFieldValidationRuleBase {
}
/**
*
* {@inheritdoc}
*/
public function validate($params) {
$value = $params['value'] ?? '';
......
......@@ -49,14 +49,6 @@ class EmailFieldValidationRule extends ConfigurableFieldValidationRuleBase {
return $form;
}
/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
}
/**
* Validate the Email.
*/
......
......@@ -74,7 +74,7 @@ class IntegerFieldValidationRule extends ConfigurableFieldValidationRuleBase {
}
/**
*
* {@inheritdoc}
*/
public function validate($params) {
$value = $params['value'] ?? '';
......
......@@ -80,7 +80,7 @@ class IpFieldValidationRule extends ConfigurableFieldValidationRuleBase {
}
/**
*
* {@inheritdoc}
*/
public function validate($params) {
$value = $params['value'] ?? '';
......
......@@ -106,7 +106,7 @@ class MatchFieldFieldValidationRule extends ConfigurableFieldValidationRuleBase
}
/**
*
* {@inheritdoc}
*/
public function validate($params) {
$value = $params['value'] ?? '';
......
......@@ -52,14 +52,6 @@ class MustBeEmptyFieldValidationRule extends ConfigurableFieldValidationRuleBase
/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
}
/**
*
*/
public function validate($params) {
$value = $params['value'] ?? '';
$rule = $params['rule'] ?? NULL;
......
......@@ -48,14 +48,6 @@ class PlainTextFieldValidationRule extends ConfigurableFieldValidationRuleBase {
return $form;
}
/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
}
/**
* {@inheritdoc}
*/
......
......@@ -78,7 +78,7 @@ class WordsFieldValidationRule extends ConfigurableFieldValidationRuleBase {
}
/**
*
* {@inheritdoc}
*/
public function validate($params) {
$value = $params['value'] ?? '';
......
......@@ -21,11 +21,11 @@ class FieldValidationConstraint extends Constraint {
*/
public function __construct($options = NULL) {
if (is_array($options)) {
if (key_exists('ruleset_name', $options)) {
if (array_key_exists('ruleset_name', $options)) {
$this->ruleset_name = $options['ruleset_name'];
}
if (key_exists('rule_uuid', $options)) {
if (array_key_exists('rule_uuid', $options)) {
$this->rule_uuid = $options['rule_uuid'];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment