Passed
Pull Request — 1.11.x (#4501)
by Angel Fernando Quiroz
09:49
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
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\PluginBundle\XApi\ToolExperience\Statement;
6
7
use Chamilo\CoreBundle\Entity\Portfolio as PortfolioEntity;
8
use Chamilo\CoreBundle\Entity\PortfolioComment as PortfolioCommentEntity;
9
10
abstract class PortfolioComment extends BaseStatement
11
{
12
    /** @var PortfolioCommentEntity */
13
    protected $comment;
14
    /** @var PortfolioCommentEntity|null */
15
    protected $parentComment;
16
    /** @var PortfolioEntity */
17
    protected $item;
18
19
    public function __construct(PortfolioCommentEntity $comment)
20
    {
21
        $this->comment = $comment;
22
        $this->item = $this->comment->getItem();
23
        $this->parentComment = $this->comment->getParent();
24
    }
25
}
26