| 1 | <?php |
||
| 17 | final class Psr3ErrorHandler implements ErrorHandler, LoggerAwareInterface |
||
| 18 | { |
||
| 19 | use LoggerAwareTrait; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The log level to be used. |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $level; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Attach the error to the context or not. |
||
| 30 | * |
||
| 31 | * @var bool |
||
| 32 | */ |
||
| 33 | private $attachError; |
||
| 34 | |||
| 35 | public function __construct(string $level = LogLevel::CRITICAL, bool $attachError = true) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | public function handle(\Throwable $t, array $context = []): void |
||
| 73 | } |
||
| 74 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.jsonfile (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.jsonto 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
requireorrequire-devsection?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceofchecks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.