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