Completed
Push — master ( 09510d...3d2d99 )
by Luke
02:13
created

ListingDeleteObject   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 54
ccs 0
cts 23
cp 0
rs 10
c 1
b 0
f 1
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setDeletionReason() 0 5 1
A setListingReference() 0 5 1
A getListingReference() 0 3 1
A jsonSerialize() 0 5 1
A getDeletionReason() 0 3 1
1
<?php
2
3
namespace ZpgRtf\Objects;
4
5
/**
6
 * The listing delete object allows you to remove a listing from a branch's inventory list.
7
 */
8
class ListingDeleteObject implements \JsonSerializable
9
{
10
    /** @var string */
11
    private $listingReference;
12
13
    /** @var string */
14
    private $deletionReason;
15
16
    /**
17
     * @return string
18
     */
19
    public function getListingReference()
20
    {
21
        return $this->listingReference;
22
    }
23
24
    /**
25
     * @param string $listingReference
26
     *
27
     * @return ListingDeleteObject
28
     */
29
    public function setListingReference($listingReference)
30
    {
31
        $this->listingReference = $listingReference;
32
33
        return $this;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getDeletionReason()
40
    {
41
        return $this->deletionReason;
42
    }
43
44
    /**
45
     * @param string $deletionReason
46
     *
47
     * @return ListingDeleteObject
48
     */
49
    public function setDeletionReason($deletionReason)
50
    {
51
        $this->deletionReason = $deletionReason;
52
53
        return $this;
54
    }
55
56
    /** {@inheritDoc} */
57
    function jsonSerialize()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
58
    {
59
        return [
60
            'listing_reference' => $this->getListingReference(),
61
            'deletion_reason' => $this->getDeletionReason(),
62
        ];
63
    }
64
}
65