Documentation

CompilingMatcher
in package

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

Table of Contents

Properties

$compiledCheckerCache  : array<string|int, mixed>
$enabled  : bool
$resultCache  : array<string|int, mixed>
$transOpInt  : mixed

Methods

clear()  : void
Clears the memoization cache once you are done
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>

$resultCache

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

array<string, bool>

$transOpInt

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

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

Methods

clear()

Clears the memoization cache once you are done

public static clear() : void

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


        
On this page

Search results