diff --git a/lib/Listener/AnalyticsDatasourceListener.php b/lib/Listener/AnalyticsDatasourceListener.php index 8a84a82dbe..b67cdc14f5 100644 --- a/lib/Listener/AnalyticsDatasourceListener.php +++ b/lib/Listener/AnalyticsDatasourceListener.php @@ -18,7 +18,7 @@ use OCP\EventDispatcher\IEventListener; /** - * @template-implements IEventListener + * @template-implements IEventListener */ class AnalyticsDatasourceListener implements IEventListener { public function handle(Event $event): void { diff --git a/tests/stubs/OCA-Analytics-IDatasource.php b/tests/stubs/OCA-Analytics-IDatasource.php index 38f49801bd..4fbf07d9ad 100644 --- a/tests/stubs/OCA-Analytics-IDatasource.php +++ b/tests/stubs/OCA-Analytics-IDatasource.php @@ -1,7 +1,92 @@ l10n->t('Yes').'/false-'.$this->l10n->t('No') + * + * example: + * {['id' => 'datatype', 'name' => 'Type of Data', 'type' => 'tf', 'placeholder' => 'adaptation/absolute']} + * + * @return array + * @since 3.1.0 + */ + public function getTemplate(): array; + + /** + * Read the Data + * + * return needs to be an array + * [ + * 'header' => $header, //array('column header 1', 'column header 2','column header 3') + * 'dimensions' => array_slice($header, 0, count($header) - 1), + * 'data' => $data, + * 'error' => 0, // INT 0 = no error + * ] + * + * @param $option + * @return array available options of the data source + * @since 3.1.0 + */ + public function readData($option): array; + } }