GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Application   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 93.33%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 2
c 3
b 0
f 0
lcom 0
cbo 0
dl 0
loc 24
ccs 14
cts 15
cp 0.9333
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A registerEventListener() 0 11 1
1
<?php
2
/**
3
 *
4
 * @author Roeland Jago Douma <[email protected]>
5
 *
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 <http://www.gnu.org/licenses/>.
20
 */
21
22
namespace OCA\Files_Retention\AppInfo;
23
24
use OCA\Files_Retention\EventListener;
25
use OCP\AppFramework\App;
26
use OCP\SystemTag\ManagerEvent;
27
28
class Application extends App {
29 6
	public function __construct(array $urlParams = array()) {
30 6
		parent::__construct('files_retention', $urlParams);
31
32 6
		$container = $this->getContainer();
33 6
		$server = $container->getServer();
34
35
		$container->registerService('OCP\\Files\\Config\\IUserMountCache', function ($c) use ($server) {
0 ignored issues
show
Unused Code introduced by
The parameter $c is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
36
			return $server->getMountProviderCollection()->getMountCache();
37 6
		});
38 6
	}
39
40 6
	public function registerEventListener() {
41 6
		$container = $this->getContainer();
42 6
		$dispatcher = $container->getServer()->getEventDispatcher();
43
44 6
		$dispatcher->addListener(ManagerEvent::EVENT_DELETE, function(ManagerEvent $event) use ($container) {
45
			/** @var EventListener $eventListener */
46 6
			$eventListener = $container->query('OCA\Files_Retention\EventListener');
47
48 6
			$eventListener->tagDeleted($event->getTag());
49 6
		});
50 6
	}
51
}
52