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 (#4)
by Cees-Jan
32:47 queued 22:48
created

StringStrategy   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A determineUserAgent() 0 8 2
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Foundation\Transport\UserAgentStrategy;
4
5
use ApiClients\Foundation\Transport\Options;
6
use ApiClients\Foundation\Transport\UserAgentStrategyInterface;
7
use InvalidArgumentException;
8
9
final class StringStrategy implements UserAgentStrategyInterface
10
{
11
    public function determineUserAgent(array $options): string
12
    {
13
        if (!isset($options[Options::USER_AGENT])) {
14
            throw new InvalidArgumentException('Missing user agent option');
15
        }
16
17
        return $options[Options::USER_AGENT];
18
    }
19
}
20