public function setBit(int $ordinal, bool $bit): void
    {
        if ($ordinal < 0 || $ordinal > $this->enumerationCount) {
            throw new InvalidArgumentException("Ordinal number must be between 0 and {$this->enumerationCount}");
        }

        if ($bit) {
            $this->{$this->fnDoSetBit}($ordinal);
        } else {
            $this->{$this->fnDoUnsetBit}($ordinal);
        }
    }
public function setBit(int $ordinal, bool $bit): void
    {
        if ($ordinal < 0 || $ordinal > $this->enumerationCount) {
            throw new InvalidArgumentException("Ordinal number must be between 0 and {$this->enumerationCount}");
        }

        if ($bit) {
            $this->{$this->fnDoSetBit}($ordinal);
        } else {
            $this->{$this->fnDoUnsetBit}($ordinal);
        }
    }
public function setBit ( int $ ordinal , bool $ bit ) : void { if ( $ ordinal < 0 || $ ordinal > $ this -> enumerationCount ) { throw new InvalidArgumentException ( "Ordinal number must be between 0 and {$this->enumerationCount}" ) ; } if ( $ bit ) { $ this -> { $ this -> fnDoSetBit } ( $ ordinal ) ; } else { $ this -> { $ this -> fnDoUnsetBit } ( $ ordinal ) ; } }
Set a bit at the given ordinal number

@param int $ordinal Ordinal number of bit to set
@param bool $bit    The bit to set
@return void
@throws InvalidArgumentException If the given ordinal number is out-of-range
@uses doSetBitBin()
@uses doSetBitInt()
@uses doUnsetBitBin()
@uses doUnsetBitInt()
Set a bit at the given ordinal number