Request::getService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Customer\Create;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequest;
7
use Speicher210\Fastbill\Api\Model\Customer;
8
9
/**
10
 * The request for creating the customers.
11
 */
12
class Request extends AbstractRequest
13
{
14
    /**
15
     * @var Customer
16
     *
17
     * @JMS\Type("Speicher210\Fastbill\Api\Model\Customer")
18
     * @JMS\SerializedName("DATA")
19
     */
20
    protected $data;
21
22
    /**
23
     * Constructor.
24
     *
25
     * @param Customer $customer The customer data for the request.
26
     */
27 3
    public function __construct(Customer $customer)
28
    {
29 3
        parent::__construct();
30
31 3
        $this->data = $customer;
32 3
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 3
    public function getService()
38
    {
39 3
        return 'customer.create';
40
    }
41
}
42