ELP Parser API

FingerprintBuilder
in package

FinalYes

Build deterministic logical-content fingerprints for parsed projects.

Table of Contents

Methods

build()  : string
Build a normalized logical-content fingerprint.
isList()  : bool
PHP 8.0-compatible array_is_list implementation.
normalize()  : mixed
Recursively sort associative arrays while preserving list order.

Methods

build()

Build a normalized logical-content fingerprint.

public build(ELPParser $parser[, string $algorithm = 'sha256' ]) : string

Packaging files and volatile project/version metadata are excluded. Parsed structure and project resource bytes are included.

Parameters
$parser : ELPParser

Parsed project.

$algorithm : string = 'sha256'

Hash algorithm.

Return values
string

isList()

PHP 8.0-compatible array_is_list implementation.

private isList(array<string|int, mixed> $value) : bool
Parameters
$value : array<string|int, mixed>

Array to inspect.

Return values
bool

normalize()

Recursively sort associative arrays while preserving list order.

private normalize(mixed $value) : mixed
Parameters
$value : mixed

Value to normalize.

On this page

Search results