src/Protocol/EasyStream.php
private function flagChoice(string $dataType): int
    {
        switch ($dataType) {
            case 'boolean':
                throw new SendException('Boolean data type cannot be transmitted.');
            case 'integer':
                $flag = self::DATA_INT;
                break;
            case 'double':
                $flag = self::DATA_FLOAT;
                break;
            case 'array':
                $flag = self::DATA_ARRAY;
                break;
            case 'object':
                $flag = self::DATA_OBJECT;
                break;
            case 'resource':
                throw new SendException('Values of type Resource cannot be transmitted on current Net version.');
            case 'NULL':
                throw new SendException('Null data type cannot be transmitted.');
            case 'unknown type':
                throw new SendException('Values of Unknown type cannot be transmitted on current Net version.');
            default:
                $flag = self::DATA_STRING;
        }
        return $flag;
    }
private function flagChoice(string $dataType): int
    {
        switch ($dataType) {
            case 'boolean':
                throw new SendException('Boolean data type cannot be transmitted.');
            case 'integer':
                $flag = self::DATA_INT;
                break;
            case 'double':
                $flag = self::DATA_FLOAT;
                break;
            case 'array':
                $flag = self::DATA_ARRAY;
                break;
            case 'object':
                $flag = self::DATA_OBJECT;
                break;
            case 'resource':
                throw new SendException('Values of type Resource cannot be transmitted on current Net version.');
            case 'NULL':
                throw new SendException('Null data type cannot be transmitted.');
            case 'unknown type':
                throw new SendException('Values of Unknown type cannot be transmitted on current Net version.');
            default:
                $flag = self::DATA_STRING;
        }
        return $flag;
    }
Выбирает флаг соотетствующий типу данных.

@param string $dataType

@return int
@throws SendException