static public function isValidMode($mode, $throw = true)
    {
        if (in_array($mode, static::getModes(), true)) {
            return true;
        }

        if ($throw) {
            throw new InvalidArgumentException('Invalid adjustment mode.');
        }

        return false;
    }
static public function isValidMode($mode, $throw = true)
    {
        if (in_array($mode, static::getModes(), true)) {
            return true;
        }

        if ($throw) {
            throw new InvalidArgumentException('Invalid adjustment mode.');
        }

        return false;
    }
static public function isValidMode ( $ mode , $ throw = true ) { if ( in_array ( $ mode , static :: getModes ( ) , true ) ) { return true ; } if ( $ throw ) { throw new InvalidArgumentException ( 'Invalid adjustment mode.' ) ; } return false ; }
Returns whether the given mode is valid or not.

@param string $mode
@param bool   $throw

@return bool
Returns whether the given mode is valid or not .