class ConstraintNearlyEqual extends BaseConstraint

Class ConstraintNearlyEqual

Methods

__construct($expression)

No description

bool
test( string $version, bool $strict = false)

Test if the version number is valid

string
normalize($version, $strict = false)

Normalize a version number in a version that will be used in version_compare

Details

at line 22
__construct($expression)

Parameters

$expression

in BaseConstraint at line 31
bool test( string $version, bool $strict = false)

Test if the version number is valid

Parameters

string $version the version number
bool $strict if false precision will be normalized. eg: 2.1.0 > 2.1 will become 2.1.0 > 2.1.0 (default false)

Return Value

bool true if the version is equal, otherwise false

at line 27
string normalize($version, $strict = false)

Normalize a version number in a version that will be used in version_compare

Parameters

$version
$strict

Return Value

string the normalized expression