Request   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
c 2
b 1
f 0
lcom 0
cbo 1
dl 0
loc 31
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getService() 0 4 1
A __construct() 0 5 1
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Subscription\Update;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequest;
7
8
/**
9
 * The request for updating the subscriptions.
10
 */
11
class Request extends AbstractRequest
12
{
13
    /**
14
     * The request body.
15
     *
16
     * @var array
17
     *
18
     * @JMS\Type("Speicher210\Fastbill\Api\Service\Subscription\Update\RequestData")
19
     * @JMS\SerializedName("DATA")
20
     */
21
    protected $data;
22
23
    /**
24
     * Constructor.
25
     *
26
     * @param RequestData $requestData The data for the request.
27
     */
28 3
    public function __construct(RequestData $requestData = null)
29
    {
30 3
        parent::__construct();
31 3
        $this->data = $requestData;
0 ignored issues
show
Documentation Bug introduced by
It seems like $requestData of type null or object<Speicher210\Fastb...ion\Update\RequestData> is incompatible with the declared type array of property $data.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
32 3
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 3
    public function getService()
38
    {
39 3
        return 'subscription.update';
40
    }
41
}
42