diff --git a/core/modules/link/lib/Drupal/link/Plugin/Validation/Constraint/LinkTypeConstraint.php b/core/modules/link/lib/Drupal/link/Plugin/Validation/Constraint/LinkTypeConstraint.php index c23db4a..de28bab 100644 --- a/core/modules/link/lib/Drupal/link/Plugin/Validation/Constraint/LinkTypeConstraint.php +++ b/core/modules/link/lib/Drupal/link/Plugin/Validation/Constraint/LinkTypeConstraint.php @@ -18,7 +18,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** - * Validation constraint for a link field receiving data allowed by its settings. + * Validation constraint for links receiving data allowed by its settings. * * @Plugin( * id = "LinkType", @@ -54,14 +54,15 @@ public function validatedBy() { public function validate($value, Constraint $constraint) { if (isset($value)) { $url_is_valid = TRUE; - /** @var $link_item \Drupal\link\Plugin\Field\FieldType\LinkItem */ + /** @var $link_item \Drupal\link\LinkItemInterface */ $link_item = $value; $link_type = $link_item->getFieldDefinition()->getSetting('link_type'); $url_string = $link_item->url; // Validate the url property. if ($url_string !== '') { try { - // @todo This shouldn't be needed, but massageFormValues() may not run. + // @todo This shouldn't be needed, but massageFormValues() may not + // run. $parsed_url = UrlHelper::parse($url_string); $url = Url::createFromPath($parsed_url['path']); @@ -88,4 +89,5 @@ public function validate($value, Constraint $constraint) { } } } -} \ No newline at end of file +} +