src/Chippyash/Math/Type/Traits/ArbitrateTwoTypes.php
protected function arbitrate(NumericTypeInterface $a, NumericTypeInterface $b)
    {
        $pairing = $this->getTypePairing($a, $b);
        if ($pairing == 'complex:complex') {
            return 'complex';
        }
        if (strpos($pairing, 'complex') === 0) {
            return 'complex:numeric';
        }
        if (strpos($pairing, 'complex') !== false) {
            return 'numeric:complex';
        }
        if (strstr($pairing, 'rational') !== false) {
            return 'rational';
        }
        if (strstr($pairing, 'float') !== false) {
            return 'float';
        }
        if (strstr($pairing, 'wholeint') !== false) {
            return 'whole';
        }
        if (strstr($pairing, 'naturalint') !== false) {
            return 'natural';
        }
        if ($pairing == 'int:int') {
            return 'int';
        }
    }
protected function arbitrate(NumericTypeInterface $a, NumericTypeInterface $b)
    {
        $pairing = $this->getTypePairing($a, $b);
        if ($pairing == 'complex:complex') {
            return 'complex';
        }
        if (strpos($pairing, 'complex') === 0) {
            return 'complex:numeric';
        }
        if (strpos($pairing, 'complex') !== false) {
            return 'numeric:complex';
        }
        if (strstr($pairing, 'rational') !== false) {
            return 'rational';
        }
        if (strstr($pairing, 'float') !== false) {
            return 'float';
        }
        if (strstr($pairing, 'wholeint') !== false) {
            return 'whole';
        }
        if (strstr($pairing, 'naturalint') !== false) {
            return 'natural';
        }
        if ($pairing == 'int:int') {
            return 'int';
        }
    }
protected function arbitrate ( NumericTypeInterface $ a , NumericTypeInterface $ b ) { $ pairing = $ this -> getTypePairing ( $ a , $ b ) ; if ( $ pairing == 'complex:complex' ) { return 'complex' ; } if ( strpos ( $ pairing , 'complex' ) === 0 ) { return 'complex:numeric' ; } if ( strpos ( $ pairing , 'complex' ) !== false ) { return 'numeric:complex' ; } if ( strstr ( $ pairing , 'rational' ) !== false ) { return 'rational' ; } if ( strstr ( $ pairing , 'float' ) !== false ) { return 'float' ; } if ( strstr ( $ pairing , 'wholeint' ) !== false ) { return 'whole' ; } if ( strstr ( $ pairing , 'naturalint' ) !== false ) { return 'natural' ; } if ( $ pairing == 'int:int' ) { return 'int' ; } }
Arbitrate the return type from the operation

@param NumericTypeInterface $a first type
@param NumericTypeInterface $b second type

@return string

@noinspection PhpInconsistentReturnPointsInspection
Arbitrate the return type from the operation