| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | 7 | public function __construct(array $elements) |
|
| 18 | { |
||
| 19 | 7 | if (count($elements) > 10) { |
|
| 20 | 1 | throw new \InvalidArgumentException('A generic template can not have more than 10 bubbles'); |
|
| 21 | } |
||
| 22 | |||
| 23 | 6 | $this->payload = [ |
|
| 24 | 6 | 'template_type' => self::TEMPLATE_TYPE, |
|
| 25 | 6 | 'elements' => $elements, |
|
| 26 | ]; |
||
| 27 | 6 | } |
|
| 28 | |||
| 37 |