/** * {@inheritdoc} */ protected function getSchemaTemplates(SchemaDescriptor $schema) { return $schema->isMixinSchema() ? ['curie-interface.twig' => '{className}', 'curie-major-interface.twig' => '{className}V{major}', 'mixin.twig' => '{className}V{major}Mixin', 'trait.twig' => '{className}V{major}Trait'] : ['curie-interface.twig' => '{className}', 'message.twig' => '{className}V{major}']; }
/** * {@inheritdoc} */ public function validate(SchemaDescriptor $a, SchemaDescriptor $b) { if ($a->isMixinSchema() && !$b->isMixinSchema()) { throw new ValidatorException(sprintf('The schema "%s" must be a mixin.', $b)); } }