Completed
Branch cleanup (eec673)
by Paul
01:32
created

Identification::getWayfUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace LibLynx\Connect;
4
5
/**
6
 * Provides a simple wrapper around a LibLynx identification resource
7
 * @package LibLynx\Connect
8
 *
9
 * @property \stdClass $id
10
 * @property \stdClass $ip
11
 * @property \stdClass $url
12
 * @property \stdClass $user_agent
13
 * @property \stdClass $account
14
 * @property \stdClass $status
15
 */
16
class Identification extends LibLynxResource
17
{
18 6
    public function isIdentified()
19
    {
20 6
        return $this->status == 'identified';
21
    }
22
23 4
    public function requiresWayf()
24
    {
25 4
        return $this->status == 'wayf';
26
    }
27
28 4
    public function getWayfUrl()
29
    {
30 4
        return $this->getLink('wayf');
31
    }
32
}
33