Skip to content

Commit

Permalink
Cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Nov 9, 2020
1 parent a9df4e5 commit 77b3c08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/Isbn.php
Expand Up @@ -303,12 +303,12 @@ public function format() : string
}

/**
* Check if $this is equal to another ISBN. As both ISBN are converted to ISBN-13,
* an ISBN-10 is considered equal to its corresponsing ISBN-13. In conclusion,
* Isbn::of('978-0-399-16534-4')->isEqualTo("0-399-16534-7") returns true.
*
* Checks if this ISBN is equal to another ISBN.
*
* An ISBN-10 is considered equal to its corresponding ISBN-13.
* For example, `Isbn::of('978-0-399-16534-4')->isEqualTo("0-399-16534-7")` returns true.
*/
public function isEqualTo(self $otherIsbn) : bool
public function isEqualTo(Isbn $otherIsbn) : bool
{
return $this->to13()->isbn === $otherIsbn->to13()->isbn;
}
Expand Down
6 changes: 3 additions & 3 deletions tests/IsbnTest.php
Expand Up @@ -357,12 +357,12 @@ private function assertException(string $expectedException, callable $function)
/**
* @dataProvider providerIsEqualTo
*
* @param string $isbn Any ISBN.
* @param string $isbn Any ISBN.
* @param string $anotherIsbn The ISBN-10 that is expected to be equal to $isbn.
*/
public function testIsbnIsEqualTo(string $isbn, string $anotherIsbn, bool $isEqual) : void
public function testIsEqualTo(string $isbn, string $anotherIsbn, bool $isEqual) : void
{
$this->assertTrue(Isbn::of($isbn)->isEqualTo(Isbn::of($anotherIsbn)) === $isEqual);
$this->assertSame($isEqual, Isbn::of($isbn)->isEqualTo(Isbn::of($anotherIsbn)));
}

/**
Expand Down

0 comments on commit 77b3c08

Please sign in to comment.