Checks if the collection have compatible return types.

@return bool
424681
public function areReturnTypesCompatible()
    {
        $numberOfReturnTypes = $this->count();

        if (0 == $numberOfReturnTypes || 1 == $numberOfReturnTypes) {
            return true;
        }

        // <Class_1> | <Class_2> | ... | <Class_n>
        $classes = $this->getObjectLikeReturnTypes();

        // <Class> | <Class_1[]> | <Class_1[]> | ... | <Class_n[]>
        $collections = $this->getTypesBySpecification(new Specification\IsCollection());
        if (\count($collections) > 0 && $this->areReturnTypesObjectCompatible()) {
            return false;
        }

        $summ =
            // array | <Class_1[]> | <Class_2[]> | ... | <Class_n[]>
            (int) $this->areReturnTypesArrayCompatible() +

            // char | uchar | int | uint | long | ulong
            (int) $this->areReturnTypesIntCompatible() +

            // bool
            (int) $this->areReturnTypesBoolCompatible() +

            // istring | string
            (int) $this->areReturnTypesStringCompatible() +

            // double
            (int) $this->areReturnTypesDoubleCompatible();

        // T1 | T2 | ... | Tn
        if ($summ > 1) {
            return false;
        }

        // <Class_1> | <T1>
        if ($this->areReturnTypesObjectCompatible() && $summ > 0) {
            return false;
        }

        // null
        $null = (int) $this->areReturnTypesNullCompatible();

        // <T1> | null
        // <Class_1> | null
        // <Class_1[]> | null
        if (1 == $null && 2 == $this->count()) {
            return true;
        }

        // T1 | T2 | ... | Tn | null
        if (1 == $null && $null + $summ != $this->count()) {
            return false;
        }

        return 1 == $summ;
    }
439186
public function isPrimitive($types) : bool
    {
        if (!is_array($types)) {
            $types = [$types];
        }

        $primitive = false;
        $primitiveType = [
            'int',
            'int32',
            'integer',
            'float',
            'double',
            'string',
            'bool',
            'boolean',
            'array',
            '\\Cawa\\SwaggerServer\\DateTime',
        ];

        foreach ($types as $type) {
            if (in_array($type, $primitiveType)) {
                $primitive = true;
            }
        }

        return $primitive;
    }
1356065
public function isCompatibleVersion()
    {
        $return = false;

        while ($this->read() && !$return) {
            $return = ($this->nodeType === \XMLReader::ELEMENT) && $this->hasAttributes &&
                ($this->getAttribute('version') === '1.4.4');
        } // while

        return $return;
    }
685977
public function isProperty()
    {
        $returnValue = (bool) false;
        foreach($this->getTypes() as $type){
        	if($type->getUri() == OntologyRdf::RDF_PROPERTY){
        		$returnValue = true;
        		break;
        	}
        }
        return (bool) $returnValue;
    }
847296
public function supported_returntypes() {
        // We can only support references if the system account is connected.
        if (!empty($this->issuer) && $this->issuer->is_system_account_connected()) {
            $setting = get_config('googledocs', 'supportedreturntypes');
            if ($setting == 'internal') {
                return FILE_INTERNAL;
            } else if ($setting == 'external') {
                return FILE_CONTROLLED_LINK;
            } else {
                return FILE_CONTROLLED_LINK | FILE_INTERNAL;
            }
        } else {
            return FILE_INTERNAL;
        }
    }
788223
public function isClass()
    {
        $returnValue = (bool) false;
        if (count($this->getPropertyValues($this->getProperty(OntologyRdfs::RDFS_SUBCLASSOF))) > 0) {
        	$returnValue = true;
        } else {
	        foreach($this->getTypes() as $type){
	        	if($type->getUri() == OntologyRdfs::RDFS_CLASS){
	        		$returnValue = true;
	        		break;
	        	}
	        }
        }
        return (bool) $returnValue;
    }
