public static function createFromArray($name, array $data = [])
    {
        $type = parent::createFromArray($name, $data);
        \assert($type instanceof self);

        foreach ($data as $key => $value) {
            switch ($key) {
                case 'minimum':
                    $type->setMinimum($value);

                    break;
                case 'maximum':
                    $type->setMaximum($value);

                    break;
                case 'format':
                    $type->setFormat($value);

                    break;
                case 'multipleOf':
                    $type->setMultipleOf($value);

                    break;
            }
        }

        return $type;
    }
public static function createFromArray($name, array $data = [])
    {
        $type = parent::createFromArray($name, $data);
        \assert($type instanceof self);

        foreach ($data as $key => $value) {
            switch ($key) {
                case 'minimum':
                    $type->setMinimum($value);

                    break;
                case 'maximum':
                    $type->setMaximum($value);

                    break;
                case 'format':
                    $type->setFormat($value);

                    break;
                case 'multipleOf':
                    $type->setMultipleOf($value);

                    break;
            }
        }

        return $type;
    }
public static function createFromArray ( $ name , array $ data = [ ] ) { $ type = parent :: createFromArray ( $ name , $ data ) ; \ assert ( $ type instanceof self ) ; foreach ( $ data as $ key => $ value ) { switch ( $ key ) { case 'minimum' : $ type -> setMinimum ( $ value ) ; break ; case 'maximum' : $ type -> setMaximum ( $ value ) ; break ; case 'format' : $ type -> setFormat ( $ value ) ; break ; case 'multipleOf' : $ type -> setMultipleOf ( $ value ) ; break ; } } return $ type ; }
Create a new NumberType from an array of data

@param string    $name

@return NumberType
Create a new NumberType from an array of data