1 | <?php |
||
2 | |||
3 | /** |
||
4 | * @copyright Copyright (c) 2018 Matthias Held <[email protected]> |
||
5 | * @author Matthias Held <[email protected]> |
||
6 | * @license GNU AGPL version 3 or any later version |
||
7 | * |
||
8 | * This program is free software: you can redistribute it and/or modify |
||
9 | * it under the terms of the GNU Affero General Public License as |
||
10 | * published by the Free Software Foundation, either version 3 of the |
||
11 | * License, or (at your option) any later version. |
||
12 | * |
||
13 | * This program is distributed in the hope that it will be useful, |
||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
16 | * GNU Affero General Public License for more details. |
||
17 | * |
||
18 | * You should have received a copy of the GNU Affero General Public License |
||
19 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
||
20 | */ |
||
21 | |||
22 | namespace OCA\RansomwareDetection\Settings; |
||
23 | |||
24 | use OCA\RansomwareDetection\AppInfo\Application; |
||
25 | use OCP\IURLGenerator; |
||
0 ignored issues
–
show
|
|||
26 | use OCP\IL10N; |
||
0 ignored issues
–
show
The type
OCP\IL10N was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
27 | use OCP\Settings\IIconSection; |
||
0 ignored issues
–
show
The type
OCP\Settings\IIconSection was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
28 | |||
29 | class AdminSection implements IIconSection |
||
30 | { |
||
31 | /** @var IURLGenerator */ |
||
32 | private $urlGenerator; |
||
33 | |||
34 | /** @var IL10N */ |
||
35 | private $l; |
||
36 | |||
37 | public function __construct( |
||
38 | IURLGenerator $urlGenerator, |
||
39 | IL10N $l |
||
40 | ) { |
||
41 | $this->urlGenerator = $urlGenerator; |
||
42 | $this->l = $l; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * returns the relative path to an 16*16 icon describing the section. |
||
47 | * e.g. '/core/img/places/files.svg'. |
||
48 | * |
||
49 | * @returns string |
||
50 | * |
||
51 | * @since 13.0.0 |
||
52 | */ |
||
53 | public function getIcon() |
||
54 | { |
||
55 | return $this->urlGenerator->imagePath('ransomware_detection', 'app-dark.svg'); |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * returns the ID of the section. It is supposed to be a lower case string. |
||
60 | * |
||
61 | * @returns string |
||
62 | */ |
||
63 | public function getID() |
||
64 | { |
||
65 | return Application::APP_ID; |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * returns the translated name as it should be displayed, e.g. 'LDAP / AD |
||
70 | * integration'. Use the L10N service to translate it. |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getName() |
||
75 | { |
||
76 | return $this->l->t('Ransomware recovery'); |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * @return int whether the form should be rather on the top or bottom of |
||
81 | * the settings navigation. The sections are arranged in ascending order of |
||
82 | * the priority values. It is required to return a value between 0 and 99. |
||
83 | */ |
||
84 | public function getPriority() |
||
85 | { |
||
86 | return 15; |
||
87 | } |
||
88 | } |
||
89 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths