Passed
Push — master ( 9ac357...f303b1 )
by Melech
01:29
created

ThrowableHandler::getTraceCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Throwable\Handler\Abstract;
15
16
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
use Throwable;
18
use Valkyrja\Throwable\Handler\Contract\ThrowableHandlerContract;
19
20
use function md5;
21
22
abstract class ThrowableHandler implements ThrowableHandlerContract
23
{
24
    /**
25
     * @inheritDoc
26
     */
27
    #[Override]
28
    public static function getTraceCode(Throwable $throwable): string
29
    {
30
        return md5($throwable::class . $throwable->getTraceAsString());
31
    }
32
}
33