| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 3 | public function addListener(string $type, string $functionName): void |
|
| 26 | { |
||
| 27 | 3 | if (!in_array($type, $this->chart->getAvailableEventTypes())) { |
|
| 28 | 2 | throw new GoogleChartsException("$type event is not available for this type of chart."); |
|
| 29 | } |
||
| 30 | |||
| 31 | 1 | $this->listeners[] = new Listener($type, $functionName); |
|
| 32 | } |
||
| 42 |