CoreFiles by mySites.guru
DivisionByZeroException.php41 lines, 874 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
838ea41e05c3de884927b8b19ed6e16f
sha1
c6ec4cb513e4c0e68b8601954f50b56b3d052777
sha256
a61a94b506db04a6c0048f14b6e53f563158e6e6767d8d914e2e4cf3c41a4ac4
<?php

declare(strict_types=1);

namespace Brick\Math\Exception;

/**
 * Exception thrown when a division by zero occurs.
 */
class DivisionByZeroException extends MathException
{
    /**
     * @return DivisionByZeroException
     *
     * @psalm-pure
     */
    public static function divisionByZero() : DivisionByZeroException
    {
        return new self('Division by zero.');
    }

    /**
     * @return DivisionByZeroException
     *
     * @psalm-pure
     */
    public static function modulusMustNotBeZero() : DivisionByZeroException
    {
        return new self('The modulus must not be zero.');
    }

    /**
     * @return DivisionByZeroException
     *
     * @psalm-pure
     */
    public static function denominatorMustNotBeZero() : DivisionByZeroException
    {
        return new self('The denominator of a rational number cannot be zero.');
    }
}

The same content is in 127 releases, Joomla 4.0.0-beta5 to 4.4.14. See them all, or every version of this file.