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 (#54)
by joseph
28:13 queued 24:17
created

getTraceAsStringRelativePath()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 2.0625

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 6
cts 8
cp 0.75
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 8
nc 2
nop 0
crap 2.0625
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