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.

SiteAccessVoter::vote()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Netgen\Bundle\SiteAccessRoutesBundle\Matcher\Voter;
6
7
use function in_array;
8
9
final class SiteAccessVoter implements VoterInterface
10
{
11
    /**
12
     * Returns if provided siteaccess is allowed based on passed route config.
13
     */
14
    public function vote(string $siteAccess, array $routeConfig): ?bool
15
    {
16
        if (in_array($siteAccess, $routeConfig, true)) {
17
            return true;
18
        }
19
20
        return VoterInterface::ABSTAIN;
21
    }
22
}
23