| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 9 | public function __construct($title, $subtitle = null, $imageUrl = null, array $buttons = null, DefaultAction $defaultAction = null) |
|
| 25 | { |
||
| 26 | 9 | parent::__construct($title, $subtitle, $imageUrl); |
|
| 27 | |||
| 28 | 7 | if (count($buttons) > 3) { |
|
| 29 | 1 | throw new \InvalidArgumentException('A generic element can not have more than 3 buttons.'); |
|
| 30 | } |
||
| 31 | |||
| 32 | 6 | $this->buttons = $buttons; |
|
| 33 | 6 | $this->defaultAction = $defaultAction; |
|
| 34 | 6 | } |
|
| 35 | |||
| 66 |