WhoAmI::isAuthenticated()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Thepixeldeveloper\Mondo\Response\Ping;
4
5
use JMS\Serializer\Annotation as JMS;
6
7
/**
8
 * Class WhoAmI
9
 *
10
 * @package Thepixeldeveloper\Mondo\Response\Ping
11
 */
12
class WhoAmI
13
{
14
    /**
15
     * Client authenticated?
16
     *
17
     * @var boolean
18
     * @JMS\Type("boolean")
19
     */
20
    protected $authenticated;
21
22
    /**
23
     * Client id.
24
     *
25
     * @var string
26
     * @JMS\Type("string")
27
     */
28
    protected $clientId;
29
30
    /**
31
     * User id.
32
     *
33
     * @var string
34
     * @JMS\Type("string")
35
     */
36
    protected $userId;
37
38
    /**
39
     * @return boolean
40
     */
41
    public function isAuthenticated()
42
    {
43
        return (bool) $this->authenticated;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getClientId()
50
    {
51
        return $this->clientId;
52
    }
53
54
    /**
55
     * @return string
56
     */
57
    public function getUserId()
58
    {
59
        return $this->userId;
60
    }
61
}
62