8000 Use abbr_class · loicfrering/symfony@4663450 · GitHub
[go: up one dir, main page]

Skip to 8000 content

Commit 4663450

Browse files
committed
Use abbr_class
1 parent 15c52f5 commit 4663450

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ public function collect(Request $request, Response $response, \Exception $except
5252
'roles' => array(),
5353
);
5454
} else {
55-
$class = explode('\\', get_class($token));
56-
5755
$this->data = array(
5856
'enabled' => true,
5957
'authenticated' => $token->isAuthenticated(),
60-
'token_class' => end($class),
58+
'token_class' => get_class($token),
6159
'user' => $token->getUsername(),
6260
'roles' => array_map(function ($role){ return $role->getRole();}, $token->getRoles()),
6361
);
@@ -105,7 +103,7 @@ public function isAuthenticated()
105103
}
106104

107105
/**
108-
* Get the class name of the security token (without namespace).
106+
* Get the class name of the security token.
109107
*
110108
* @return String The token
111109
*/

src/Symfony/Bundle/SecurityBundle/Resources/views/Collector/security.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{% if collector.tokenClass != null %}
2222
<div class="sf-toolbar-info-piece">
2323
<b>Token class</b>
24-
{{ collector.tokenClass }}
24+
{{ collector.tokenClass|abbr_class }}
2525
</div>
2626
{% endif %}
2727
{% elseif collector.enabled %}

0 commit comments

Comments
 (0)
0