Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
17 | public function transform($rRule) |
||
18 | { |
||
19 | 1 | if (preg_match(sprintf('/%s=%s/', $this::RRULE_PARAMETER, $this::RRULE_PATTERN), $rRule, $matches)) { |
|
20 | 1 | return (is_numeric($matches[1])) ? (int) $matches[1] : $matches[1]; |
|
21 | } |
||
22 | |||
23 | 1 | $this->throwExceptionOnInvalidParameter($rRule, $this::RRULE_PARAMETER); |
|
24 | |||
25 | 1 | return null; |
|
26 | } |
||
27 | |||
41 |