Completed
Push — master ( a6d22f...935bb4 )
by Christian
02:22
created

Agent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
3
/*
4
 * This file is part of the xAPI package.
5
 *
6
 * (c) Christian Flothmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Xabbuh\XApi\Model;
13
14
/**
15
 * An individual Agent of an xAPI {@link Statement}.
16
 *
17
 * @author Christian Flothmann <[email protected]>
18
 */
19
final class Agent extends Actor
20
{
21 2
    public function __construct(InverseFunctionalIdentifier $iri, $name)
22
    {
23 2
        parent::__construct($iri, $name);
24 2
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29 11
    public function equals(Actor $actor)
30
    {
31 11
        if (!parent::equals($actor)) {
32 9
            return false;
33
        }
34
35 2
        if ('Xabbuh\XApi\Model\Agent' !== get_class($actor)) {
36 1
            return false;
37
        }
38
39 1
        return true;
40
    }
41
}
42