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.

Advertisers::__construct()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 5
nc 4
nop 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Speicher210\Estimote\Model\Device\Settings;
6
7
use JMS\Serializer\Annotation as JMS;
8
use Speicher210\Estimote\Model\Device\Settings\Advertisers\EddystoneUrl;
9
use Speicher210\Estimote\Model\Device\Settings\Advertisers\IBeacon;
10
11
final class Advertisers
12
{
13
    /**
14
     * @var IBeacon[]
15
     *
16
     * @JMS\Type("array<Speicher210\Estimote\Model\Device\Settings\Advertisers\IBeacon>")
17
     * @JMS\SerializedName("ibeacon")
18
     */
19
    private $ibeacon = [];
20
21
    /**
22
     * @var EddystoneUrl[]
23
     *
24
     * @JMS\Type("array<Speicher210\Estimote\Model\Device\Settings\Advertisers\EddystoneUrl>")
25
     * @JMS\SerializedName("eddystone_url")
26
     */
27
    private $eddystoneUrl = [];
28
29
    public function __construct(?IBeacon $ibeacon, ?EddystoneUrl $eddystoneUrl)
30
    {
31
        if ($ibeacon !== null) {
32
            $this->ibeacon = [$ibeacon];
33
        }
34
35
        if ($eddystoneUrl !== null) {
36
            $this->eddystoneUrl = [$eddystoneUrl];
37
        }
38
    }
39
40
    public function ibeacon(): ?IBeacon
41
    {
42
        return $this->ibeacon[0] ?? null;
43
    }
44
45
    public function eddystoneUrl(): ?EddystoneUrl
46
    {
47
        return $this->eddystoneUrl[0] ?? null;
48
    }
49
}
50