SU-SWS/stanford_fields

View on GitHub
src/Plugin/Validation/Constraint/RelativeLinkFieldItemConstraint.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php
 
namespace Drupal\stanford_fields\Plugin\Validation\Constraint;
 
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;
Unused use statement
use Drupal\Core\Validation\Attribute\Constraint;
 
/**
* Checks that the submitted value is a unique integer.
*/
Perl-style comments are not allowed; use "// Comment" instead
#[Constraint(
`syntax error, unexpected ','`
Line indented incorrectly; expected 0 spaces, found 2
id: 'relative_internal_link',
label: new TranslatableMarkup('Relative Internal Link', [], ['context' => 'Validation'])
)]
Missing class doc comment
class RelativeLinkFieldItemConstraint extends SymfonyConstraint {
 
You must use "/**" style comments for a member variable comment
public $absoluteLink = 'Please use relative links that start with "/" for paths on this site.';
 
}