Skip to content

Commit f75c693

Browse files
committed
unify constructor initialization style throughout symfony
1 parent d556a89 commit f75c693

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Authentication/Token/AbstractToken.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
abstract class AbstractToken implements TokenInterface
2727
{
2828
private $user;
29-
private $roles;
30-
private $authenticated;
31-
private $attributes;
29+
private $roles = array();
30+
private $authenticated = false;
31+
private $attributes = array();
3232

3333
/**
3434
* Constructor.
@@ -39,10 +39,6 @@ abstract class AbstractToken implements TokenInterface
3939
*/
4040
public function __construct(array $roles = array())
4141
{
42-
$this->authenticated = false;
43-
$this->attributes = array();
44-
45-
$this->roles = array();
4642
foreach ($roles as $role) {
4743
if (is_string($role)) {
4844
$role = new Role($role);

0 commit comments

Comments
 (0)