src/Money.php
private function assertRoundingMode($roundingMode)
    {
        if (!in_array(
            $roundingMode, [
                self::ROUND_HALF_DOWN, self::ROUND_HALF_EVEN, self::ROUND_HALF_ODD,
                self::ROUND_HALF_UP, self::ROUND_UP, self::ROUND_DOWN,
                self::ROUND_HALF_POSITIVE_INFINITY, self::ROUND_HALF_NEGATIVE_INFINITY,
            ], true
        )) {
            throw new \InvalidArgumentException(
                'Rounding mode should be Money::ROUND_HALF_DOWN | '.
                'Money::ROUND_HALF_EVEN | Money::ROUND_HALF_ODD | '.
                'Money::ROUND_HALF_UP | Money::ROUND_UP | Money::ROUND_DOWN'.
                'Money::ROUND_HALF_POSITIVE_INFINITY | Money::ROUND_HALF_NEGATIVE_INFINITY'
            );
        }
    }
private function assertRoundingMode($roundingMode)
    {
        if (!in_array(
            $roundingMode, [
                self::ROUND_HALF_DOWN, self::ROUND_HALF_EVEN, self::ROUND_HALF_ODD,
                self::ROUND_HALF_UP, self::ROUND_UP, self::ROUND_DOWN,
                self::ROUND_HALF_POSITIVE_INFINITY, self::ROUND_HALF_NEGATIVE_INFINITY,
            ], true
        )) {
            throw new \InvalidArgumentException(
                'Rounding mode should be Money::ROUND_HALF_DOWN | '.
                'Money::ROUND_HALF_EVEN | Money::ROUND_HALF_ODD | '.
                'Money::ROUND_HALF_UP | Money::ROUND_UP | Money::ROUND_DOWN'.
                'Money::ROUND_HALF_POSITIVE_INFINITY | Money::ROUND_HALF_NEGATIVE_INFINITY'
            );
        }
    }
private function assertRoundingMode ( $ roundingMode ) { if ( ! in_array ( $ roundingMode , [ self :: ROUND_HALF_DOWN , self :: ROUND_HALF_EVEN , self :: ROUND_HALF_ODD , self :: ROUND_HALF_UP , self :: ROUND_UP , self :: ROUND_DOWN , self :: ROUND_HALF_POSITIVE_INFINITY , self :: ROUND_HALF_NEGATIVE_INFINITY , ] , true ) ) { throw new \ InvalidArgumentException ( 'Rounding mode should be Money::ROUND_HALF_DOWN | ' . 'Money::ROUND_HALF_EVEN | Money::ROUND_HALF_ODD | ' . 'Money::ROUND_HALF_UP | Money::ROUND_UP | Money::ROUND_DOWN' . 'Money::ROUND_HALF_POSITIVE_INFINITY | Money::ROUND_HALF_NEGATIVE_INFINITY' ) ; } }
Asserts that rounding mode is a valid integer value.

@param int $roundingMode

@throws \InvalidArgumentException If $roundingMode is not valid
Asserts that rounding mode is a valid integer value .