1 | <?php |
||
17 | class Report |
||
18 | { |
||
19 | use UsesTime, HasContext; |
||
20 | |||
21 | /** @var \Facade\FlareClient\Stacktrace\Stacktrace */ |
||
22 | private $stacktrace; |
||
23 | |||
24 | /** @var string */ |
||
25 | private $exceptionClass; |
||
26 | |||
27 | /** @var string */ |
||
28 | private $message; |
||
29 | |||
30 | /** @var array */ |
||
31 | private $glows = []; |
||
32 | |||
33 | /** @var array */ |
||
34 | private $solutions = []; |
||
35 | |||
36 | /** @var ContextInterface */ |
||
37 | private $context; |
||
38 | |||
39 | /** @var string */ |
||
40 | private $applicationPath; |
||
41 | |||
42 | /** @var array */ |
||
43 | private $userProvidedContext = []; |
||
44 | |||
45 | /** @var array */ |
||
46 | private $exceptionContext = []; |
||
47 | |||
48 | /** @var Throwable */ |
||
49 | private $throwable; |
||
50 | |||
51 | /** @var string */ |
||
52 | private $notifierName; |
||
53 | |||
54 | /** @var string */ |
||
55 | private $languageVersion; |
||
56 | |||
57 | /** @var string */ |
||
58 | private $frameworkVersion; |
||
59 | |||
60 | /** @var int */ |
||
61 | private $openFrameIndex; |
||
62 | |||
63 | /** @var string */ |
||
64 | private $groupBy; |
||
65 | |||
66 | public static function createForThrowable(Throwable $throwable, ContextInterface $context, ?string $applicationPath = null): self |
||
77 | |||
78 | protected static function getClassForThrowable(Throwable $throwable): string |
||
87 | |||
88 | public static function createForMessage(string $message, string $logLevel, ContextInterface $context, ?string $applicationPath = null): self |
||
100 | |||
101 | public function exceptionClass(string $exceptionClass) |
||
107 | |||
108 | public function getExceptionClass(): string |
||
112 | |||
113 | public function throwable(Throwable $throwable) |
||
119 | |||
120 | public function getThrowable(): ?Throwable |
||
124 | |||
125 | public function message(string $message) |
||
131 | |||
132 | public function getMessage(): string |
||
136 | |||
137 | public function stacktrace(Stacktrace $stacktrace) |
||
143 | |||
144 | public function getStacktrace(): Stacktrace |
||
148 | |||
149 | public function notifierName(string $notifierName) |
||
155 | |||
156 | public function languageVersion(string $languageVersion) |
||
162 | |||
163 | public function frameworkVersion(string $frameworkVersion) |
||
169 | |||
170 | public function useContext(ContextInterface $request) |
||
176 | |||
177 | public function openFrameIndex(?int $index) |
||
183 | |||
184 | public function setApplicationPath(?string $applicationPath) |
||
190 | |||
191 | public function getApplicationPath(): ?string |
||
195 | |||
196 | public function view(?View $view) |
||
202 | |||
203 | public function addGlow(Glow $glow) |
||
209 | |||
210 | public function addSolution(Solution $solution) |
||
216 | |||
217 | public function userProvidedContext(array $userProvidedContext) |
||
223 | |||
224 | public function groupByTopFrame() |
||
230 | |||
231 | public function groupByException() |
||
237 | |||
238 | public function allContext(): array |
||
246 | |||
247 | private function exceptionContext(Throwable $throwable) |
||
255 | |||
256 | public function toArray() |
||
277 | } |
||
278 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.