StyleFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A create() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Symplify
7
 * Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
8
 */
9
10
namespace Symplify\MultiCodingStandard\Console\Style;
11
12
use Symfony\Component\Console\Input\InputInterface;
13
use Symfony\Component\Console\Output\OutputInterface;
14
use Symfony\Component\Console\Style\StyleInterface;
15
use Symfony\Component\Console\Style\SymfonyStyle;
16
17
final class StyleFactory
18
{
19
    /**
20
     * @var InputInterface
21
     */
22
    private $input;
23
24
    /**
25
     * @var OutputInterface
26
     */
27
    private $output;
28
29
    public function __construct(InputInterface $input, OutputInterface $output)
30
    {
31
        $this->input = $input;
32
        $this->output = $output;
33
    }
34
35
    public function create() : StyleInterface
36
    {
37
        return new SymfonyStyle($this->input, $this->output);
38
    }
39
}
40