Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Tests/VersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

////////////////////////////////////////////////////////////////////////////
Expand All @@ -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));
}

////////////////////////////////////////////////////////////////////////////
Expand All @@ -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));
}

////////////////////////////////////////////////////////////////////////////
Expand All @@ -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));
}

////////////////////////////////////////////////////////////////////////////
Expand All @@ -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));
}
}
10 changes: 5 additions & 5 deletions Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down