src/Jms/YamlValidatorConverter.php
protected function visitSimpleType(&$class, &$data, SimpleType $type, $name)
    {
        parent::visitSimpleType($class, $data, $type, $name);

        if ($restriction = $type->getRestriction()) {
            $parent = $restriction->getBase();
            if ($parent instanceof Type) {
                if (!isset($data["properties"]['__value'])) {
                    $data["properties"]['__value'] = [];
                }
                $this->loadValidatorType($data["properties"]['__value'], $type);
            }
        }
    }
protected function visitSimpleType(&$class, &$data, SimpleType $type, $name)
    {
        parent::visitSimpleType($class, $data, $type, $name);

        if ($restriction = $type->getRestriction()) {
            $parent = $restriction->getBase();
            if ($parent instanceof Type) {
                if (!isset($data["properties"]['__value'])) {
                    $data["properties"]['__value'] = [];
                }
                $this->loadValidatorType($data["properties"]['__value'], $type);
            }
        }
    }
protected function visitSimpleType ( & $ class , & $ data , SimpleType $ type , $ name ) { parent :: visitSimpleType ( $ class , $ data , $ type , $ name ) ; if ( $ restriction = $ type -> getRestriction ( ) ) { $ parent = $ restriction -> getBase ( ) ; if ( $ parent instanceof Type ) { if ( ! isset ( $ data [ "properties" ] [ '__value' ] ) ) { $ data [ "properties" ] [ '__value' ] = [ ] ; } $ this -> loadValidatorType ( $ data [ "properties" ] [ '__value' ] , $ type ) ; } } }
Override necessary to improve method to load validations from schema type

@param PHPClass $class
@param array $data
@param SimpleType $type
@param string $name
Override necessary to improve method to load validations from schema type