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.

ItemList::getItems()   A
last analyzed

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 Onend\PayPal\Payment\Model;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
use Onend\PayPal\Common\Model\AbstractModel;
8
9
class ItemList extends AbstractModel
10
{
11
    /**
12
     * @JMS\Type("array<Onend\PayPal\Payment\Model\Item>")
13
     *
14
     * @var Item[]
15
     */
16
    protected $items;
17
18
    /**
19
     * @JMS\Type("Onend\PayPal\Payment\Model\ShippingAddress")
20
     * @JMS\SerializedName("shipping_address")
21
     *
22
     * @var ShippingAddress
23
     */
24
    protected $shippingAddress;
25
26
    /**
27
     * @return Item[]
28
     */
29
    public function getItems()
30
    {
31
        return $this->items;
32
    }
33
34
    /**
35
     * @param Item[] $items
36
     */
37
    public function setItems(array $items)
38
    {
39
        $this->items = [];
40
41
        foreach ($items as $item) {
42
            $this->addItem($item);
43
        }
44
    }
45
46
    /**
47
     * @param Item $item
48
     */
49
    public function addItem(Item $item)
50
    {
51
        $this->items[] = $item;
52
    }
53
54
    /**
55
     * @return ShippingAddress
56
     */
57
    public function getShippingAddress()
58
    {
59
        return $this->shippingAddress;
60
    }
61
62
    /**
63
     * @param ShippingAddress $shippingAddress
64
     */
65
    public function setShippingAddress(ShippingAddress $shippingAddress)
66
    {
67
        $this->shippingAddress = $shippingAddress;
68
    }
69
}
70