Zend\Code\Generator\ValueGenerator::getValidatedType PHP Method

getValidatedType() protected method

protected getValidatedType ( string $type ) : string
$type string
return string
    protected function getValidatedType($type)
    {
        $types = [self::TYPE_AUTO, self::TYPE_BOOLEAN, self::TYPE_BOOL, self::TYPE_NUMBER, self::TYPE_INTEGER, self::TYPE_INT, self::TYPE_FLOAT, self::TYPE_DOUBLE, self::TYPE_STRING, self::TYPE_ARRAY, self::TYPE_ARRAY_SHORT, self::TYPE_ARRAY_LONG, self::TYPE_CONSTANT, self::TYPE_NULL, self::TYPE_OBJECT, self::TYPE_OTHER];
        if (in_array($type, $types)) {
            return $type;
        }
        return self::TYPE_AUTO;
    }