1 | <?php |
||
10 | final class StackTraceFrame implements JsonSerializable |
||
11 | { |
||
12 | /** |
||
13 | * @var string|null |
||
14 | */ |
||
15 | private $absolutePath; |
||
16 | |||
17 | /** |
||
18 | * @var int|null |
||
19 | */ |
||
20 | private $columnNumber; |
||
21 | |||
22 | /** |
||
23 | * @var string|null |
||
24 | */ |
||
25 | private $contextLine; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $fileName; |
||
31 | |||
32 | /** |
||
33 | * @var string|null |
||
34 | */ |
||
35 | private $function; |
||
36 | |||
37 | /** |
||
38 | * @var bool|null |
||
39 | */ |
||
40 | private $isLibraryFrame; |
||
41 | |||
42 | /** |
||
43 | * @var int |
||
44 | */ |
||
45 | private $lineNumber; |
||
46 | |||
47 | /** |
||
48 | * @var string|null |
||
49 | */ |
||
50 | private $module; |
||
51 | |||
52 | /** |
||
53 | * @var string[] |
||
54 | */ |
||
55 | private $postContext = []; |
||
56 | |||
57 | /** |
||
58 | * @var string[] |
||
59 | */ |
||
60 | private $preContext = []; |
||
61 | |||
62 | /** |
||
63 | * @var mixed[] |
||
64 | */ |
||
65 | private $localVariableList = []; |
||
66 | |||
67 | 19 | public function __construct(string $fileName, int $lineNumber) |
|
72 | |||
73 | 1 | public function atPath(string $absolutePath): self |
|
80 | |||
81 | 1 | public function atColumnNumber(int $columnNumber): self |
|
88 | |||
89 | 1 | public function withLineContext(string $line): self |
|
96 | |||
97 | 14 | public function inFunction(string $function): self |
|
104 | |||
105 | 1 | public function originatingFromLibraryCode(): self |
|
112 | |||
113 | 1 | public function originatingFromUserCode(): self |
|
120 | |||
121 | 1 | public function inModule(string $module): self |
|
128 | |||
129 | 1 | public function withPostContext(string ...$line): self |
|
136 | |||
137 | 1 | public function withPreContext(string ...$line): self |
|
144 | |||
145 | /** |
||
146 | * @param mixed $value |
||
147 | */ |
||
148 | 1 | public function withLocalVariable(string $name, $value): self |
|
155 | |||
156 | /** |
||
157 | * @return mixed[] |
||
158 | */ |
||
159 | 18 | public function jsonSerialize(): array |
|
175 | } |
||
176 |