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.

OrganizationClaims::resolve()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 13
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 6
nc 4
nop 1
dl 0
loc 13
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Damax\Bundle\ApiAuthBundle\Jwt\Claims;
6
7
use Damax\Bundle\ApiAuthBundle\Jwt\Claims;
8
use Symfony\Component\Security\Core\User\UserInterface;
9
10
final class OrganizationClaims implements Claims
11
{
12
    private $issuer;
13
    private $audience;
14
15
    public function __construct(string $issuer = null, string $audience = null)
16
    {
17
        $this->issuer = $issuer;
18
        $this->audience = $audience;
19
    }
20
21
    public function resolve(UserInterface $user): array
22
    {
23
        $data = [];
24
25
        if ($this->issuer) {
26
            $data[self::ISSUER] = $this->issuer;
27
        }
28
29
        if ($this->audience) {
30
            $data[self::AUDIENCE] = $this->audience;
31
        }
32
33
        return $data;
34
    }
35
}
36