Agent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0
ccs 8
cts 8
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A equals() 0 8 2
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 15
    public function __construct(InverseFunctionalIdentifier $iri, string $name = null)
22
    {
23 15
        parent::__construct($iri, $name);
24 15
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29 13
    public function equals(StatementObject $actor): bool
30
    {
31 13
        if (!parent::equals($actor)) {
32 9
            return false;
33
        }
34
35 4
        return true;
36 1
    }
37
}
38