PersonalSectionOC   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 50
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 3 1
A getPriority() 0 3 1
A getIconName() 0 2 1
A getID() 0 3 1
1
<?php
2
/**
3
 * Audio Player
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the LICENSE.md file.
7
 *
8
 * @author Marcel Scherello <[email protected]>
9
 * @copyright 2016-2019 Marcel Scherello
10
 */
11
12
namespace OCA\audioplayer\Settings;
13
14
use OCP\IL10N;
15
use OCP\IURLGenerator;
16
use OCP\Settings\ISection;
17
18
class PersonalSectionOC implements ISection
19
{
20
    /** @var IURLGenerator */
21
    private $urlGenerator;
22
    /** @var IL10N */
23
    private $l;
24
25
    public function __construct(IURLGenerator $urlGenerator, IL10N $l)
26
    {
27
        $this->urlGenerator = $urlGenerator;
28
        $this->l = $l;
29
    }
30
31
    /**
32
     * Icon name for ownCloud
33
     *
34
     * @returns string
35
     */
36
    public function getIconName() {
37
        return 'app-dark';
38
    }
39
40
    /**
41
     * returns the ID of the section. It is supposed to be a lower case string,
42
     *
43
     * @returns string
44
     */
45
    public function getID()
46
    {
47
        return 'audioplayer';
48
    }
49
50
    /**
51
     * returns the translated name as it should be displayed
52
     *
53
     * @return string
54
     */
55
    public function getName()
56
    {
57
        return $this->l->t('Audio Player');
58
    }
59
60
    /**
61
     * returns priority for positioning
62
     *
63
     * @return int
64
     */
65
    public function getPriority()
66
    {
67
        return 10;
68
    }
69
}