ActivityProfile::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 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
 * A {@link Profile} related to an {@link Activity}.
16
 *
17
 * @author Christian Flothmann <[email protected]>
18
 */
19
final class ActivityProfile extends Profile
20
{
21
    /**
22
     * @var Activity The activity
23
     */
24
    private $activity;
25
26
    /**
27
     * @param string   $profileId
28
     * @param Activity $activity
29
     */
30
    public function __construct($profileId, Activity $activity)
31
    {
32
        parent::__construct($profileId);
33
34
        $this->activity = $activity;
35
    }
36
37
    /**
38
     * Returns the {@link Activity}.
39
     *
40
     * @return Activity The activity
41
     */
42
    public function getActivity()
43
    {
44
        return $this->activity;
45
    }
46
}
47