1 | <?php |
||
20 | abstract class AbstractOutput |
||
21 | { |
||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | protected static $countMetrics = [ |
||
26 | DeclaredInterface::class, |
||
27 | DeclaredTrait::class, |
||
28 | IncludedFile::class, |
||
29 | DefinedFunction::class, |
||
30 | DeclaredClass::class, |
||
31 | DefinedConstant::class |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | protected static $headers = ['Name', 'Metric', 'Value']; |
||
38 | |||
39 | /** |
||
40 | * @var Output|Table |
||
41 | */ |
||
42 | protected $output; |
||
43 | |||
44 | /** |
||
45 | * AbstractOutput constructor. |
||
46 | * |
||
47 | * @param $output |
||
48 | */ |
||
49 | 2 | public function __construct($output) |
|
53 | |||
54 | 1 | public function render() |
|
58 | |||
59 | /** |
||
60 | * @param Metric $metric |
||
61 | * @return int|string |
||
62 | */ |
||
63 | 2 | protected static function metricOutput(Metric $metric) |
|
67 | |||
68 | /** |
||
69 | * @param Metric $metric |
||
70 | * @param string $name |
||
71 | * @return array |
||
72 | */ |
||
73 | 1 | protected static function populateRow(Metric $metric, $name) |
|
77 | } |
||
78 |