@@ -23,7 +23,7 @@ class DecimalTest extends TestCase
23
23
*
24
24
* @return void
25
25
*/
26
- public function testNewObject ($ value , string $ expected ): void
26
+ public function testNewObject (mixed $ value , string $ expected ): void
27
27
{
28
28
$ decimal = new Decimal ($ value );
29
29
$ this ->assertSame ($ expected , (string )$ decimal );
@@ -50,7 +50,7 @@ public function testNewObjectScientific(): void
50
50
*
51
51
* @return void
52
52
*/
53
- public function testCreate ($ value , string $ expected ): void
53
+ public function testCreate (mixed $ value , string $ expected ): void
54
54
{
55
55
$ decimal = Decimal::create ($ value );
56
56
$ this ->assertSame ($ expected , (string )$ decimal );
@@ -110,7 +110,7 @@ public function __toString(): string
110
110
*
111
111
* @return void
112
112
*/
113
- public function testNewObjectWithInvalidValueThrowsException ($ value ): void
113
+ public function testNewObjectWithInvalidValueThrowsException (mixed $ value ): void
114
114
{
115
115
$ this ->expectException (InvalidArgumentException::class);
116
116
@@ -138,7 +138,7 @@ public static function invalidValuesProvider(): array
138
138
*
139
139
* @return void
140
140
*/
141
- public function testTruncate ($ input , int $ scale , string $ expected ): void
141
+ public function testTruncate (mixed $ input , int $ scale , string $ expected ): void
142
142
{
143
143
$ decimal = Decimal::create ($ input );
144
144
$ this ->assertSame ($ expected , (string )$ decimal ->truncate ($ scale ));
@@ -167,7 +167,7 @@ public static function truncateProvider(): array
167
167
*
168
168
* @return void
169
169
*/
170
- public function testIsInteger ($ value , bool $ expected ): void
170
+ public function testIsInteger (mixed $ value , bool $ expected ): void
171
171
{
172
172
$ decimal = Decimal::create ($ value );
173
173
$ this ->assertSame ($ expected , $ decimal ->isInteger ());
@@ -200,7 +200,7 @@ public static function integerProvider(): array
200
200
*
201
201
* @return void
202
202
*/
203
- public function testIsZero ($ value , bool $ expected ): void
203
+ public function testIsZero (mixed $ value , bool $ expected ): void
204
204
{
205
205
$ decimal = Decimal::create ($ value );
206
206
$ this ->assertSame ($ expected , $ decimal ->isZero ());
@@ -232,7 +232,7 @@ public static function zeroProvider(): array
232
232
*
233
233
* @return void
234
234
*/
235
- public function testIsPositive ($ input , int $ expected ): void
235
+ public function testIsPositive (mixed $ input , int $ expected ): void
236
236
{
237
237
$ decimal = Decimal::create ($ input );
238
238
$ this ->assertSame ($ expected > 0 , $ decimal ->isPositive ());
@@ -246,7 +246,7 @@ public function testIsPositive($input, int $expected): void
246
246
*
247
247
* @return void
248
248
*/
249
- public function testIsNegative ($ input , int $ expected ): void
249
+ public function testIsNegative (mixed $ input , int $ expected ): void
250
250
{
251
251
$ decimal = Decimal::create ($ input );
252
252
$ this ->assertSame ($ expected < 0 , $ decimal ->isNegative ());
@@ -281,7 +281,7 @@ public static function compareZeroProvider(): array
281
281
*
282
282
* @return void
283
283
*/
284
- public function testScale ($ input , int $ expected ): void
284
+ public function testScale (mixed $ input , int $ expected ): void
285
285
{
286
286
$ decimal = Decimal::create ($ input );
287
287
$ this ->assertSame ($ expected , $ decimal ->scale ());
@@ -313,7 +313,7 @@ public static function scaleProvider(): array
313
313
*
314
314
* @return void
315
315
*/
316
- public function testToScientific ($ value , string $ expected ): void
316
+ public function testToScientific (mixed $ value , string $ expected ): void
317
317
{
318
318
$ decimal = Decimal::create ($ value );
319
319
$ this ->assertSame ($ expected , $ decimal ->toScientific ());
@@ -583,7 +583,7 @@ public function testEquals(): void
583
583
*
584
584
* @return void
585
585
*/
586
- public function testRound ($ value , int $ scale , string $ expected ): void
586
+ public function testRound (mixed $ value , int $ scale , string $ expected ): void
587
587
{
588
588
$ decimal = Decimal::create ($ value );
589
589
$ this ->assertSame ($ expected , (string )$ decimal ->round ($ scale ));
@@ -598,7 +598,7 @@ public function testRound($value, int $scale, string $expected): void
598
598
*
599
599
* @return void
600
600
*/
601
- protected function assertNativeRound (string $ expected , $ value , int $ scale , int $ roundMode ): void
601
+ protected function assertNativeRound (string $ expected , mixed $ value , int $ scale , int $ roundMode ): void
602
602
{
603
603
$ this ->assertSame ((new Decimal ($ expected ))->trim ()->toString (), (string )round ($ value , $ scale , $ roundMode ));
604
604
}
@@ -634,7 +634,7 @@ public static function roundProvider(): array
634
634
*
635
635
* @return void
636
636
*/
637
- public function testFloor ($ value , string $ expected ): void
637
+ public function testFloor (mixed $ value , string $ expected ): void
638
638
{
639
639
$ decimal = Decimal::create ($ value );
640
640
$ this ->assertSame ($ expected , (string )$ decimal ->floor ());
@@ -647,7 +647,7 @@ public function testFloor($value, string $expected): void
647
647
*
648
648
* @return void
649
649
*/
650
- protected function assertNativeFloor (string $ expected , $ value ): void
650
+ protected function assertNativeFloor (string $ expected , mixed $ value ): void
651
651
{
652
652
$ this ->assertSame ($ expected , (string )floor ($ value ));
653
653
}
@@ -681,7 +681,7 @@ public static function floorProvider(): array
681
681
*
682
682
* @return void
683
683
*/
684
- public function testCeil ($ value , string $ expected ): void
684
+ public function testCeil (mixed $ value , string $ expected ): void
685
685
{
686
686
$ decimal = Decimal::create ($ value );
687
687
$ this ->assertSame ($ expected , (string )$ decimal ->ceil ());
@@ -694,7 +694,7 @@ public function testCeil($value, string $expected): void
694
694
*
695
695
* @return void
696
696
*/
697
- protected function assertNativeCeil (string $ expected , $ value ): void
697
+ protected function assertNativeCeil (string $ expected , mixed $ value ): void
698
698
{
699
699
$ this ->assertSame ($ expected , (string )ceil ($ value ));
700
700
}
@@ -729,7 +729,7 @@ public static function ceilProvider(): array
729
729
*
730
730
* @return void
731
731
*/
732
- public function testGreaterThan ($ a , $ b , int $ expected ): void
732
+ public function testGreaterThan (mixed $ a , mixed $ b , int $ expected ): void
733
733
{
734
734
$ decimal = Decimal::create ($ a );
735
735
$ this ->assertSame ($ expected > 0 , $ decimal ->greaterThan ($ b ));
@@ -744,7 +744,7 @@ public function testGreaterThan($a, $b, int $expected): void
744
744
*
745
745
* @return void
746
746
*/
747
- public function testLessThan ($ a , $ b , int $ expected ): void
747
+ public function testLessThan (mixed $ a , mixed $ b , int $ expected ): void
748
748
{
749
749
$ decimal = Decimal::create ($ a );
750
750
$ this ->assertSame ($ expected < 0 , $ decimal ->lessThan ($ b ));
@@ -759,7 +759,7 @@ public function testLessThan($a, $b, int $expected): void
759
759
*
760
760
* @return void
761
761
*/
762
- public function testGreaterEquals ($ a , $ b , int $ expected ): void
762
+ public function testGreaterEquals (mixed $ a , mixed $ b , int $ expected ): void
763
763
{
764
764
$ decimal = Decimal::create ($ a );
765
765
$ this ->assertSame ($ expected >= 0 , $ decimal ->greaterThanOrEquals ($ b ));
@@ -774,7 +774,7 @@ public function testGreaterEquals($a, $b, int $expected): void
774
774
*
775
775
* @return void
776
776
*/
777
- public function testLessEquals ($ a , $ b , int $ expected ): void
777
+ public function testLessEquals (mixed $ a , mixed $ b , int $ expected ): void
778
778
{
779
779
$ decimal = Decimal::create ($ a );
780
780
$ this ->assertSame ($ expected <= 0 , $ decimal ->lessThanOrEquals ($ b ));
@@ -839,7 +839,7 @@ public function testSubtract(): void
839
839
*
840
840
* @return void
841
841
*/
842
- public function testMultiply ($ a , $ b , ?int $ scale , string $ expected ): void
842
+ public function testMultiply (mixed $ a , mixed $ b , ?int $ scale , string $ expected ): void
843
843
{
844
844
$ decimal = Decimal::create ($ a );
845
845
$ this ->assertSame ($ expected , (string )$ decimal ->multiply ($ b , $ scale ));
@@ -879,7 +879,7 @@ public static function multiplicationProvider(): array
879
879
*
880
880
* @return void
881
881
*/
882
- public function testMultiplyLegacy ($ a , $ b , ?int $ scale , string $ expected ): void
882
+ public function testMultiplyLegacy (mixed $ a , mixed $ b , ?int $ scale , string $ expected ): void
883
883
{
884
884
$ decimal = Decimal::create ($ a );
885
885
$ this ->assertSame ($ expected , (string )$ decimal ->multiply ($ b , $ scale ));
@@ -905,7 +905,7 @@ public static function multiplicationLegacyProvider(): array
905
905
*
906
906
* @return void
907
907
*/
908
- public function testDivide ($ a , $ b , int $ scale , string $ expected ): void
908
+ public function testDivide (mixed $ a , mixed $ b , int $ scale , string $ expected ): void
909
909
{
910
910
$ decimal = Decimal::create ($ a );
911
911
$ this ->assertSame ($ expected , (string )$ decimal ->divide ($ b , $ scale ));
0 commit comments