Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
92.86% covered (success)
92.86%
13 / 14
85.71% covered (warning)
85.71%
6 / 7
CRAP
0.00% covered (danger)
0.00%
0 / 1
Client
92.86% covered (success)
92.86%
13 / 14
85.71% covered (warning)
85.71%
6 / 7
11.04
0.00% covered (danger)
0.00%
0 / 1
 getDefaults
100.00% covered (success)
100.00%
8 / 8
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
 getNotificationsSendCount
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    public function getDefaults()
10    {
11        return [
12            'familyName' => '',
13            'email' => '',
14            'emailSendCount' => 0,
15            'notificationsSendCount' => 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 getNotificationsSendCount()
42    {
43        return $this->toProperty()->notificationsSendCount->get();
44    }
45
46    public function hasSurveyAccepted()
47    {
48        return (1 == $this->toProperty()->surveyAccepted->get()) ? true : false;
49    }
50}