Completed
Branch cleanup (5a622c)
by Paul
01:25
created

Identification::doWayfRedirect()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 0
dl 0
loc 8
ccs 0
cts 6
cp 0
crap 6
rs 9.4285
c 0
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 2
    public function isIdentified()
19
    {
20 2
        return $this->status == 'identified';
21
    }
22
23
    public function requiresWayf()
24
    {
25
        return $this->status == 'wayf';
26
    }
27
28
    public function getWayfUrl()
29
    {
30
        return $this->getLink('wayf');
31
    }
32
}
33