@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | $address = ++self::$lastAddress; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - self::$collection[$address] = &$value; |
|
| 65 | - ++self::$entriesCount; |
|
| 64 | + self::$collection[$address] = &$value;++self::$entriesCount; |
|
| 66 | 65 | |
| 67 | 66 | return $address; |
| 68 | 67 | } |
@@ -91,7 +90,6 @@ discard block |
||
| 91 | 90 | return; |
| 92 | 91 | } |
| 93 | 92 | |
| 94 | - unset(self::$collection[$id]); |
|
| 95 | - --self::$entriesCount; |
|
| 93 | + unset(self::$collection[$id]);--self::$entriesCount; |
|
| 96 | 94 | } |
| 97 | 95 | } |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | return strval( |
| 32 | - !$precision ? (intval($leftOperand) + intval($rightOperand)) : |
|
| 33 | - round(floatval($leftOperand) + floatval($rightOperand), $precision, PHP_ROUND_HALF_UP) |
|
| 32 | + !$precision ? (intval($leftOperand) + intval($rightOperand)) : round(floatval($leftOperand) + floatval($rightOperand), $precision, PHP_ROUND_HALF_UP) |
|
| 34 | 33 | ); |
| 35 | 34 | } |
| 36 | 35 | |
@@ -54,8 +53,7 @@ discard block |
||
| 54 | 53 | } |
| 55 | 54 | |
| 56 | 55 | return strval( |
| 57 | - !$precision ? (intval($leftOperand) - intval($rightOperand)) : |
|
| 58 | - round($leftOperand - $rightOperand, $precision, PHP_ROUND_HALF_UP) |
|
| 56 | + !$precision ? (intval($leftOperand) - intval($rightOperand)) : round($leftOperand - $rightOperand, $precision, PHP_ROUND_HALF_UP) |
|
| 59 | 57 | ); |
| 60 | 58 | } |
| 61 | 59 | |
@@ -79,8 +77,7 @@ discard block |
||
| 79 | 77 | } |
| 80 | 78 | |
| 81 | 79 | return strval( |
| 82 | - !$precision ? (intval($leftOperand) / intval($rightOperand)) : |
|
| 83 | - round($leftOperand / $rightOperand, $precision, PHP_ROUND_HALF_UP) |
|
| 80 | + !$precision ? (intval($leftOperand) / intval($rightOperand)) : round($leftOperand / $rightOperand, $precision, PHP_ROUND_HALF_UP) |
|
| 84 | 81 | ); |
| 85 | 82 | } |
| 86 | 83 | |
@@ -104,8 +101,7 @@ discard block |
||
| 104 | 101 | } |
| 105 | 102 | |
| 106 | 103 | return strval( |
| 107 | - !$precision ? (intval($leftOperand) * intval($rightOperand)) : |
|
| 108 | - round($leftOperand * $rightOperand, $precision, PHP_ROUND_HALF_UP) |
|
| 104 | + !$precision ? (intval($leftOperand) * intval($rightOperand)) : round($leftOperand * $rightOperand, $precision, PHP_ROUND_HALF_UP) |
|
| 109 | 105 | ); |
| 110 | 106 | } |
| 111 | 107 | |
@@ -252,7 +248,7 @@ discard block |
||
| 252 | 248 | return $this->getNonPrecisionResult('gmp_fact', $operand); |
| 253 | 249 | } |
| 254 | 250 | |
| 255 | - $factorial = function (string $num) use (&$factorial) { |
|
| 251 | + $factorial = function(string $num) use (&$factorial) { |
|
| 256 | 252 | if ($num < 2) { |
| 257 | 253 | return 1; |
| 258 | 254 | } |
@@ -277,7 +273,7 @@ discard block |
||
| 277 | 273 | return $this->getNonPrecisionResult('gmp_gcd', $leftOperand, $rightOperand); |
| 278 | 274 | } |
| 279 | 275 | |
| 280 | - $gcd = function (string $a, string $b) use (&$gcd) { |
|
| 276 | + $gcd = function(string $a, string $b) use (&$gcd) { |
|
| 281 | 277 | return $b > .01 ? $gcd($b, fmod($a, $b)) : $a; |
| 282 | 278 | }; |
| 283 | 279 | |