final class ParameterDefaultValueComparator (View source)

Compares default parameter values between reflection and stubs.

Methods

static array
buildMismatches(iterable $reflParams, array $stubParamsByName)

Compare default values for each reflection parameter against the stub param map.

static string
formatValue(mixed $value)

No description

Details

static array buildMismatches(iterable $reflParams, array $stubParamsByName)

Compare default values for each reflection parameter against the stub param map.

Skips parameters that:

  • have no default in reflection
  • are absent from the stub param map (ParametersCountCheck's responsibility)
  • have no default in the stub (OptionalParametersCheck's responsibility)
  • have null on either side (unevaluable constant expression or genuine null default)

Parameters

iterable $reflParams

reflection parameters

array $stubParamsByName

stub parameters indexed by name

Return Value

array

static string formatValue(mixed $value)

No description

Parameters

mixed $value

Return Value

string