Request   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

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

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...
35 12
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40 12
    public function getService()
41
    {
42 12
        return 'subscription.get';
43
    }
44
}
45