{@inheritdoc}

@param ReturnType\TypeInterface $type

@return bool
340953
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        if (true == $type->isRealType()) {
            return false;
        }

        return Types::T_OBJECT == $type->getDataType() && false === $type->isCollection();
    }
544642
public function isValid(string $returnTypeClass, $instance): bool
    {
        if (array_key_exists($returnTypeClass, $this->getRequiredFields()) === false) {
            return false;
        }
        foreach ($this->getRequiredFields()[$returnTypeClass] as $property) {
            if (is_array($instance)) {
                foreach ($instance as $item) {
                    if ($item->{$property} === null) {
                        return false;
                    }
                }
            } elseif ($instance->{$property} === null) {
                return false;
            }
        }
        return true;
    }
846013
public function isSingleton($type): bool
    {
        assert(isset($this->types[$type]));
        return $this->types[$type];
    }
406663
public static function setArrayReturnType($returnType) {
		if (($returnType == self::RETURN_ARRAY_AS_VALUE) ||
			($returnType == self::RETURN_ARRAY_AS_ERROR) ||
			($returnType == self::RETURN_ARRAY_AS_ARRAY)) {
			self::$returnArrayAsType = $returnType;
			return TRUE;
		}
		return FALSE;
	}
782645
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        return $type->isRealType() && Types::T_DOUBLE == $type->getDataType();
    }
725778
public function check(string $type, string $context): bool
    {
        /** @var DataSource $dataSource */
        $dataSource = $this->dataSourceRepository->findOneBy(['name' => $type]);
        if (!$dataSource) {
            // unknown data source
            return false;
        }

        if (!in_array($context, $dataSource->getContext())) {
            return false;
        }

        return true;
    }
272194
protected static function isType(array $types, ResolvedBlockTypeInterface $rType = null)
    {
        if (null === $rType) {
            return false;
        } elseif (!\in_array(\get_class($rType->getInnerType()), $types)) {
            return static::isType($types, $rType->getParent());
        }

        return true;
    }
55491
public static function exists($type = 'post')
    {
        switch ($type) {
            case 'post':
                return (!empty($_POST)) ? true : false;
                break;
            case 'get':
                return (!empty($_GET)) ? true : false;
                break;
            default:
                return false;
                break;
        }
    }
657054
public function areReturnTypesNullCompatible($type = null)
    {
        if (\count($this->returnTypes)) {
            foreach ($this->returnTypes as $returnType => $definition) {
                switch ($returnType) {
                    case 'null':
                        return true;
                }
            }
        }

        return false;
    }
60964
public function addInterface(string $interface) : bool
    {
        $retval = false;

        if (!array_search($interface, $this->interface_list)) {
            $this->interface_list[] = $interface;
            $retval = true;
        }

        return $retval;
    }
1020910
public function setType(Type $type = null)
    {
        if ($this->type !== $type) {
            $this->type = $type;
        }

        return $this;
    }
326707
public function type($type = null)
    {
        if (!func_num_args()) {
            return $this->_type;
        }
        $this->_type = $type;
        return $this;
    }
557003
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        switch ($type->getDataType()) {
            case Types::T_NUMBER:
            case Types::T_RESOURCE:
            case Types::T_VARIABLE:
            case Types::T_CALLABLE:
            case Types::T_ITERABLE:
                return true;
            default:
                return false;
        }
    }
1215099
public function setReturnType($type) {

        if ( !in_array($type, self::$rpcvalues) ) throw new InvalidArgumentException("Invalid RpcMethod return type");

        $this->signatures[$this->current_signature]["RETURNTYPE"] = self::$rpcvalues[$type];

        return $this;

    }
387476
public function isType($type)
    {
        if ($this->has(strtolower($type))) {
            return true;
        }

        return $this->detectType() === $type;
    }
640829
public function hasMessages($type = null)
    {
        if ( ! is_null($type)) {
            return ! empty($_SESSION[$this->key][$type]);
        }
        
        foreach ($this->types as $type) {
            if ( ! empty($_SESSION[$this->key][$type])) {
                return true;
            }
        }

        return false;
    }
613127
private function getNormalizer(TypeInterface $type)
    {
        $type = (string) $type->getType();

        if (isset($this->normalizers[$type])) {
            return $this->normalizers[$type];
        }

        return null;
    }