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
45:45 queued 35:51
created

StringStrategy::determineUserAgent()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
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