Total Complexity | 3 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class PhpInfoCollector extends \DebugBar\DataCollector\PhpInfoCollector |
||
9 | { |
||
10 | public function collect() |
||
11 | { |
||
12 | $metrics = parent::collect(); |
||
13 | $metrics['version'] = $this->trimVersion($metrics['version']); |
||
14 | return $metrics; |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * Given a PHP_VERSION constant value, trim any "extra" meta information from the end, returning the major, minor |
||
19 | * and patch release of the version. Will fall back to returning the input if the matching fails. |
||
20 | * |
||
21 | * @param string $version |
||
22 | * @return string |
||
23 | */ |
||
24 | protected function trimVersion($version) |
||
28 | } |
||
29 | } |
||
30 |