| Conditions | 6 | 
| Paths | 6 | 
| Total Lines | 18 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 10 | 
| CRAP Score | 6 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 23 | 62 | public function __construct($value)  | 
            |
| 24 |     { | 
            ||
| 25 | 62 |         if (is_int($value)) { | 
            |
| 26 | 20 | $value = (string)$value;  | 
            |
| 27 | }  | 
            ||
| 28 | |||
| 29 | 62 |         if (!is_string($value) || !ctype_digit($value)) { | 
            |
| 30 | 9 |             throw new \InvalidArgumentException(sprintf('Expected string or integer and got %s', gettype($value))); | 
            |
| 31 | }  | 
            ||
| 32 | |||
| 33 | 53 | $value = str_pad($value, 2, 0, STR_PAD_LEFT);  | 
            |
| 34 | |||
| 35 | 53 |         if ((mb_strlen($value) !== 2) || !in_array((int)$value, range(0, 59), true)) { | 
            |
| 36 | 7 |             throw new \OutOfRangeException('Expected a numeric representation of minutes.'); | 
            |
| 37 | }  | 
            ||
| 38 | |||
| 39 | 46 | $this->value = $value;  | 
            |
| 40 | 46 | }  | 
            |
| 41 | |||
| 50 |