function Intervals::get
Creates an array of numeric intervals and branch constraints representing a given constraint
if the returned numeric array is empty it means the constraint matches nothing in the numeric range (0 - +inf) if the returned branches array is empty it means no dev-* versions are matched if a constraint matches all possible dev-* versions, branches will contain Interval::anyDev()
@phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
Return value
array
4 calls to Intervals::get()
- IgnoreListPlatformRequirementFilter::filterConstraint in vendor/
composer/ composer/ src/ Composer/ Filter/ PlatformRequirementFilter/ IgnoreListPlatformRequirementFilter.php - Intervals::generateIntervals in vendor/
composer/ semver/ src/ Intervals.php - @phpstan-return array{'numeric': Interval[], 'branches': array{'names': string[], 'exclude': bool}}
- Intervals::isSubsetOf in vendor/
composer/ semver/ src/ Intervals.php - Checks whether $candidate is a subset of $constraint
- VersionBumper::bumpRequirement in vendor/
composer/ composer/ src/ Composer/ Package/ Version/ VersionBumper.php - Given a constraint, this returns a new constraint with the lower bound bumped to match the given package's version.
File
-
vendor/
composer/ semver/ src/ Intervals.php, line 272
Class
- Intervals
- Helper class generating intervals from constraints
Namespace
Composer\SemverCode
public static function get(ConstraintInterface $constraint) {
$key = (string) $constraint;
if (!isset(self::$intervalsCache[$key])) {
self::$intervalsCache[$key] = self::generateIntervals($constraint);
}
return self::$intervalsCache[$key];
}