Passed
Push — master ( 9a3150...404ec1 )
by Angel Fernando Quiroz
09:00 queued 02:20
created

Link   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCategory() 0 3 1
A getLink() 0 3 1
A getResourceTypes() 0 5 1
A getIcon() 0 3 1
A getTitle() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\Tool;
8
9
use Chamilo\CourseBundle\Entity\CLink;
10
use Chamilo\CourseBundle\Entity\CLinkCategory;
11
12
class Link extends AbstractTool implements ToolInterface
13
{
14
    public function getTitle(): string
15
    {
16
        return 'link';
17
    }
18
19
    public function getCategory(): string
20
    {
21
        return 'authoring';
22
    }
23
24
    public function getIcon(): string
25
    {
26
        return 'mdi-file-link';
27
    }
28
29
    public function getLink(): string
30
    {
31
        return '/resources/links/:nodeId/';
32
    }
33
34
    public function getResourceTypes(): ?array
35
    {
36
        return [
37
            'links' => CLink::class,
38
            'link_categories' => CLinkCategory::class,
39
        ];
40
    }
41
}
42