Skip to content

Commit dbc052f

Browse files
SemKoolensebastianbergmann
authored andcommitted
improved parameter names for asserts
1 parent c15a1d4 commit dbc052f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/Framework/Assert.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,21 +554,21 @@ final public static function assertNotEmpty(mixed $actual, string $message = '')
554554
*
555555
* @throws ExpectationFailedException
556556
*/
557-
final public static function assertGreaterThan(mixed $expected, mixed $actual, string $message = ''): void
557+
final public static function assertGreaterThan(mixed $minimum, mixed $actual, string $message = ''): void
558558
{
559-
self::assertThat($actual, self::greaterThan($expected), $message);
559+
self::assertThat($actual, self::greaterThan($minimum), $message);
560560
}
561561

562562
/**
563563
* Asserts that a value is greater than or equal to another value.
564564
*
565565
* @throws ExpectationFailedException
566566
*/
567-
final public static function assertGreaterThanOrEqual(mixed $expected, mixed $actual, string $message = ''): void
567+
final public static function assertGreaterThanOrEqual(mixed $minimum, mixed $actual, string $message = ''): void
568568
{
569569
self::assertThat(
570570
$actual,
571-
self::greaterThanOrEqual($expected),
571+
self::greaterThanOrEqual($minimum),
572572
$message,
573573
);
574574
}
@@ -578,19 +578,19 @@ final public static function assertGreaterThanOrEqual(mixed $expected, mixed $ac
578578
*
579579
* @throws ExpectationFailedException
580580
*/
581-
final public static function assertLessThan(mixed $expected, mixed $actual, string $message = ''): void
581+
final public static function assertLessThan(mixed $maximum, mixed $actual, string $message = ''): void
582582
{
583-
self::assertThat($actual, self::lessThan($expected), $message);
583+
self::assertThat($actual, self::lessThan($maximum), $message);
584584
}
585585

586586
/**
587587
* Asserts that a value is smaller than or equal to another value.
588588
*
589589
* @throws ExpectationFailedException
590590
*/
591-
final public static function assertLessThanOrEqual(mixed $expected, mixed $actual, string $message = ''): void
591+
final public static function assertLessThanOrEqual(mixed $maximum, mixed $actual, string $message = ''): void
592592
{
593-
self::assertThat($actual, self::lessThanOrEqual($expected), $message);
593+
self::assertThat($actual, self::lessThanOrEqual($maximum), $message);
594594
}
595595

596596
/**

src/Framework/Assert/Functions.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ function assertNotEmpty(mixed $actual, string $message = ''): void
576576
*
577577
* @see Assert::assertGreaterThan
578578
*/
579-
function assertGreaterThan(mixed $expected, mixed $actual, string $message = ''): void
579+
function assertGreaterThan(mixed $minimum, mixed $actual, string $message = ''): void
580580
{
581581
Assert::assertGreaterThan(...func_get_args());
582582
}
@@ -592,7 +592,7 @@ function assertGreaterThan(mixed $expected, mixed $actual, string $message = '')
592592
*
593593
* @see Assert::assertGreaterThanOrEqual
594594
*/
595-
function assertGreaterThanOrEqual(mixed $expected, mixed $actual, string $message = ''): void
595+
function assertGreaterThanOrEqual(mixed $minimum, mixed $actual, string $message = ''): void
596596
{
597597
Assert::assertGreaterThanOrEqual(...func_get_args());
598598
}
@@ -608,7 +608,7 @@ function assertGreaterThanOrEqual(mixed $expected, mixed $actual, string $messag
608608
*
609609
* @see Assert::assertLessThan
610610
*/
611-
function assertLessThan(mixed $expected, mixed $actual, string $message = ''): void
611+
function assertLessThan(mixed $maximum, mixed $actual, string $message = ''): void
612612
{
613613
Assert::assertLessThan(...func_get_args());
614614
}
@@ -624,7 +624,7 @@ function assertLessThan(mixed $expected, mixed $actual, string $message = ''): v
624624
*
625625
* @see Assert::assertLessThanOrEqual
626626
*/
627-
function assertLessThanOrEqual(mixed $expected, mixed $actual, string $message = ''): void
627+
function assertLessThanOrEqual(mixed $maximum, mixed $actual, string $message = ''): void
628628
{
629629
Assert::assertLessThanOrEqual(...func_get_args());
630630
}

0 commit comments

Comments
 (0)