RequestData   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 37.5%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 3
c 2
b 1
f 0
lcom 1
cbo 2
dl 0
loc 45
ccs 3
cts 8
cp 0.375
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSuppressEmail() 0 4 1
A __construct() 0 4 1
A setSuppressEmail() 0 4 1
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Customer\Update;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequestData;
7
use Speicher210\Fastbill\Api\Model\CustomerTrait;
8
9
/**
10
 * The request for updating the customers.
11
 */
12
final class RequestData extends AbstractRequestData
13
{
14
    use CustomerTrait;
15
16
    /**
17
     * FLag if sending the confirmation email should be sent.
18
     *
19
     * @var integer
20
     *
21
     * @JMS\Type("integer")
22
     * @JMS\SerializedName("SUPPRESS_MAIL")
23
     */
24
    protected $suppressEmail;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param integer $customerId The customer ID to update.
30
     */
31 3
    public function __construct($customerId)
32
    {
33 3
        $this->setCustomerId($customerId);
34 3
    }
35
36
    /**
37
     * Get if sending confirmation email is suppressed.
38
     *
39
     * @return boolean
40
     */
41
    public function getSuppressEmail()
42
    {
43
        return (boolean) $this->suppressEmail;
44
    }
45
46
    /**
47
     * Set if the confirmation email should be suppressed.
48
     *
49
     * @param boolean $suppressEmail Flag if the confirmation email should be suppressed.
50
     * @return RequestData
51
     */
52
    public function setSuppressEmail($suppressEmail)
53
    {
54
        $this->suppressEmail = (integer)(boolean)$suppressEmail;
55
    }
56
}
57