Section::getPriority()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * Nextcloud - OCR
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later.
7
 * See the COPYING file.
8
 * 
9
 * @author Janis Koehr <[email protected]>
10
 * @copyright Janis Koehr 2017
11
 */
12
namespace OCA\Ocr\Settings;
13
14
use OCP\IL10N;
15
use OCP\Settings\IIconSection;
16
use OCP\IURLGenerator;
17
use OCA\Ocr\Constants\OcrConstants;
18
19
20
class Section implements IIconSection {
21
22
    /** @var IL10N */
23
    private $l;
24
25
    /** @var IURLGenerator */
26
    private $urlGenerator;
27
28
    /**
29
     *
30
     * @param IL10N $l     
31
     * @param IURLGenerator $urlGenerator       
32
     */
33 4
    public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
34 4
        $this->l = $l;
35 4
        $this->urlGenerator = $urlGenerator;
36 4
    }
37
38
    /**
39
     *
40
     * {@inheritdoc}
41
     *
42
     */
43 1
    public function getID() {
44 1
        return OcrConstants::APP_NAME;
45
    }
46
47
    /**
48
     *
49
     * {@inheritdoc}
50
     *
51
     */
52 1
    public function getName() {
53 1
        return $this->l->t('OCR');
54
    }
55
56
    /**
57
     *
58
     * {@inheritdoc}
59
     *
60
     */
61 1
    public function getPriority() {
62 1
        return 75;
63
    }
64
65
    /**
66
     *
67
     * {@inheritdoc}
68
     *
69
     */
70 1
    public function getIcon() {
71 1
        return $this->urlGenerator->imagePath(OcrConstants::APP_NAME, 'icon/ocr.svg');
72
    }
73
}