| Total Complexity | 3 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | use OCP\EventDispatcher\Event; |
||
| 8 | |||
| 9 | class FunnyData implements IDatasource |
||
| 10 | { |
||
| 11 | |||
| 12 | public function handle(Event $event): void |
||
| 13 | { |
||
| 14 | if (!($event instanceof DatasourceEvent)) { |
||
| 15 | // Unrelated |
||
| 16 | return; |
||
| 17 | } |
||
| 18 | $event->registerDatasource($this->getName(), ***FunnyDataObjectHere ?***); |
||
|
|
|||
| 19 | } |
||
| 20 | |||
| 21 | public function getName(): string |
||
| 22 | { |
||
| 23 | return 'FunnyData'; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getTemplates(): array |
||
| 27 | { |
||
| 42 |