Passed
Pull Request — master (#5629)
by Angel Fernando Quiroz
10:06 queued 01:32
created

PortfolioComment::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\PluginBundle\XApi\ToolExperience\Statement;
8
9
use Chamilo\CoreBundle\Entity\Portfolio as PortfolioEntity;
10
use Chamilo\CoreBundle\Entity\PortfolioComment as PortfolioCommentEntity;
11
12
abstract class PortfolioComment extends BaseStatement
13
{
14
    /**
15
     * @var PortfolioCommentEntity
16
     */
17
    protected $comment;
18
19
    /**
20
     * @var PortfolioCommentEntity|null
21
     */
22
    protected $parentComment;
23
24
    /**
25
     * @var PortfolioEntity
26
     */
27
    protected $item;
28
29
    public function __construct(PortfolioCommentEntity $comment)
30
    {
31
        $this->comment = $comment;
32
        $this->item = $this->comment->getItem();
33
        $this->parentComment = $this->comment->getParent();
34
    }
35
}
36