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 ( 1b8c97...552815 )
by
unknown
15s queued 13s
created

LeadFile   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 9
lcom 1
cbo 1
dl 0
loc 57
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 3
A toArray() 0 11 3
A getId() 0 4 1
A getName() 0 4 1
A validate() 0 3 1
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