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

PortfolioComment   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 22
c 1
b 0
f 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 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