Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
29 | 3 | public function getValue(IRow $source) |
|
30 | { |
||
31 | 3 | $result = parent::getValue($source); |
|
32 | 3 | $isEmpty = empty($result); |
|
33 | 3 | if ($isEmpty) { |
|
34 | 1 | return 0; |
|
35 | } else { |
||
36 | 2 | $result = $this->timestamp ? $result : strtotime(strval($result)); |
|
37 | 2 | $this->dateTime->setTimestamp(intval($result)); |
|
38 | |||
39 | 2 | return $this->dateTime->format($this->format); |
|
40 | } |
||
43 |