RequestData   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 80
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 71.43%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 5
c 3
b 1
f 0
lcom 0
cbo 1
dl 0
loc 80
ccs 10
cts 14
cp 0.7143
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCode() 0 4 1
A setCode() 0 6 1
A getArticleNumber() 0 4 1
A setArticleNumber() 0 6 1
A __construct() 0 5 1
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Coupon\Check;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequestData;
7
8
/**
9
 * The request data for checking a coupon.
10
 */
11
final class RequestData extends AbstractRequestData
12
{
13
    /**
14
     * The coupon code.
15
     *
16
     * @var string
17
     *
18
     * @JMS\Type("string")
19
     * @JMS\SerializedName("CODE")
20
     */
21
    protected $code;
22
23
    /**
24
     * The article number.
25
     *
26
     * @var string
27
     *
28
     * @JMS\Type("string")
29
     * @JMS\SerializedName("ARTICLE_NUMBER")
30
     */
31
    protected $articleNumber;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param string $code The code to request.
37
     * @param string $articleNumber The article number.
38
     */
39 12
    public function __construct($code, $articleNumber)
40
    {
41 12
        $this->setCode($code);
42 12
        $this->setArticleNumber($articleNumber);
43 12
    }
44
45
    /**
46
     * Get the code.
47
     *
48
     * @return string
49
     */
50
    public function getCode()
51
    {
52
        return $this->code;
53
    }
54
55
    /**
56
     * Set the code.
57
     *
58
     * @param string $code The code.
59
     * @return RequestData
60
     */
61 12
    public function setCode($code)
62
    {
63 12
        $this->code = $code;
64
65 12
        return $this;
66
    }
67
68
    /**
69
     * Get the article number.
70
     *
71
     * @return string
72
     */
73
    public function getArticleNumber()
74
    {
75
        return $this->articleNumber;
76
    }
77
78
    /**
79
     * Set the article number.
80
     *
81
     * @param string $articleNumber The article number.
82
     * @return RequestData
83
     */
84 12
    public function setArticleNumber($articleNumber)
85
    {
86 12
        $this->articleNumber = $articleNumber;
87
88 12
        return $this;
89
    }
90
}
91