1 | <?php |
||
19 | class CoverageAnalyzer implements AnalyzeLifeCycleNotifierAware, ReportableAnalyzer |
||
20 | { |
||
21 | |||
22 | use ProvidesLifeCycleNotifier; |
||
23 | |||
24 | /** |
||
25 | * @var AnalyzerConfiguration |
||
26 | */ |
||
27 | protected $config; |
||
28 | |||
29 | /** |
||
30 | * @var AnalyzedCoverageResult |
||
31 | */ |
||
32 | protected $analyzeResult; |
||
33 | |||
34 | |||
35 | /** |
||
36 | * @param AnalyzerConfiguration $config |
||
37 | */ |
||
38 | public function __construct(AnalyzerConfiguration $config) |
||
42 | |||
43 | /** |
||
44 | * {@inheritdoc} |
||
45 | */ |
||
46 | public function start() |
||
47 | { |
||
48 | $this->getLifeCycleNotifier()->notifyStart(); |
||
49 | $this->getDriver()->start(); |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | public function stop() |
||
56 | { |
||
57 | $this->getDriver()->stop(); |
||
58 | $this->getLifeCycleNotifier()->notifyStop( $this->getResult() ); |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function isStarted() |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | public function getResult() |
||
78 | |||
79 | /** |
||
80 | * @return \cloak\analyzer\AnalyzeDriver |
||
81 | */ |
||
82 | protected function getDriver() |
||
87 | |||
88 | /** |
||
89 | * @param AnalyzerConfiguration $config |
||
90 | */ |
||
91 | protected function init(AnalyzerConfiguration $config) |
||
98 | |||
99 | } |
||
100 |