AbstractOutput::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
namespace phphound\output;
3
4
use League\CLImate\CLImate;
5
use phphound\AnalysisResult;
6
7
abstract class AbstractOutput
8
{
9
    /**
10
     * CLI tool.
11
     * @var CLImate CLImate instance.
12
     */
13
    protected $cli;
14
15
    /**
16
     * Output directory path.
17
     * @var string directory path.
18
     */
19
    protected $outputDirectory;
20
21
    /**
22
     * Set dependencies.
23
     * @param CLImate $climate CLImate instance.
24
     * @param string $outputDirectory directory where files will be created.
25
     */
26
    public function __construct(CLImate $climate, $outputDirectory)
27
    {
28
        $this->cli = $climate;
29
        $this->outputDirectory = $outputDirectory;
30
    }
31
32
    /**
33
     * Outputs reduced analysis result.
34
     * @param  AnalysisResult $result reduced result data.
35
     * @return void
36
     */
37
    abstract public function result(AnalysisResult $result);
38
}
39