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

BusOptionsResolver::addOption()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
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