Documentation

ScalarComparator extends Comparator
in package

Compares scalar or NULL values for equality.

Table of Contents

Constants

KEEP_CONTEXT_CHARS  : mixed = 25
OVERLONG_THRESHOLD  : mixed = 40

Methods

accepts()  : bool
assertEquals()  : void
setFactory()  : void
factory()  : Factory
findCommonPrefix()  : string
findCommonSuffix()  : string
removeOverlongCommonPrefix()  : array{string, string}
removeOverlongCommonSuffix()  : array{string, string}

Constants

Methods

accepts()

public accepts(mixed $expected, mixed $actual) : bool
Parameters
$expected : mixed
$actual : mixed
Return values
bool

assertEquals()

public assertEquals(mixed $expected, mixed $actual[, float $delta = 0.0 ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : void
Parameters
$expected : mixed
$actual : mixed
$delta : float = 0.0
$canonicalize : bool = false
$ignoreCase : bool = false
Tags
throws
ComparisonFailure

findCommonPrefix()

private static findCommonPrefix(string $string1, string $string2) : string
Parameters
$string1 : string
$string2 : string
Return values
string

findCommonSuffix()

private static findCommonSuffix(string $string1, string $string2) : string
Parameters
$string1 : string
$string2 : string
Return values
string

removeOverlongCommonPrefix()

private static removeOverlongCommonPrefix(string $string1, string $string2) : array{string, string}
Parameters
$string1 : string
$string2 : string
Return values
array{string, string}

removeOverlongCommonSuffix()

private static removeOverlongCommonSuffix(string $string1, string $string2) : array{string, string}
Parameters
$string1 : string
$string2 : string
Return values
array{string, string}
On this page

Search results