AbstractOutput   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 32
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
result() 0 1 ?
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