diff --git a/Tests/VersionTest.php b/Tests/VersionTest.php index 5a74ed3..9b5253b 100644 --- a/Tests/VersionTest.php +++ b/Tests/VersionTest.php @@ -223,10 +223,10 @@ public function testEquals() { $current = new Version(1, 0, 0); $other = new Version(1, 0, 0); - static::assertEquals(true, $other->equals($current)); + static::assertEquals(true, $other->isEquals($current)); $current = new Version(1, 1, 0); $other = new Version(1, 0, 0); - static::assertEquals(false, $other->equals($current)); + static::assertEquals(false, $other->isEquals($current)); } //////////////////////////////////////////////////////////////////////////// @@ -236,8 +236,8 @@ public function testGreaterThan() { $current = new Version(1, 0, 0); $other = new Version(1, 1, 0); - static::assertEquals(false, $current->greaterThan($other)); - static::assertEquals(true, $other->greaterThan($current)); + static::assertEquals(false, $current->isGreaterThan($other)); + static::assertEquals(true, $other->isGreaterThan($current)); } //////////////////////////////////////////////////////////////////////////// @@ -247,8 +247,8 @@ public function testGreaterThanOrEqual() { $current = new Version(1, 0, 0); $other = new Version(1, 1, 0); - static::assertEquals(false, $current->greaterThanOrEqual($other)); - static::assertEquals(true, $other->greaterThanOrEqual($current)); + static::assertEquals(false, $current->isGreaterThanOrEqual($other)); + static::assertEquals(true, $other->isGreaterThanOrEqual($current)); } //////////////////////////////////////////////////////////////////////////// @@ -258,8 +258,8 @@ public function testLessThan() { $current = new Version(1, 0, 0); $other = new Version(1, 1, 0); - static::assertEquals(true, $current->lessThan($other)); - static::assertEquals(false, $other->lessThan($current)); + static::assertEquals(true, $current->isLessThan($other)); + static::assertEquals(false, $other->isLessThan($current)); } //////////////////////////////////////////////////////////////////////////// @@ -269,7 +269,7 @@ public function testLessThanOrEqual() { $current = new Version(1, 0, 0); $other = new Version(1, 1, 0); - static::assertEquals(true, $current->lessThanOrEqual($other)); - static::assertEquals(false, $other->lessThanOrEqual($current)); + static::assertEquals(true, $current->isLessThanOrEqual($other)); + static::assertEquals(false, $other->isLessThanOrEqual($current)); } } diff --git a/Version.php b/Version.php index 63b4eb3..4b0f462 100644 --- a/Version.php +++ b/Version.php @@ -151,7 +151,7 @@ public function getBuild() : string * * @return bool */ - public function equals(Version $other) : bool + public function isEquals(Version $other) : bool { return 0 === VersionComparator::compare($this, $other); } @@ -161,7 +161,7 @@ public function equals(Version $other) : bool * * @return bool */ - public function greaterThan(Version $other) : bool + public function isGreaterThan(Version $other) : bool { return 1 === VersionComparator::compare($this, $other); } @@ -171,7 +171,7 @@ public function greaterThan(Version $other) : bool * * @return bool */ - public function greaterThanOrEqual(Version $other) : bool + public function isGreaterThanOrEqual(Version $other) : bool { return 0 <= VersionComparator::compare($this, $other); } @@ -181,7 +181,7 @@ public function greaterThanOrEqual(Version $other) : bool * * @return bool */ - public function lessThan(Version $other) : bool + public function isLessThan(Version $other) : bool { return -1 === VersionComparator::compare($this, $other); } @@ -191,7 +191,7 @@ public function lessThan(Version $other) : bool * * @return bool */ - public function lessThanOrEqual(Version $other) : bool + public function isLessThanOrEqual(Version $other) : bool { return 0 >= VersionComparator::compare($this, $other); }