Passed
Pull Request — master (#472)
by Vitor
21:50
created

Application::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author Christoph Wurst <[email protected]>
7
 *
8
 * Nextcloud - Two-factor Gateway
9
 *
10
 * This code is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU Affero General Public License, version 3,
12
 * as published by the Free Software Foundation.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
 * GNU Affero General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU Affero General Public License, version 3,
20
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
21
 *
22
 */
23
24
namespace OCA\TwoFactorGateway\AppInfo;
25
26
use OCA\TwoFactorGateway\Capabilities;
0 ignored issues
show
Bug introduced by
The type OCA\TwoFactorGateway\Capabilities 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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
27
use OCP\AppFramework\App;
28
use OCP\AppFramework\Bootstrap\IBootContext;
29
use OCP\AppFramework\Bootstrap\IBootstrap;
30
use OCP\AppFramework\Bootstrap\IRegistrationContext;
31
32
include_once __DIR__ . '/../../vendor/autoload.php';
33
34
class Application extends App implements IBootstrap {
35
	public const APP_ID = 'twofactor_gateway';
36
37
	public function __construct(array $urlParams = []) {
38
		parent::__construct(self::APP_ID, $urlParams);
39
	}
40
41
	public function register(IRegistrationContext $context): void {
42
		$context->registerCapability(Capabilities::class);
43
	}
44
45
	public function boot(IBootContext $context): void {
46
	}
47
}
48