| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 2 | public function setStatus($status) |
|
| 34 | { |
||
| 35 | 2 | if ($status !== self::STATUS_UP && $status !== self::STATUS_DOWN) { |
|
| 36 | 1 | $message = "Value '%s' must be ".self::STATUS_UP.' or '.self::STATUS_DOWN; |
|
| 37 | 1 | throw new \InvalidArgumentException(sprintf($message, $status)); |
|
| 38 | } |
||
| 39 | |||
| 40 | 1 | $this->status = $status; |
|
| 41 | |||
| 42 | 1 | return $this; |
|
| 43 | } |
||
| 44 | |||
| 105 |