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.
Completed
Push — master ( 898d2c...c462d0 )
by Eric
24:16 queued 21:28
created

AbstractDelegateSubscriber   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 42.86%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 2
dl 0
loc 32
ccs 6
cts 14
cp 0.4286
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscribedEvents() 0 10 2
A handle() 0 10 3
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\GoogleMap\Helper\Subscriber;
13
14
use Symfony\Component\EventDispatcher\Event;
15
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
16
17
/**
18
 * @author GeLo <[email protected]>
19
 */
20
abstract class AbstractDelegateSubscriber extends AbstractSubscriber implements DelegateSubscriberInterface
21
{
22
    /**
23
     * @param Event                    $event
24
     * @param string                   $eventName
25
     * @param EventDispatcherInterface $eventDispatcher
26
     */
27
    public function handle(Event $event, $eventName, EventDispatcherInterface $eventDispatcher)
28
    {
29
        $delegates = static::getDelegatedSubscribedEvents();
30
31
        if (isset($delegates[$eventName])) {
32
            foreach ($delegates[$eventName] as $delegate) {
33
                $eventDispatcher->dispatch($delegate, $event);
34
            }
35
        }
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41 12
    public static function getSubscribedEvents()
42
    {
43 12
        $events = [];
44
45 12
        foreach (array_keys(static::getDelegatedSubscribedEvents()) as $event) {
46 12
            $events[$event] = 'handle';
47 6
        }
48
49 12
        return $events;
50
    }
51
}
52