YetiForceCompany/YetiForcePDF

View on GitHub
lib/Math.php

Summary

Maintainability
A
35 mins
Test Coverage

Function div has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function div(string ...$numbers)
    {
        if (!isset($numbers[2])) {
            if ((float) $numbers[0] !== (float) 0 && (float) $numbers[1] !== (float) 0) {
                return bcdiv($numbers[0], $numbers[1], static::$scale);
Severity: Minor
Found in lib/Math.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Reduce the number of returns of this function 4, down to the maximum allowed 3.
Open

    public static function div(string ...$numbers)
Severity: Major
Found in lib/Math.php by sonar-php

Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

Noncompliant Code Example

With the default threshold of 3:

function myFunction(){ // Noncompliant as there are 4 return statements
  if (condition1) {
    return true;
  } else {
    if (condition2) {
      return false;
    } else {
      return true;
    }
  }
  return false;
}

The method setAccurate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            static::$scale = static::$standardScale;
        }
Severity: Minor
Found in lib/Math.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

Spaces must be used to indent lines; tabs are not allowed
Open

     * Standard scale = precision.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var int
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if ($accurate) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $result = $numbers[0];
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $result = '1';
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var int
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * High scale for more accurate calculations when needed (ratio for example).
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param bool $accurate
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        } else {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string[] $numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!isset($numbers[2])) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static $highScale = 6;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static $standardScale = 2;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $result;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $result;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Subtract two numbers.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        for ($i = 1,$len = \count($numbers); $i < $len; ++$i) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return mixed|string
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $result;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return '0';
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                return '0';
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $result;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $result = 1 === bccomp($result, $numbers[$i], static::$scale) ? $numbers[$i] : $result;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $percent
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return mixed|string
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        for ($i = 1,$len = \count($numbers); $i < $len; ++$i) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function comp(string $left, string $right)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Get min number.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            static::$scale = static::$standardScale;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $result = '0';
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function div(string ...$numbers)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        for ($i = 1,$len = \count($numbers); $i < $len; ++$i) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static $scale = 2;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Add two numbers.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @params string[] $numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!isset($numbers[2])) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $right
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function percent(string $percent, string $from)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Current scale = precision.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Set more accurate calculation.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return bcsub($numbers[0], $numbers[1], static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Multiply numbers.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string[] $numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            if ((float) $numbers[$i] === (float) 0) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string ...$numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            static::$scale = static::$highScale;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($numbers as $number) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($numbers as $number) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return bcadd($numbers[0], $numbers[1], static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($numbers as $number) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $result;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $result;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return static::mul(static::div($from, '100'), $percent);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function setAccurate(bool $accurate)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!isset($numbers[2])) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string[] $numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            if ((float) $numbers[0] !== (float) 0 && (float) $numbers[1] !== (float) 0) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $result = bcdiv($result, $numbers[$i], static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string ...$numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Get percent from value.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!isset($numbers[2])) {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $result = '0';
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function min(string ...$numbers)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function mul(string ...$numbers)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @params string[] $numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @var int
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $result = bcadd($result, $number, static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @params string[] $numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $result = bcsub($result, $numbers[$i], static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $result = bcmul($result, $number, static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return bccomp($left, $right, static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function add(string ...$numbers)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string[] $numbers
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function sub(string ...$numbers)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return bcmul($numbers[0], $numbers[1], static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Divide two numbers.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $left
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $result = 1 === bccomp($number, $result, static::$scale) ? $number : $result;
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string $from
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $percent = trim($percent, '%');
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Compare two numbers.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $result = $numbers[0];
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

                return bcdiv($numbers[0], $numbers[1], static::$scale);
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $result = $numbers[0];
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Get max number.
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function max(string ...$numbers)
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in lib/Math.php by phpcodesniffer

There are no issues that match your filters.

Category
Status