Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
85.71% |
12 / 14 |
|
71.43% |
5 / 7 |
CRAP | |
0.00% |
0 / 1 |
RequestRelation | |
85.71% |
12 / 14 |
|
71.43% |
5 / 7 |
7.14 | |
0.00% |
0 / 1 |
getDefaults | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |||
getRequest | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getProvider | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSlotCount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getMaxQuantity | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
isPublic | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getSource | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace BO\Zmsentities; |
4 | |
5 | class RequestRelation extends Schema\Entity |
6 | { |
7 | public static $schema = "requestrelation.json"; |
8 | |
9 | public function getDefaults() |
10 | { |
11 | return [ |
12 | 'provider' => new Provider(), |
13 | 'request' => new Request(), |
14 | 'source' => null, |
15 | 'slots' => '1', |
16 | 'public' => true, |
17 | 'maxQuantity' => null, |
18 | ]; |
19 | } |
20 | |
21 | public function getRequest() |
22 | { |
23 | return $this->toProperty()->request->get(); |
24 | } |
25 | |
26 | public function getProvider() |
27 | { |
28 | return $this->toProperty()->provider->get(); |
29 | } |
30 | |
31 | public function getSlotCount() |
32 | { |
33 | return $this->toProperty()->slots->get(); |
34 | } |
35 | |
36 | public function getMaxQuantity() |
37 | { |
38 | return $this->toProperty()->maxQuantity->get(); |
39 | } |
40 | |
41 | public function isPublic() |
42 | { |
43 | return (bool) $this->toProperty()->public->get(); |
44 | } |
45 | |
46 | public function getSource() |
47 | { |
48 | return $this->toProperty()->source->get(); |
49 | } |
50 | } |