643121
public function isType()
    {
        $arguments = func_get_args();

        $count = count($arguments);
        for ($a = 0; $a < $count; $a++) {
            if (strpos($arguments[$a], ':') !== false) {
                list($type, $subtype) = explode(':', $arguments[$a]);
                if ($type == $this->device->type && $subtype == $this->device->subtype) {
                    return true;
                }
            } else {
                if ($arguments[$a] == $this->device->type) {
                    return true;
                }
            }
        }

        return false;
    }
115074
public static function typeExists()
    {
        $instance = new static;

        $params = $instance->getBasicEsParams();

        return $instance->getElasticSearchClient()->indices()->existsType($params);
    }
303101
protected function haveSiblingsDefalutValues()
    {
        $function = $this->getDeclaringFunction();
        if (null === $function) {
            throw new ReflectionException('Could not get the declaring function reflection.');
        }

        /** @var \ReflectionParameter[] $remainingParameters */
        $remainingParameters = array_slice($function->getParameters(), $this->parameterIndex + 1);
        foreach ($remainingParameters as $reflectionParameter) {
            if (!$reflectionParameter->isDefaultValueAvailable()) {
                return false;
            }
        }

        return true;
    }
377420
public function valid()
    {

        if ($this->container['region'] === null) {
            return false;
        }
        $allowed_values = $this->getRegionAllowableValues();
        if (!in_array($this->container['region'], $allowed_values)) {
            return false;
        }
        if ($this->container['machineType'] === null) {
            return false;
        }
        $allowed_values = $this->getMachineTypeAllowableValues();
        if (!in_array($this->container['machineType'], $allowed_values)) {
            return false;
        }
        if ($this->container['size'] === null) {
            return false;
        }
        if ($this->container['billingType'] === null) {
            return false;
        }
        $allowed_values = $this->getBillingTypeAllowableValues();
        if (!in_array($this->container['billingType'], $allowed_values)) {
            return false;
        }
        if ($this->container['machineName'] === null) {
            return false;
        }
        if ($this->container['templateId'] === null) {
            return false;
        }
        return true;
    }
1082082
public static function isUnix() : bool
    {
        // Return the cached result if it's already available.
        if (null !== static::$type) {
            return static::$type === self::TYPE_UNIX;
        }

        return static::getType() === self::TYPE_UNIX;
    }
1154499
public function isIterable(): bool
    {
        if (!$this->responseEvent instanceof ReturnedEvent) {
            return false;
        }

        $returnValue = $this->responseEvent->value();

        return is_array($returnValue) || $returnValue instanceof Traversable;
    }
646119
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        if ($type->isRealType()) {
            return Types::T_ARRAY == $type->getDataType();
        }

        return $type->isCollection();
    }
58980
protected static function ensureTypes()
    {
        if (self::$doneScanning && count(self::$types) > 0) {
            return;
        }

        foreach (self::types() as $t) {
        }
    }
340953
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        if (true == $type->isRealType()) {
            return false;
        }

        return Types::T_OBJECT == $type->getDataType() && false === $type->isCollection();
    }
1281287
public boolean compatible()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "compatible", this);
        if (tc.isEntryEnabled())
            Tr.exit(tc, "compatible", new Boolean(_compatible));
        return _compatible;
    }
597545
public function isValidConstantType()
    {
        if ($this->type === self::TYPE_AUTO) {
            $type = $this->determineType($this->value);
        } else {
            $type = $this->type;
        }

        // Valid types for constants.
        $scalarTypes = [
            self::TYPE_BOOLEAN,
            self::TYPE_NUMBER,
            self::TYPE_INTEGER,
            self::TYPE_FLOAT,
            self::TYPE_DOUBLE,
            self::TYPE_STRING,
            self::TYPE_CONSTANT,
            self::TYPE_NULL,
            self::TYPE_EXPRESSION
        ];

        return in_array($type, $scalarTypes);
    }