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
Push — master ( e2ddad...a5d5b8 )
by Mario
02:08
created

CaptchaRuntime::getSiteKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Netgen\InformationCollection\Templating\Twig\Extensions;
6
7
use eZ\Publish\API\Repository\Values\Content\Location;
8
use Netgen\InformationCollection\API\Service\CaptchaService;
9
10
class CaptchaRuntime
11
{
12
    /**
13
     * @var \Netgen\InformationCollection\API\Service\CaptchaService
14
     */
15
    protected $captcha;
16
17
    /**
18
     * CaptchaRuntime constructor.
19
     *
20
     * @param \Netgen\InformationCollection\API\Service\CaptchaService $captcha
21
     */
22
    public function __construct(CaptchaService $captcha)
23
    {
24
        $this->captcha = $captcha;
25
    }
26
27
    /**
28
     * Checks if captcha is enabled for given Location.
29
     *
30
     * @param \eZ\Publish\API\Repository\Values\Content\Location $location
31
     *
32
     * @return bool
33
     */
34
    public function isEnabled(Location $location): bool
35
    {
36
        return $this->captcha->isEnabled($location);
37
    }
38
39
    /**
40
     * Return configured site key for given Location.
41
     *
42
     * @param \eZ\Publish\API\Repository\Values\Content\Location $location
43
     *
44
     * @return string
45
     */
46
    public function getSiteKey(Location $location): string
47
    {
48
        return $this->captcha->getSiteKey($location);
49
    }
50
}
51