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
Pull Request — master (#8)
by
unknown
01:46
created

LeadFile::getId()   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 0
1
<?php
2
3
namespace LPTracker\models;
4
5
use LPTracker\exceptions\LPTrackerSDKException;
6
7
class LeadFile extends Model
8
{
9
    /**
10
     * @var integer
11
     */
12
    protected $id;
13
14
    /**
15
     * @var string
16
     */
17
    protected $name;
18
19
    public function __construct(array $fileData = [])
20
    {
21
        if (!empty($fileData['id'])) {
22
            $this->id = (int) $fileData['id'];
23
        }
24
        if (!empty($fileData['name'])) {
25
            $this->name = $fileData['name'];
26
        }
27
    }
28
29
    /**
30
     * @return array
31
     */
32
    public function toArray()
33
    {
34
        $result = [];
35
        if (!empty($this->id)) {
36
            $result['id'] = $this->getId();
37
        }
38
        if (!empty($this->name)) {
39
            $result['name'] = $this->getName();
40
        }
41
        return $result;
42
    }
43
44
    /**
45
     * @return int
46
     */
47
    public function getId()
48
    {
49
        return (int) $this->id;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getName()
56
    {
57
        return $this->name;
58
    }
59
60
    public function validate(){
61
        return true;
62
    }
63
}
64