Zephir\ClassMethod::areReturnTypesIntCompatible PHP Method

areReturnTypesIntCompatible() public method

Checks whether at least one return type hint is integer compatible
public areReturnTypesIntCompatible ( string $type = null ) : boolean
$type string
return boolean
    public function areReturnTypesIntCompatible($type = null)
    {
        if (count($this->returnTypes)) {
            foreach ($this->returnTypes as $returnType => $definition) {
                switch ($returnType) {
                    case 'int':
                    case 'uint':
                    case 'char':
                    case 'uchar':
                    case 'long':
                    case 'ulong':
                        return true;
                }
            }
        }
        return false;
    }