| Total Complexity | 4 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class ErrorHandler |
||
| 16 | { |
||
| 17 | /** @var Config */ |
||
| 18 | private $config; |
||
| 19 | |||
| 20 | /** @var Logger */ |
||
| 21 | private $logger; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * ErrorHandler constructor. |
||
| 25 | * |
||
| 26 | * @param Logger $logger |
||
| 27 | * @param Config $config |
||
| 28 | */ |
||
| 29 | 2 | public function __construct(Logger $logger, Config $config) |
|
| 33 | 2 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Handles errors by logging them. |
||
| 37 | * |
||
| 38 | * @param int $number |
||
| 39 | * @param string $message |
||
| 40 | * @param string $file |
||
| 41 | * @param int $line |
||
| 42 | */ |
||
| 43 | 1 | public function handle(int $number, string $message, string $file = '', int $line = 0) |
|
| 44 | { |
||
| 45 | $this |
||
| 46 | 1 | ->logger |
|
| 47 | 1 | ->error( |
|
| 48 | 1 | sprintf( |
|
| 49 | 1 | '[#:%s]-[L: %s] : %s (%s)', |
|
| 50 | 1 | $number, |
|
| 51 | 1 | $line, |
|
| 52 | 1 | $message, |
|
| 53 | 1 | $file |
|
| 54 | ) |
||
| 55 | ); |
||
| 56 | 1 | } |
|
| 57 | |||
| 58 | /** |
||
| 59 | * Application shutdown - logs metrics in devMode. |
||
| 60 | */ |
||
| 61 | 1 | public function shutdown() |
|
| 77 | ) |
||
| 78 | ); |
||
| 82 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths