Request::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 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