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.
Passed
Pull Request — master (#44)
by
unknown
03:43
created

WhitelistedDomains::getDomains()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 4
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
crap 6
1
<?php
2
3
namespace Tgallice\FBMessenger\Model;
4
5
use Tgallice\FBMessenger\Model\ThreadSetting\DomainWhitelisting;
6
7
class WhitelistedDomains
8
{
9
    /**
10
     * @var array
11
     */
12
    private $data;
13
14
    /**
15
     * @param array $data
16
     */
17 1
    public function __construct(array $data)
18
    {
19 1
        $this->data = $data;
20 1
    }
21
    
22
    /**
23
     * @return array|null
24
     */
25
    public function getDomains()
26
    {
27
        return isset($this->data['data'][0][DomainWhitelisting::WHITELISTED_DOMAINS]) ?
28
        	$this->data['data'][0][DomainWhitelisting::WHITELISTED_DOMAINS] :
29
        	null;
30
    }
31
    
32
    /**
33
     * @param array $data
34
     *
35
     * @return WhitelistedDomains
36
     */
37 1
    public static function create(array $data)
38
    {
39 1
        return new self($data);
40
    }
41
}