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.
Failed Conditions
Push — master ( 37a03c...579a75 )
by Casper
03:44 queued 01:41
created

Proposal   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Test Coverage

Coverage 52.94%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 23
c 1
b 0
f 0
dl 0
loc 54
ccs 9
cts 17
cp 0.5294
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 10 1
A parse() 0 9 1
1
<?php
2
3
namespace NStack\Models;
4
5
/**
6
 * Class Proposal
7
 *
8
 * @package NStack\Models
9
 * @author  Tiago Araujo <[email protected]>
10
 */
11
class Proposal extends Model
12
{
13
    /** @var int */
14
    protected $id;
15
16
    /** @var int */
17
    protected $applicationId;
18
19
    /** @var string */
20
    protected $key;
21
22
    /** @var string */
23
    protected $section;
24
25
    /** @var string */
26
    protected $locale;
27
28
    /** @var string */
29
    protected $value;
30
31
    /** @var string */
32
    protected $canDelete;
33
34
    /**
35
     * parse
36
     *
37
     * @param array $data
38
     */
39 2
    public function parse(array $data)
40
    {
41 2
        $this->id               = (int)$data['id'];
42 2
        $this->applicationId    = (int)$data['application_id'];
43 2
        $this->key              = (string)$data['key'];
44 2
        $this->section          = (string)$data['section'];
45 2
        $this->locale           = (string)$data['locale'];
46 2
        $this->value            = (string)$data['value'];
47 2
        $this->canDelete        = (string)$data['can_delete'];
48 2
    }
49
50
    /**
51
     * toArray
52
     *
53
     * @return array
54
     */
55
    public function toArray(): array
56
    {
57
        return [
58
            'id'                => $this->id,
59
            'application_id'    => $this->applicationId,
60
            'key'               => $this->key,
61
            'section'           => $this->section,
62
            'locale'            => $this->locale,
63
            'value'             => $this->value,
64
            'can_delete'        => $this->canDelete,
65
        ];
66
    }
67
68
}