Completed
Push — master ( 637e73...30874d )
by Pablo
03:20
created

BusOptionsResolver   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 1
cbo 0
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addOption() 0 4 1
A getOption() 0 4 1
1
<?php
2
3
namespace PhpGitHooks\Infrastructure\CommandBus;
4
5
class BusOptionsResolver
6
{
7
    /**
8
     * @var array
9
     */
10
    private $option = [];
11
12
13
    public function addOption($command, $handler)
14
    {
15
        $this->option[$command] = $handler;
16
    }
17
18
    /**
19
     * @param string $command
20
     *
21
     * @return array
22
     */
23
    public function getOption($command)
24
    {
25
        return $this->option[$command];
26
    }
27
}
28