\Drupal\strata\Code CodeReport

What one code capture pass did.

The two numbers worth reading are the redaction count and the drift count. The first says secrets were handled rather than that they were; the second says a dependency was patched by hand, which is the one thing that breaks the assumption vendor/ is safe to reference rather than store.

Summary

Methods
Properties
Constants
__construct
skipped
isClean
foundDrift
summary
jsonSerialize
ran
files
bytes
redacted
lockfiles
drifted
vendor
problems
seconds
skipped
No public constants found
No protected methods found
No protected properties found
No protected constants found
humanBytes
No private properties found
No private constants found

Properties

$ran

$ran : bool

Type

bool

$files

$files : int

Type

int

$bytes

$bytes : int

Type

int

$redacted

$redacted : int

Type

int

$lockfiles

$lockfiles : int

Type

int

$drifted

$drifted : int

Type

int

$vendor

$vendor : string

Type

string

$problems

$problems : array

Type

array<string|int, mixed>

$seconds

$seconds : float

Type

float

$skipped

$skipped : string

Type

string

Methods

__construct()

__construct(bool  $ran = false, int  $files = 0, int  $bytes = 0, int  $redacted = 0, int  $lockfiles = 0, int  $drifted = 0, string  $vendor = '', list  $problems = [], float  $seconds = 0.0, string  $skipped = '') : mixed

Constructs a report.

Parameters

bool $ran

FALSE when the pass found nothing to do.

int $files

Code files captured.

int $bytes

Bytes those files came to, before compression.

int $redacted

Secret assignments replaced before storage.

int $lockfiles

Lockfiles captured as the reference for vendor/.

int $drifted

Vendor files captured because they had been patched in place.

string $vendor

What the vendor comparison concluded.

list $problems

One line per file that could not be captured.

float $seconds

How long the pass took.

string $skipped

Why nothing was done, when nothing was.

Returns

mixed —

skipped()

skipped(string  $reason, float  $seconds = 0.0) : self

A report for a pass that had nothing to do.

Parameters

string $reason

Why.

float $seconds

How long deciding took.

Returns

self —

The report.

isClean()

isClean() : bool

Whether every file the pass reached for was captured.

Returns

bool —

TRUE when nothing failed.

foundDrift()

foundDrift() : bool

Whether a dependency was found patched in place.

Returns

bool —

TRUE when vendor files had to be captured as bytes.

summary()

summary() : string

A one-line summary for a log entry or a command's output.

Returns

string —

The summary.

jsonSerialize()

jsonSerialize() : array<string,mixed>

{@inheritdoc}

Returns

array

The report as a plain array.

humanBytes()

humanBytes(int  $bytes) : string

Renders a byte count at a readable scale.

Parameters

int $bytes

The count.

Returns

string —

For example "762.3 KiB".