StatementResult::getStatements()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0
cc 1
nc 1
nop 0
crap 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
 * Result when querying a Learning Record Store (LRS) for a list of
16
 * {@link Statement Statements}.
17
 *
18
 * @author Christian Flothmann <[email protected]>
19
 */
20
final class StatementResult
21
{
22
    private $statements;
23
    private $moreUrlPath;
24
25
    /**
26
     * @param Statement[] $statements The collection of Statements
27
     */
28
    public function __construct(array $statements, IRL $moreUrlPath = null)
29
    {
30
        $this->statements = $statements;
31
        $this->moreUrlPath = $moreUrlPath;
32
    }
33
34
    /**
35
     * Returns the Statements.
36
     *
37
     * @return Statement[]
38
     */
39
    public function getStatements(): array
40
    {
41
        return $this->statements;
42
    }
43
44
    /**
45
     * Relative IRL that can be used to retrieve the next results.
46
     */
47
    public function getMoreUrlPath(): ?IRL
48
    {
49
        return $this->moreUrlPath;
50
    }
51
}
52