Documentation

CompilingMatcher
in package

Helper class to evaluate constraint by compiling and reusing the code to evaluate

Table of Contents

$compiledCheckerCache  : array<string|int, mixed>
$enabled  : bool
$transOpInt  : mixed
match()  : mixed
Evaluates the expression: $constraint match $operator $version

Properties

$compiledCheckerCache

private static array<string|int, mixed> $compiledCheckerCache = array()
Tags
phpstan-var

array<string, callable>

$transOpInt

private static mixed $transOpInt = array(ComposerSemverConstraintConstraint::OP_EQ => ComposerSemverConstraintConstraint::STR_OP_EQ, ComposerSemverConstraintConstraint::OP_LT => ComposerSemverConstraintConstraint::STR_OP_LT, ComposerSemverConstraintConstraint::OP_LE => ComposerSemverConstraintConstraint::STR_OP_LE, ComposerSemverConstraintConstraint::OP_GT => ComposerSemverConstraintConstraint::STR_OP_GT, ComposerSemverConstraintConstraint::OP_GE => ComposerSemverConstraintConstraint::STR_OP_GE, ComposerSemverConstraintConstraint::OP_NE => ComposerSemverConstraintConstraint::STR_OP_NE)
Tags
phpstan-var

array<Constraint::OP_, Constraint::STR_OP_>

Methods

match()

Evaluates the expression: $constraint match $operator $version

public static match(ConstraintInterface $constraint, int $operator, string $version) : mixed
Parameters
$constraint : ConstraintInterface
$operator : int
$version : string
Tags
phpstan-param

Constraint::OP_* $operator

Return values
mixed

Search results