| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 67 | 19 | public function setConfirm($confirm) |
|
| 68 | { |
||
| 69 | 19 | if (is_array($confirm)) { |
|
| 70 | 18 | $confirm = new Confirmation($confirm); |
|
| 71 | } |
||
| 72 | |||
| 73 | 19 | if ($confirm instanceof Confirmation) { |
|
| 74 | 18 | $this->confirm = $confirm; |
|
| 75 | |||
| 76 | 18 | return $this; |
|
| 77 | } |
||
| 78 | |||
| 79 | 1 | throw new InvalidArgumentException('Confirm must be a keyed array or '.Confirmation::class.' object'); |
|
| 80 | } |
||
| 82 |