Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | final public function testConditions($parameterName, $value, $itemType = false) |
||
21 | { |
||
22 | if (is_numeric($value)) { |
||
23 | $test = '$%1$s %3$s %2$d'; |
||
24 | } else { |
||
25 | $test = '($time = (string) time()) && \DateTime::createFromFormat(\'U\', $time)->add(new \DateInterval(preg_replace(\'/(.*)(\.[0-9]*S)/\', \'$1S\', $%1$s))) %3$s \DateTime::createFromFormat(\'U\', $time)->add(new \DateInterval(preg_replace(\'/(.*)(\.[0-9]*S)/\', \'$1S\', \'%2$s\')))'; |
||
26 | } |
||
27 | return sprintf(($itemType ? '' : '!is_null($%1$s) && ') . $test, $parameterName, $value, static::symbol()); |
||
28 | } |
||
41 |