Passed
Push — master ( 04bd86...953339 )
by Marcel
06:54
created

FunnyData::getTemplates()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace OCA\Analytics\Datasource;
6
7
class FunnyData implements IDatasource
8
{
9
10
    public function getName(): string
11
    {
12
        return 'FunnyData';
13
    }
14
15
    public function getTemplates(): array
16
    {
17
        $template = array();
18
        array_push($template, ['id' => 'datatype', 'name' => 'Type of data', 'placeholder' => 'absolute/adaptation']);
19
        array_push($template, ['id' => 'delete', 'name' => 'Delete all data before load', 'placeholder' => 'true/false']);
20
        return $template;
21
    }
22
23
    public function readData(): string
24
    {
25
        // do all the database related stuff
26
        return 'test';
27
    }
28
29
}
30
31