Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
91.67% covered (success)
91.67%
11 / 12
83.33% covered (warning)
83.33%
5 / 6
CRAP
0.00% covered (danger)
0.00%
0 / 1
Client
91.67% covered (success)
91.67%
11 / 12
83.33% covered (warning)
83.33%
5 / 6
10.06
0.00% covered (danger)
0.00%
0 / 1
 getDefaults
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
1
 hasFamilyName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
6
 hasEmail
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
 hasTelephone
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
 getEmailSendCount
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 hasSurveyAccepted
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3namespace BO\Zmsentities;
4
5class Client extends Schema\Entity
6{
7    public static $schema = "client.json";
8
9    #[\Override]
10    public function getDefaults()
11    {
12        return [
13            'familyName' => '',
14            'email' => '',
15            'emailSendCount' => 0,
16            'surveyAccepted' => false,
17            'telephone' => ''
18        ];
19    }
20
21    public function hasFamilyName()
22    {
23        return ($this->toProperty()->familyName->get()) ? true : false;
24    }
25
26    public function hasEmail()
27    {
28        return ($this->toProperty()->email->get()) ? true : false;
29    }
30
31    public function hasTelephone()
32    {
33        return ($this->toProperty()->telephone->get()) ? true : false;
34    }
35
36    public function getEmailSendCount()
37    {
38        return $this->toProperty()->emailSendCount->get();
39    }
40
41    public function hasSurveyAccepted()
42    {
43        return (1 == $this->toProperty()->surveyAccepted->get()) ? true : false;
44    }
45}