CommitMsgProcessor   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 10 2
1
<?php
2
3
namespace PhpGitHooks\Module\Configuration\Service;
4
5
use Composer\IO\IOInterface;
6
use PhpGitHooks\Module\Configuration\Domain\CommitMsg;
7
8
class CommitMsgProcessor
9
{
10
    /**
11
     * @var IOInterface
12
     */
13
    private $io;
14
15
    /**
16
     * @param CommitMsg   $commitMsgData
17
     * @param IOInterface $io
18
     *
19
     * @return CommitMsg
20
     */
21 3
    public function process(CommitMsg $commitMsgData, IOInterface $io)
22
    {
23 3
        $this->io = $io;
24
25 3
        if (true === $commitMsgData->isUndefined()) {
26 2
            $commitMsgData = CommitMsgConfigurator::configure($this->io, $commitMsgData);
27
        }
28
29 3
        return $commitMsgData;
30
    }
31
}
32