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

State::getActivity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
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
 * An activity provider's state stored on a remote LRS.
16
 *
17
 * @author Christian Flothmann <[email protected]>
18
 */
19
final class State
20
{
21
    /**
22
     * @var Activity The associated activity
23
     */
24
    private $activity;
25
26
    /**
27
     * @var Actor The associated actor
28
     */
29
    private $actor;
30
31
    /**
32
     * @var string An optional registration id
33
     */
34
    private $registrationId;
35
36
    /**
37
     * @var string The state id
38
     */
39
    private $stateId;
40
41
    public function __construct(Activity $activity, Actor $actor, $stateId, $registrationId = null)
42
    {
43
        $this->activity = $activity;
44
        $this->actor = $actor;
45
        $this->stateId = $stateId;
46
        $this->registrationId = $registrationId;
47
    }
48
49
    /**
50
     * Returns the activity.
51
     *
52
     * @return Activity The activity
53
     */
54
    public function getActivity()
55
    {
56
        return $this->activity;
57
    }
58
59
    /**
60
     * Returns the actor.
61
     *
62
     * @return Actor The actor
63
     */
64
    public function getActor()
65
    {
66
        return $this->actor;
67
    }
68
69
    /**
70
     * Returns the registration id.
71
     *
72
     * @return string The registration id
73
     */
74
    public function getRegistrationId()
75
    {
76
        return $this->registrationId;
77
    }
78
79
    /**
80
     * Returns the state's id.
81
     *
82
     * @return string The id
83
     */
84
    public function getStateId()
85
    {
86
        return $this->stateId;
87
    }
88
}
89