Skip to content

Commit

Permalink
Strict comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Oct 2, 2017
1 parent 3730eb8 commit 55431c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/BigDecimalTest.php
Expand Up @@ -1784,7 +1784,7 @@ public function testCompareTo($a, $b, $c)
*/
public function testIsEqualTo($a, $b, $c)
{
$this->assertSame($c == 0, BigDecimal::of($a)->isEqualTo($b));
$this->assertSame($c === 0, BigDecimal::of($a)->isEqualTo($b));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/BigIntegerTest.php
Expand Up @@ -1496,7 +1496,7 @@ public function testCompareTo($a, $b, $c)
*/
public function testIsEqualTo($a, $b, $c)
{
$this->assertSame($c == 0, BigInteger::of($a)->isEqualTo($b));
$this->assertSame($c === 0, BigInteger::of($a)->isEqualTo($b));
}

/**
Expand Down Expand Up @@ -1612,7 +1612,7 @@ public function testGetSign($number, $sign)
*/
public function testIsZero($number, $sign)
{
$this->assertSame($sign == 0, BigInteger::of($number)->isZero());
$this->assertSame($sign === 0, BigInteger::of($number)->isZero());
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/BigRationalTest.php
Expand Up @@ -554,7 +554,7 @@ public function testCompareTo($a, $b, $cmp)
*/
public function testIsEqualTo($a, $b, $cmp)
{
$this->assertSame($cmp == 0, BigRational::of($a)->isEqualTo($b));
$this->assertSame($cmp === 0, BigRational::of($a)->isEqualTo($b));
}

/**
Expand Down Expand Up @@ -658,7 +658,7 @@ public function testGetSign($number, $sign)
*/
public function testIsZero($number, $sign)
{
$this->assertSame($sign == 0, BigRational::of($number)->isZero());
$this->assertSame($sign === 0, BigRational::of($number)->isZero());
}

/**
Expand Down

0 comments on commit 55431c7

Please sign in to comment.