Passed
Push — master ( 2aad05...4fe473 )
by Yo
02:45
created

CreateConfiguration   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
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 17
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A run() 0 4 1
1
<?php
2
namespace Yoanm\ComposerConfigManager\Application;
3
4
use Yoanm\ComposerConfigManager\Application\Writer\ConfigurationWriterInterface;
5
6
class CreateConfiguration
7
{
8
    /** @var ConfigurationWriterInterface */
9
    private $configurationWriter;
10
11
    /**
12
     * @param ConfigurationWriterInterface $configurationWriter
13
     */
14 1
    public function __construct(ConfigurationWriterInterface $configurationWriter)
15
    {
16 1
        $this->configurationWriter = $configurationWriter;
17 1
    }
18 1
    public function run(CreateConfigurationRequest $request)
19
    {
20 1
        $this->configurationWriter->write($request->getConfiguration(), $request->getDestinationFolder());
21 1
    }
22
}
23