diff --git a/src/Provider.php b/src/Provider.php index d8ee514..f7480c5 100644 --- a/src/Provider.php +++ b/src/Provider.php @@ -18,7 +18,7 @@ public function register(Container $container): void if (!($config['before'] ?? null)) { $config['before'] = function (ServerRequestInterface $request, array $args) use ($container) { $token = $request->getAttribute($config['attribute'] ?? 'token'); - $container['user'] = (array)(is_object($token) && property_exists($token, 'data') ? $token->data : ($token['data'] ?? $token)); + $container['user'] = (array) (is_object($token) && property_exists($token, 'data') ? $token->data : ($token['data'] ?? $token)); return $request; };