@@ -38,10 +38,10 @@ abstract class AbstractToken implements TokenInterface
3838 public function __construct (array $ roles = array ())
3939 {
4040 foreach ($ roles as $ role ) {
41- if (is_string ($ role )) {
41+ if (\ is_string ($ role )) {
4242 $ role = new Role ($ role );
4343 } elseif (!$ role instanceof RoleInterface) {
44- throw new \InvalidArgumentException (sprintf ('$roles must be an array of strings, or RoleInterface instances, but got %s. ' , gettype ($ role )));
44+ throw new \InvalidArgumentException (sprintf ('$roles must be an array of strings, or RoleInterface instances, but got %s. ' , \ gettype ($ role )));
4545 }
4646
4747 $ this ->roles [] = $ role ;
@@ -81,7 +81,7 @@ public function getUser()
8181 */
8282 public function setUser ($ user )
8383 {
84- if (!($ user instanceof UserInterface || (is_object ($ user ) && method_exists ($ user , '__toString ' )) || is_string ($ user ))) {
84+ if (!($ user instanceof UserInterface || (\ is_object ($ user ) && method_exists ($ user , '__toString ' )) || \ is_string ($ user ))) {
8585 throw new \InvalidArgumentException ('$user must be an instanceof UserInterface, an object implementing a __toString method, or a primitive string. ' );
8686 }
8787
@@ -139,7 +139,7 @@ public function serialize()
139139 {
140140 return serialize (
141141 array (
142- is_object ($ this ->user ) ? clone $ this ->user : $ this ->user ,
142+ \ is_object ($ this ->user ) ? clone $ this ->user : $ this ->user ,
143143 $ this ->authenticated ,
144144 array_map (function ($ role ) { return clone $ role ; }, $ this ->roles ),
145145 $ this ->attributes ,
@@ -221,7 +221,7 @@ public function setAttribute($name, $value)
221221 */
222222 public function __toString ()
223223 {
224- $ class = get_class ($ this );
224+ $ class = \ get_class ($ this );
225225 $ class = substr ($ class , strrpos ($ class , '\\' ) + 1 );
226226
227227 $ roles = array ();
0 commit comments