@@ -49,11 +49,10 @@ public function add(NumberInterface $augend, NumberInterface ...$addends): Numbe
4949 $ sum = BigInteger::of ($ augend ->toString ());
5050
5151 foreach ($ addends as $ addend ) {
52- /** @phpstan-ignore possiblyImpure.methodCall */
5352 $ sum = $ sum ->plus ($ addend ->toString ());
5453 }
5554
56- /** @phpstan-ignore possiblyImpure.new, possiblyImpure.methodCall */
55+ /** @phpstan-ignore possiblyImpure.new */
5756 return new IntegerObject ((string ) $ sum );
5857 }
5958
@@ -62,11 +61,10 @@ public function subtract(NumberInterface $minuend, NumberInterface ...$subtrahen
6261 $ difference = BigInteger::of ($ minuend ->toString ());
6362
6463 foreach ($ subtrahends as $ subtrahend ) {
65- /** @phpstan-ignore possiblyImpure.methodCall */
6664 $ difference = $ difference ->minus ($ subtrahend ->toString ());
6765 }
6866
69- /** @phpstan-ignore possiblyImpure.new, possiblyImpure.methodCall */
67+ /** @phpstan-ignore possiblyImpure.new */
7068 return new IntegerObject ((string ) $ difference );
7169 }
7270
@@ -75,11 +73,10 @@ public function multiply(NumberInterface $multiplicand, NumberInterface ...$mult
7573 $ product = BigInteger::of ($ multiplicand ->toString ());
7674
7775 foreach ($ multipliers as $ multiplier ) {
78- /** @phpstan-ignore possiblyImpure.methodCall */
7976 $ product = $ product ->multipliedBy ($ multiplier ->toString ());
8077 }
8178
82- /** @phpstan-ignore possiblyImpure.new, possiblyImpure.methodCall */
79+ /** @phpstan-ignore possiblyImpure.new */
8380 return new IntegerObject ((string ) $ product );
8481 }
8582
@@ -95,23 +92,22 @@ public function divide(
9592 $ quotient = BigDecimal::of ($ dividend ->toString ());
9693
9794 foreach ($ divisors as $ divisor ) {
98- /** @phpstan-ignore possiblyImpure.methodCall */
9995 $ quotient = $ quotient ->dividedBy ($ divisor ->toString (), $ scale , $ brickRounding );
10096 }
10197
10298 if ($ scale === 0 ) {
103- /** @phpstan-ignore possiblyImpure.new, possiblyImpure.methodCall, possiblyImpure.methodCall */
99+ /** @phpstan-ignore possiblyImpure.new */
104100 return new IntegerObject ((string ) $ quotient ->toBigInteger ());
105101 }
106102
107- /** @phpstan-ignore possiblyImpure.new, possiblyImpure.methodCall */
103+ /** @phpstan-ignore possiblyImpure.new */
108104 return new Decimal ((string ) $ quotient );
109105 }
110106
111107 public function fromBase (string $ value , int $ base ): IntegerObject
112108 {
113109 try {
114- /** @phpstan-ignore possiblyImpure.new, possiblyImpure.methodCall */
110+ /** @phpstan-ignore possiblyImpure.new */
115111 return new IntegerObject ((string ) BigInteger::fromBase ($ value , $ base ));
116112 } catch (MathException | \InvalidArgumentException $ exception ) {
117113 throw new InvalidArgumentException (
@@ -125,7 +121,6 @@ public function fromBase(string $value, int $base): IntegerObject
125121 public function toBase (IntegerObject $ value , int $ base ): string
126122 {
127123 try {
128- /** @phpstan-ignore possiblyImpure.methodCall */
129124 return BigInteger::of ($ value ->toString ())->toBase ($ base );
130125 } catch (MathException | \InvalidArgumentException $ exception ) {
131126 throw new InvalidArgumentException (
0 commit comments