Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
44 | 3 | public function getUri() |
|
45 | { |
||
46 | 3 | if (!$this->startDate instanceof \DateTime) { |
|
47 | 1 | return $this->uri; |
|
48 | } |
||
49 | |||
50 | 2 | if (!$this->endDate instanceof \DateTime) { |
|
51 | 1 | $this->endDate = new \DateTime(); |
|
52 | 1 | } |
|
53 | |||
54 | 2 | $queryString = '?start_date=' . $this->startDate->format('c') . '&end_date=' . $this->endDate->format('c'); |
|
55 | |||
56 | 2 | return urlencode($this->uri . $queryString); |
|
57 | } |
||
58 | } |
||
59 |