Passed
Pull Request — master (#6835)
by Angel Fernando Quiroz
09:54
created

Portfolio   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 27
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getIcon() 0 3 1
A getCategory() 0 3 1
A getResourceTypes() 0 5 1
A getTitle() 0 3 1
A getLink() 0 3 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
declare(strict_types=1);
6
7
namespace Chamilo\CoreBundle\Tool;
8
9
use Chamilo\CoreBundle\Entity\Portfolio as PortfolioEntity;
10
use Chamilo\CoreBundle\Entity\PortfolioComment;
11
use Chamilo\CoreBundle\Enums\ToolIcon;
12
13
class Portfolio extends AbstractTool implements ToolInterface
14
{
15
    public function getTitle(): string
16
    {
17
        return 'portfolio';
18
    }
19
20
    public function getCategory(): string
21
    {
22
        return 'interaction';
23
    }
24
25
    public function getLink(): string
26
    {
27
        return '/main/portfolio/index.php';
28
    }
29
30
    public function getIcon(): string
31
    {
32
        return 'mdi-'.ToolIcon::PORTFOLIO->value;
33
    }
34
35
    public function getResourceTypes(): ?array
36
    {
37
        return [
38
            'portfolio_items' => PortfolioEntity::class,
39
            'portfolio_comments' => PortfolioComment::class,
40
        ];
41
    }
42
}
43