1 | <?php |
||
15 | class Report |
||
16 | { |
||
17 | use UsesTime, HasContext; |
||
18 | |||
19 | /** @var \Facade\FlareClient\Stacktrace\Stacktrace */ |
||
20 | private $stacktrace; |
||
21 | |||
22 | /** @var string */ |
||
23 | private $exceptionClass; |
||
24 | |||
25 | /** @var string */ |
||
26 | private $message; |
||
27 | |||
28 | /** @var array */ |
||
29 | private $glows = []; |
||
30 | |||
31 | /** @var array */ |
||
32 | private $solutions = []; |
||
33 | |||
34 | /** @var ContextInterface */ |
||
35 | private $context; |
||
36 | |||
37 | /** @var string */ |
||
38 | private $applicationPath; |
||
39 | |||
40 | /** @var array */ |
||
41 | private $userProvidedContext = []; |
||
42 | |||
43 | /** @var array */ |
||
44 | private $exceptionContext = []; |
||
45 | |||
46 | /** @var Throwable */ |
||
47 | private $throwable; |
||
48 | |||
49 | /** @var string */ |
||
50 | private $notifierName; |
||
51 | |||
52 | /** @var string */ |
||
53 | private $languageVersion; |
||
54 | |||
55 | /** @var string */ |
||
56 | private $frameworkVersion; |
||
57 | |||
58 | /** @var int */ |
||
59 | private $openFrameIndex; |
||
60 | |||
61 | public static function createForThrowable(Throwable $throwable, ContextInterface $context, ?string $applicationPath = null): self |
||
72 | |||
73 | public static function createForMessage(string $message, string $logLevel, ContextInterface $context, ?string $applicationPath = null): self |
||
85 | |||
86 | public function exceptionClass(string $exceptionClass) |
||
92 | |||
93 | public function getExceptionClass(): string |
||
97 | |||
98 | public function throwable(Throwable $throwable) |
||
104 | |||
105 | public function getThrowable(): ?Throwable |
||
109 | |||
110 | public function message(string $message) |
||
116 | |||
117 | public function getMessage(): string |
||
121 | |||
122 | public function stacktrace(Stacktrace $stacktrace) |
||
128 | |||
129 | public function getStacktrace(): Stacktrace |
||
133 | |||
134 | public function notifierName(string $notifierName) |
||
140 | |||
141 | public function languageVersion(string $languageVersion) |
||
147 | |||
148 | public function frameworkVersion(string $frameworkVersion) |
||
154 | |||
155 | public function useContext(ContextInterface $request) |
||
161 | |||
162 | public function openFrameIndex(?int $index) |
||
168 | |||
169 | public function setApplicationPath(?string $applicationPath) |
||
175 | |||
176 | public function getApplicationPath(): ?string |
||
180 | |||
181 | public function view(?View $view) |
||
187 | |||
188 | public function addGlow(Glow $glow) |
||
194 | |||
195 | public function addSolution(Solution $solution) |
||
201 | |||
202 | public function userProvidedContext(array $userProvidedContext) |
||
208 | |||
209 | public function allContext(): array |
||
217 | |||
218 | private function exceptionContext(Throwable $throwable) |
||
226 | |||
227 | public function toArray() |
||
247 | } |
||
248 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: