| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 58 | 2 | public function getDataItem() { |
|
| 59 | 2 | if ( $this->approvedDate ) { |
|
|
|
|||
| 60 | 1 | $date = $this->approvedDate; |
|
| 61 | 1 | return new DITime( |
|
| 62 | 1 | DITime::CM_GREGORIAN, |
|
| 63 | 1 | $date->format( 'Y' ), |
|
| 64 | 1 | $date->format( 'm' ), |
|
| 65 | 1 | $date->format( 'd' ), |
|
| 66 | 1 | $date->format( 'H' ), |
|
| 67 | 1 | $date->format( 'i' ) |
|
| 68 | 1 | ); |
|
| 69 | } |
||
| 70 | 1 | } |
|
| 71 | |||
| 93 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: