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

Forum   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCategory() 0 3 1
A getResourceTypes() 0 8 1
A getIcon() 0 3 1
A getLink() 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\CForum;
10
use Chamilo\CourseBundle\Entity\CForumAttachment;
11
use Chamilo\CourseBundle\Entity\CForumCategory;
12
use Chamilo\CourseBundle\Entity\CForumPost;
13
use Chamilo\CourseBundle\Entity\CForumThread;
14
15
class Forum extends AbstractTool implements ToolInterface
16
{
17
    public function getTitle(): string
18
    {
19
        return 'forum';
20
    }
21
22
    public function getCategory(): string
23
    {
24
        return 'authoring';
25
    }
26
27
    public function getLink(): string
28
    {
29
        return '/main/forum/index.php';
30
    }
31
32
    public function getIcon(): string
33
    {
34
        return 'mdi-comment-quote';
35
    }
36
37
    public function getResourceTypes(): ?array
38
    {
39
        return [
40
            'forums' => CForum::class,
41
            'forum_attachments' => CForumAttachment::class,
42
            'forum_categories' => CForumCategory::class,
43
            'forum_posts' => CForumPost::class,
44
            'forum_threads' => CForumThread::class,
45
        ];
46
    }
47
}
48