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 (#7)
by Alexander
49:36 queued 24:33
created

Base::__call()   B

Complexity

Conditions 5
Paths 5

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 30

Importance

Changes 2
Bugs 1 Features 1
Metric Value
c 2
b 1
f 1
dl 0
loc 16
ccs 0
cts 14
cp 0
rs 8.8571
cc 5
eloc 10
nc 5
nop 2
crap 30
1
<?php
2
3
namespace LeadCommerce\Shopware\SDK\Entity;
4
5
/**
6
 * Class Base
7
 *
8
 * @author Alexander Mahrt <[email protected]>
9
 * @copyright 2016 LeadCommerce <[email protected]>
10
 */
11
class Base
12
{
13
    /**
14
     * @var int
15
     */
16
    protected $id;
17
18
    /**
19
     * Sets the attributes of this entity.
20
     *
21
     * @param array $attributes
22
     *
23
     * @return $this
24
     */
25 5
    public function setEntityAttributes(array $attributes)
26
    {
27 5
        foreach ($attributes as $attribute => $value) {
28 5
            $setter = 'set' . ucfirst($attribute);
29 5
            if (method_exists($this, $setter)) {
30 5
                $this->$setter($value);
31 5
            }
32 5
        }
33
34 5
        return $this;
35
    }
36
37
    /**
38
     * Gets the attributes of this entity.
39
     *
40
     * @return array
41
     */
42 3
    public function getArrayCopy()
43
    {
44 3
        return get_object_vars($this);
45
    }
46
47
    /**
48
     * @return int
49
     */
50
    public function getId()
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * @param int $id
57
     *
58
     * @return Base
59
     */
60
    public function setId($id)
61
    {
62
        $this->id = $id;
63
64
        return $this;
65
    }
66
}
67