protected function ComposerPackage::validateIdentifier in Markdown 8.2
Helper method for validating the definition identifier.
Parameters
\Drupal\markdown\Annotation\Identifier $id: The identifier to validate.
Overrides AnnotationObject::validateIdentifier
File
- src/
Annotation/ ComposerPackage.php, line 148
Class
- ComposerPackage
- Annotation for providing an installable library via Composer.
Namespace
Drupal\markdown\AnnotationCode
protected function validateIdentifier(Identifier $id) {
if (!$id
->contains('/')) {
throw AnnotationException::semanticalError('A ComposerPackage definition must contain a forward-slash (/) in its identifier so that it represents the correct {vendor}/{package} name.');
}
}