| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 9 | public function __construct($iso8601) |
|
| 34 | { |
||
| 35 | 9 | $this->iso8601 = $iso8601; |
|
| 36 | |||
| 37 | 9 | $matches = $this->parseIsoString(); |
|
| 38 | 9 | if (count($matches) != 4) { |
|
| 39 | 2 | throw new \InvalidArgumentException(sprintf("Can't parse '%s' as iso 8601 string.", $iso8601)); |
|
| 40 | } |
||
| 41 | |||
| 42 | 7 | $this->repeat = $matches[1]; |
|
| 43 | 7 | $this->startTime = $matches[2]; |
|
| 44 | 7 | $this->interval = $matches[3]; |
|
| 45 | 7 | } |
|
| 46 | |||
| 59 |