Skip to content

Commit

Permalink
VACMS-14700: Removes isset() as it always exists and is not nullable,…
Browse files Browse the repository at this point in the history
… per PHPStan.
  • Loading branch information
omahane committed Nov 13, 2023
1 parent 0273ee7 commit 556382d
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
class VbaFacilityRequiredFieldsConstraintValidator extends ConstraintValidator {

/**
* {@inheritdoc}
* Determines whether a value is valid.
*
* @param \Drupal\node\NodeInterface $entity
* The node to test.
* @param \Drupal\va_gov_vba_facility\Plugin\Validation\Constraint\VbaFacilityRequiredFieldsConstraint $constraint
* The constraint with which to test.
*/
public function validate($entity, Constraint $constraint) {
/** @var \Drupal\va_gov_vba_facility\Plugin\Validation\Constraint\VbaFacilityRequiredFieldsConstraint $constraint */
if (!isset($entity)) {
return;
}
if ($entity instanceof NodeInterface && $entity->bundle() === 'vba_facility') {
if ($entity->get('field_vba_banner_panel')->value == TRUE) {
// To have VBA Facility banner created,
Expand Down

0 comments on commit 556382d

Please sign in to comment.