OpenTelemetry PHP

StackTraceFormatter
in package

FinalYes
Tags
psalm-type

Frame = array{ function: string, class: ?class-string, file: ?string, line: ?int, }

psalm-type

Frames = non-empty-list<Frame>

Table of Contents

Methods

format()  : string
Formats an exception in a java-like format.
__construct()  : mixed
formatName()  : string
frames()  : array<string|int, mixed>
writeFrames()  : void
writeInlineHeader()  : void
writeNewline()  : void

Methods

formatName()

private static formatName(string $name) : string
Parameters
$name : string
Return values
string

frames()

private static frames(Throwable $e) : array<string|int, mixed>
Parameters
$e : Throwable
Tags
psalm-return

Frames

psalm-suppress

PossiblyUndefinedArrayOffset

psalm-suppress

InvalidArrayOffset

Return values
array<string|int, mixed>

writeFrames()

private static writeFrames(string &$s, array<string|int, mixed> $frames, array<string|int, mixed>|null $enclosing) : void
Parameters
$s : string
$frames : array<string|int, mixed>
$enclosing : array<string|int, mixed>|null
Tags
phan-suppress-next-line

PhanTypeMismatchDeclaredParam

phan-suppress-next-line

PhanTypeMismatchDeclaredParam

psalm-param

Frames $frames

psalm-param

Frames|null $enclosing

writeInlineHeader()

private static writeInlineHeader(string &$s, Throwable $e) : void
Parameters
$s : string
$e : Throwable

writeNewline()

private static writeNewline(string &$s[, int $indent = 0 ]) : void
Parameters
$s : string
$indent : int = 0

        
On this page

Search results