Documentation

Utils
in package

A collection of utility methods. Should all be static methods with no dependencies.

Table of Contents

composerGetExtras()  : mixed
composerSkipFlags()  : mixed
getHumanReadableBytes()  : array<string|int, mixed>
Turns a byte value into a human-readable representation.
getTypeString()  : mixed
isSequential()  : mixed
isTrace()  : mixed
normalizeAliases()  : mixed
traceFrameIsListed()  : mixed
truncateString()  : mixed
__construct()  : mixed

Methods

composerGetExtras()

public static composerGetExtras([mixed $key = 'kint' ]) : mixed
Parameters
$key : mixed = 'kint'
Return values
mixed

composerSkipFlags()

public static composerSkipFlags() : mixed
Tags
codeCoverageIgnore
Return values
mixed

getHumanReadableBytes()

Turns a byte value into a human-readable representation.

public static getHumanReadableBytes(int $value) : array<string|int, mixed>
Parameters
$value : int

Amount of bytes

Return values
array<string|int, mixed>

Human readable value and unit

getTypeString()

public static getTypeString(ReflectionType $type) : mixed
Parameters
$type : ReflectionType
Return values
mixed

isSequential()

public static isSequential(array<string|int, mixed> $array) : mixed
Parameters
$array : array<string|int, mixed>
Return values
mixed

isTrace()

public static isTrace(array<string|int, mixed> $trace) : mixed
Parameters
$trace : array<string|int, mixed>
Return values
mixed

normalizeAliases()

public static normalizeAliases(array<string|int, mixed> &$aliases) : mixed
Parameters
$aliases : array<string|int, mixed>
Return values
mixed

traceFrameIsListed()

public static traceFrameIsListed(array<string|int, mixed> $frame, array<string|int, mixed> $matches) : mixed
Parameters
$frame : array<string|int, mixed>
$matches : array<string|int, mixed>
Return values
mixed

truncateString()

public static truncateString(mixed $input[, mixed $length = PHP_INT_MAX ][, mixed $end = '...' ][, mixed $encoding = false ]) : mixed
Parameters
$input : mixed
$length : mixed = PHP_INT_MAX
$end : mixed = '...'
$encoding : mixed = false
Return values
mixed

__construct()

private __construct() : mixed
Tags
codeCoverageIgnore
Return values
mixed

Search results