Skip to content

Commit 1fd5af2

Browse files
committed
Show php version
1 parent c57c644 commit 1fd5af2

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

src/DebugBar/DataCollector/PhpInfoCollector.php

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,16 @@
1313
/**
1414
* Collects info about PHP
1515
*/
16-
class PhpInfoCollector extends DataCollector
16+
class PhpInfoCollector extends DataCollector implements Renderable
1717
{
18+
/**
19+
* @return string
20+
*/
21+
public function getName()
22+
{
23+
return 'php';
24+
}
25+
1826
/**
1927
* @return array
2028
*/
@@ -27,10 +35,18 @@ public function collect()
2735
}
2836

2937
/**
30-
* @return string
38+
* {@inheritDoc}
3139
*/
32-
public function getName()
40+
public function getWidgets()
3341
{
34-
return 'php';
42+
return [
43+
"php_version" => [
44+
"icon" => "code",
45+
"tooltip" => "Version",
46+
"map" => "php.version",
47+
"default" => ""
48+
],
49+
];
3550
}
51+
3652
}

0 commit comments

Comments
 (0)