RequestData   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 71.43%

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCustomerId() 0 4 1
A setCustomerId() 0 4 1
A getAmount() 0 4 1
A setAmount() 0 4 1
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Customer\AddCredits;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequestData;
7
8
/**
9
 * The request for adding credits to the customers.
10
 */
11
final class RequestData extends AbstractRequestData
12
{
13
    /**
14
     * The customer ID.
15
     *
16
     * @var integer
17
     *
18
     * @JMS\Type("integer")
19
     * @JMS\SerializedName("CUSTOMER_ID")
20
     */
21
    protected $customerId;
22
23
    /**
24
     * The customer ID.
25
     *
26
     * @var float
27
     *
28
     * @JMS\Type("float")
29
     * @JMS\SerializedName("AMOUNT")
30
     */
31
    protected $amount;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param integer $customerId The customer ID.
37
     * @param float $amount The amount of credit to add.
38
     */
39 3
    public function __construct($customerId, $amount)
40
    {
41 3
        $this->setCustomerId($customerId);
42 3
        $this->setAmount($amount);
43 3
    }
44
45
    /**
46
     * Get the customer ID.
47
     *
48
     * @return integer
49
     */
50
    public function getCustomerId()
51
    {
52
        return $this->customerId;
53
    }
54
55
    /**
56
     * Set the customer ID.
57
     *
58
     * @param integer $customerId The customer ID.
59
     */
60 3
    public function setCustomerId($customerId)
61
    {
62 3
        $this->customerId = $customerId;
63 3
    }
64
65
    /**
66
     * Get the amount.
67
     *
68
     * @return float
69
     */
70
    public function getAmount()
71
    {
72
        return $this->amount;
73
    }
74
75
    /**
76
     * Set the amount.
77
     *
78
     * @param float $amount The amount to add.
79
     */
80 3
    public function setAmount($amount)
81
    {
82 3
        $this->amount = $amount;
83 3
    }
84
}
85