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.

ContentType   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 17
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 7 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\AMQP\Model\Basic\Message;
5
6
use Innmind\AMQP\Exception\DomainException;
7
use Innmind\Filesystem\{
8
    MediaType\MediaType,
9
    Exception\Exception,
10
    Exception\ExceptionInterface,
0 ignored issues
show
Bug introduced by
The type Innmind\Filesystem\Exception\ExceptionInterface 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...
11
};
12
13
/**
14
 * Same behaviour as HTTP Content-Type header
15
 */
16
final class ContentType
17
{
18
    private $value;
19
20 18
    public function __construct(string $topLevel, string $subType)
21
    {
22
        try {
23 18
            $mediaType = new MediaType($topLevel, $subType);
0 ignored issues
show
Unused Code introduced by
The assignment to $mediaType is dead and can be removed.
Loading history...
24 16
            $this->value = $topLevel.'/'.$subType;
25 2
        } catch (Exception | ExceptionInterface $e) {
26 2
            throw new DomainException;
27
        }
28 16
    }
29
30 10
    public function __toString(): string
31
    {
32 10
        return $this->value;
33
    }
34
}
35