Passed
Push — master ( a291c5...6eae59 )
by Marcel
14:20 queued 12s
created

ReferenceListener::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 6
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace OCA\Analytics\Listener;
4
5
use OCP\Collaboration\Reference\RenderReferenceEvent;
0 ignored issues
show
Bug introduced by
The type OCP\Collaboration\Reference\RenderReferenceEvent 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...
6
use OCP\EventDispatcher\Event;
7
use OCP\EventDispatcher\IEventListener;
8
use OCP\Util;
9
10
class ReferenceListener implements IEventListener {
11
    public function handle(Event $event): void {
12
        if (!$event instanceof RenderReferenceEvent) {
13
            return;
14
        }
15
16
        Util::addScript('analytics', 'reference');
17
    }
18
}