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 ( 7dd43d...a21e52 )
by Cees-Jan
11:16
created

CommandLocatorEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 46
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A __construct() 0 3 1
A getName() 0 4 1
A add() 0 4 1
A getMap() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Foundation;
4
5
use League\Event\AbstractEvent;
6
use WyriHaximus\Tactician\CommandHandler\Mapper;
7
8
final class CommandLocatorEvent extends AbstractEvent
9
{
10
    const NAME = 'api-clients.foundation.command-locator';
11
12
    /**
13
     * @var array
14
     */
15
    private $map = [];
16
17
    /**
18
     * @return CommandLocatorEvent
19
     */
20
    public static function create(): CommandLocatorEvent
21
    {
22
        return new self();
23
    }
24
25
    private function __construct()
26
    {
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getName()
33
    {
34
        return self::NAME;
35
    }
36
37
    /**
38
     * @param string $path
39
     * @param string $namespace
40
     */
41
    public function add(string $path, string $namespace)
42
    {
43
        $this->map += Mapper::map($path, $namespace);
44
    }
45
46
    /**
47
     * @return array
48
     */
49
    public function getMap(): array
50
    {
51
        return $this->map;
52
    }
53
}
54