Skip to content

Commit

Permalink
DI\Diagnostics: fixed formatting of service and factory names
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaswindsor committed Mar 3, 2012
1 parent 064ddb0 commit 50dc3b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Nette/DI/Diagnostics/ContainerPanel.php
Expand Up @@ -62,7 +62,7 @@ public function getPanel()
$factories = array();
foreach (Nette\Reflection\ClassType::from($this->container)->getMethods() as $method) {
if (preg_match('#^create(Service)?(.+)$#', $method->getName(), $m)) {
$name = strtr(strtolower(substr($m[2], 0, 1)) . substr($m[2], 1), '_', '.');
$name = str_replace('__', '.', strtolower(substr($m[2], 0, 1)) . substr($m[2], 1));
if ($m[1]) {
$services[$name] = $method->getAnnotation('return');
} elseif ($method->isPublic()) {
Expand Down

0 comments on commit 50dc3b1

Please sign in to comment.