StyleFactory::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 1
b 0
f 1
cc 1
eloc 3
nc 1
nop 2
crap 2
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