1 | <?php |
||
11 | class Reporter { |
||
12 | /** |
||
13 | * @var \PHPSemVerChecker\Report\Report |
||
14 | */ |
||
15 | protected $report; |
||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $cwd; |
||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $fullPath = false; |
||
24 | |||
25 | 1 | public function __construct(Report $report) |
|
30 | |||
31 | public function setFullPath($fullPath) |
||
37 | |||
38 | 1 | public function output(OutputInterface $output) |
|
39 | { |
||
40 | 1 | $suggestedChange = $this->report->getSuggestedLevel(); |
|
41 | |||
42 | 1 | $output->writeln(''); // line clear |
|
43 | 1 | $output->writeln('Suggested semantic versioning change: ' . Level::toString($suggestedChange)); |
|
44 | |||
45 | $contexts = [ |
||
46 | 1 | 'class', |
|
47 | 'function', |
||
48 | 'interface', |
||
49 | 'trait', |
||
50 | ]; |
||
51 | |||
52 | 1 | foreach ($contexts as $context) { |
|
53 | 1 | $this->outputReport($output, $this->report, $context); |
|
54 | } |
||
55 | 1 | } |
|
56 | |||
57 | 1 | protected function outputReport(OutputInterface $output, Report $report, $context) |
|
67 | |||
68 | /** |
||
69 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
70 | * @param \PHPSemVerChecker\Report\Report $report |
||
71 | * @param string $context |
||
72 | */ |
||
73 | 1 | protected function outputTable(OutputInterface $output, Report $report, $context) |
|
86 | |||
87 | 1 | protected function getLocation(Operation $operation) |
|
97 | } |
||
98 |