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