ReportConfig   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 81
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 81
c 0
b 0
f 0
wmc 7
lcom 1
cbo 0
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getClientCustomerId() 0 4 1
A getDeveloperToken() 0 4 1
A getUserAgent() 0 4 1
A getDateMin() 0 4 1
A getDateMax() 0 4 1
A toArray() 0 11 1
1
<?php
2
3
namespace Audiens\DoubleclickClient\entity;
4
5
class ReportConfig
6
{
7
    /** @var string */
8
    protected $clientCustomerId;
9
10
    /** @var string */
11
    protected $developerToken;
12
13
    /** @var string */
14
    protected $userAgent;
15
16
    /** @var string */
17
    protected $dateMin;
18
19
    /** @var \DateTime */
20
    protected $dateMax;
21
22
    public function __construct($clientCustomerId, $developerToken, $userAgent, \DateTime $dateMin, \DateTime $dateMax)
23
    {
24
        $this->clientCustomerId = $clientCustomerId;
25
        $this->developerToken   = $developerToken;
26
        $this->userAgent        = $userAgent;
27
        $this->dateMin          = $dateMin;
0 ignored issues
show
Documentation Bug introduced by
It seems like $dateMin of type object<DateTime> is incompatible with the declared type string of property $dateMin.

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...
28
        $this->dateMax          = $dateMax;
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getClientCustomerId()
35
    {
36
        return $this->clientCustomerId;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getDeveloperToken()
43
    {
44
        return $this->developerToken;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getUserAgent()
51
    {
52
        return $this->userAgent;
53
    }
54
55
    /**
56
     * @return \DateTime
57
     */
58
    public function getDateMin()
59
    {
60
        return $this->dateMin;
61
    }
62
63
    /**
64
     * @return \DateTime
65
     */
66
    public function getDateMax()
67
    {
68
        return $this->dateMax;
69
    }
70
71
    /**
72
     * @return array
73
     */
74
    public function toArray(): array
75
    {
76
        return
77
            [
78
                'clientCustomerId' => $this->clientCustomerId,
79
                'developerToken' => $this->developerToken,
80
                'userAgent' => $this->userAgent,
81
                'dateMin' => $this->dateMin,
82
                'dateMax' => $this->dateMax,
83
            ];
84
    }
85
}
86