Skip to content

Commit a949e58

Browse files
committed
Cleanup.
1 parent 2e9dabf commit a949e58

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

tests/DecimalTest.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class DecimalTest extends TestCase
2323
*
2424
* @return void
2525
*/
26-
public function testNewObject($value, string $expected): void
26+
public function testNewObject(mixed $value, string $expected): void
2727
{
2828
$decimal = new Decimal($value);
2929
$this->assertSame($expected, (string)$decimal);
@@ -50,7 +50,7 @@ public function testNewObjectScientific(): void
5050
*
5151
* @return void
5252
*/
53-
public function testCreate($value, string $expected): void
53+
public function testCreate(mixed $value, string $expected): void
5454
{
5555
$decimal = Decimal::create($value);
5656
$this->assertSame($expected, (string)$decimal);
@@ -110,7 +110,7 @@ public function __toString(): string
110110
*
111111
* @return void
112112
*/
113-
public function testNewObjectWithInvalidValueThrowsException($value): void
113+
public function testNewObjectWithInvalidValueThrowsException(mixed $value): void
114114
{
115115
$this->expectException(InvalidArgumentException::class);
116116

@@ -138,7 +138,7 @@ public static function invalidValuesProvider(): array
138138
*
139139
* @return void
140140
*/
141-
public function testTruncate($input, int $scale, string $expected): void
141+
public function testTruncate(mixed $input, int $scale, string $expected): void
142142
{
143143
$decimal = Decimal::create($input);
144144
$this->assertSame($expected, (string)$decimal->truncate($scale));
@@ -167,7 +167,7 @@ public static function truncateProvider(): array
167167
*
168168
* @return void
169169
*/
170-
public function testIsInteger($value, bool $expected): void
170+
public function testIsInteger(mixed $value, bool $expected): void
171171
{
172172
$decimal = Decimal::create($value);
173173
$this->assertSame($expected, $decimal->isInteger());
@@ -200,7 +200,7 @@ public static function integerProvider(): array
200200
*
201201
* @return void
202202
*/
203-
public function testIsZero($value, bool $expected): void
203+
public function testIsZero(mixed $value, bool $expected): void
204204
{
205205
$decimal = Decimal::create($value);
206206
$this->assertSame($expected, $decimal->isZero());
@@ -232,7 +232,7 @@ public static function zeroProvider(): array
232232
*
233233
* @return void
234234
*/
235-
public function testIsPositive($input, int $expected): void
235+
public function testIsPositive(mixed $input, int $expected): void
236236
{
237237
$decimal = Decimal::create($input);
238238
$this->assertSame($expected > 0, $decimal->isPositive());
@@ -246,7 +246,7 @@ public function testIsPositive($input, int $expected): void
246246
*
247247
* @return void
248248
*/
249-
public function testIsNegative($input, int $expected): void
249+
public function testIsNegative(mixed $input, int $expected): void
250250
{
251251
$decimal = Decimal::create($input);
252252
$this->assertSame($expected < 0, $decimal->isNegative());
@@ -281,7 +281,7 @@ public static function compareZeroProvider(): array
281281
*
282282
* @return void
283283
*/
284-
public function testScale($input, int $expected): void
284+
public function testScale(mixed $input, int $expected): void
285285
{
286286
$decimal = Decimal::create($input);
287287
$this->assertSame($expected, $decimal->scale());
@@ -313,7 +313,7 @@ public static function scaleProvider(): array
313313
*
314314
* @return void
315315
*/
316-
public function testToScientific($value, string $expected): void
316+
public function testToScientific(mixed $value, string $expected): void
317317
{
318318
$decimal = Decimal::create($value);
319319
$this->assertSame($expected, $decimal->toScientific());
@@ -583,7 +583,7 @@ public function testEquals(): void
583583
*
584584
* @return void
585585
*/
586-
public function testRound($value, int $scale, string $expected): void
586+
public function testRound(mixed $value, int $scale, string $expected): void
587587
{
588588
$decimal = Decimal::create($value);
589589
$this->assertSame($expected, (string)$decimal->round($scale));
@@ -598,7 +598,7 @@ public function testRound($value, int $scale, string $expected): void
598598
*
599599
* @return void
600600
*/
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
602602
{
603603
$this->assertSame((new Decimal($expected))->trim()->toString(), (string)round($value, $scale, $roundMode));
604604
}
@@ -634,7 +634,7 @@ public static function roundProvider(): array
634634
*
635635
* @return void
636636
*/
637-
public function testFloor($value, string $expected): void
637+
public function testFloor(mixed $value, string $expected): void
638638
{
639639
$decimal = Decimal::create($value);
640640
$this->assertSame($expected, (string)$decimal->floor());
@@ -647,7 +647,7 @@ public function testFloor($value, string $expected): void
647647
*
648648
* @return void
649649
*/
650-
protected function assertNativeFloor(string $expected, $value): void
650+
protected function assertNativeFloor(string $expected, mixed $value): void
651651
{
652652
$this->assertSame($expected, (string)floor($value));
653653
}
@@ -681,7 +681,7 @@ public static function floorProvider(): array
681681
*
682682
* @return void
683683
*/
684-
public function testCeil($value, string $expected): void
684+
public function testCeil(mixed $value, string $expected): void
685685
{
686686
$decimal = Decimal::create($value);
687687
$this->assertSame($expected, (string)$decimal->ceil());
@@ -694,7 +694,7 @@ public function testCeil($value, string $expected): void
694694
*
695695
* @return void
696696
*/
697-
protected function assertNativeCeil(string $expected, $value): void
697+
protected function assertNativeCeil(string $expected, mixed $value): void
698698
{
699699
$this->assertSame($expected, (string)ceil($value));
700700
}
@@ -729,7 +729,7 @@ public static function ceilProvider(): array
729729
*
730730
* @return void
731731
*/
732-
public function testGreaterThan($a, $b, int $expected): void
732+
public function testGreaterThan(mixed $a, mixed $b, int $expected): void
733733
{
734734
$decimal = Decimal::create($a);
735735
$this->assertSame($expected > 0, $decimal->greaterThan($b));
@@ -744,7 +744,7 @@ public function testGreaterThan($a, $b, int $expected): void
744744
*
745745
* @return void
746746
*/
747-
public function testLessThan($a, $b, int $expected): void
747+
public function testLessThan(mixed $a, mixed $b, int $expected): void
748748
{
749749
$decimal = Decimal::create($a);
750750
$this->assertSame($expected < 0, $decimal->lessThan($b));
@@ -759,7 +759,7 @@ public function testLessThan($a, $b, int $expected): void
759759
*
760760
* @return void
761761
*/
762-
public function testGreaterEquals($a, $b, int $expected): void
762+
public function testGreaterEquals(mixed $a, mixed $b, int $expected): void
763763
{
764764
$decimal = Decimal::create($a);
765765
$this->assertSame($expected >= 0, $decimal->greaterThanOrEquals($b));
@@ -774,7 +774,7 @@ public function testGreaterEquals($a, $b, int $expected): void
774774
*
775775
* @return void
776776
*/
777-
public function testLessEquals($a, $b, int $expected): void
777+
public function testLessEquals(mixed $a, mixed $b, int $expected): void
778778
{
779779
$decimal = Decimal::create($a);
780780
$this->assertSame($expected <= 0, $decimal->lessThanOrEquals($b));
@@ -839,7 +839,7 @@ public function testSubtract(): void
839839
*
840840
* @return void
841841
*/
842-
public function testMultiply($a, $b, ?int $scale, string $expected): void
842+
public function testMultiply(mixed $a, mixed $b, ?int $scale, string $expected): void
843843
{
844844
$decimal = Decimal::create($a);
845845
$this->assertSame($expected, (string)$decimal->multiply($b, $scale));
@@ -879,7 +879,7 @@ public static function multiplicationProvider(): array
879879
*
880880
* @return void
881881
*/
882-
public function testMultiplyLegacy($a, $b, ?int $scale, string $expected): void
882+
public function testMultiplyLegacy(mixed $a, mixed $b, ?int $scale, string $expected): void
883883
{
884884
$decimal = Decimal::create($a);
885885
$this->assertSame($expected, (string)$decimal->multiply($b, $scale));
@@ -905,7 +905,7 @@ public static function multiplicationLegacyProvider(): array
905905
*
906906
* @return void
907907
*/
908-
public function testDivide($a, $b, int $scale, string $expected): void
908+
public function testDivide(mixed $a, mixed $b, int $scale, string $expected): void
909909
{
910910
$decimal = Decimal::create($a);
911911
$this->assertSame($expected, (string)$decimal->divide($b, $scale));

0 commit comments

Comments
 (0)