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 ( f79bcb...de7e43 )
by Eric
80:29 queued 77:22
created

AbstractDelegateSubscriber   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 10 3
A getSubscribedEvents() 0 10 2
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 264
    public function handle(Event $event, $eventName, EventDispatcherInterface $eventDispatcher)
28
    {
29 264
        $delegates = static::getDelegatedSubscribedEvents();
30
31 264
        if (isset($delegates[$eventName])) {
32 264
            foreach ($delegates[$eventName] as $delegate) {
33 264
                $eventDispatcher->dispatch($delegate, $event);
34 132
            }
35 132
        }
36 264
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41 276
    public static function getSubscribedEvents()
42
    {
43 276
        $events = [];
44
45 276
        foreach (array_keys(static::getDelegatedSubscribedEvents()) as $event) {
46 276
            $events[$event] = 'handle';
47 138
        }
48
49 276
        return $events;
50
    }
51
}
52