GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#57)
by joseph
16:59
created

RelativePathTraceTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 16
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTraceAsStringRelativePath() 0 10 2
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Exception\Traits;
4
5
use EdmondsCommerce\DoctrineStaticMeta\Config;
6
use EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException;
7
8
trait RelativePathTraceTrait
9
{
10
    /**
11
     * @return string
12
     * @SuppressWarnings(PHPMD.StaticAccess)
13
     */
14 1
    public function getTraceAsStringRelativePath(): string
15
    {
16
        try {
17 1
            return "\n\n".str_replace(
18 1
                Config::getProjectRootDirectory(),
19 1
                '',
20 1
                parent::getTraceAsString()
21 1
            )."\n\n";
22
        } catch (DoctrineStaticMetaException $e) {
23
            return parent::getTraceAsString();
24
        }
25
    }
26
}
27