Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
8 / 8 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
Link | |
100.00% |
8 / 8 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
getDefaults | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
1 | |||
__toString | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace BO\Zmsentities; |
4 | |
5 | class Link extends Schema\Entity |
6 | { |
7 | const PRIMARY = 'id'; |
8 | |
9 | public static $schema = "link.json"; |
10 | |
11 | public function getDefaults() |
12 | { |
13 | return [ |
14 | 'name' => '', |
15 | 'url' => '', |
16 | 'target' => true, |
17 | 'public' => false, |
18 | 'organisation' => 0 |
19 | ]; |
20 | } |
21 | |
22 | public function __toString() |
23 | { |
24 | return "Link {$this->name}-{$this->url}- with target " . $this->target; |
25 | } |
26 | } |