Skip to content

Commit

Permalink
updated codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Chernyi committed Mar 28, 2018
1 parent 769548b commit 219d472
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .php_cs.dist
Expand Up @@ -6,18 +6,19 @@ $finder = \PhpCsFixer\Finder::create()
return \PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(array(
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PSR1' => true,
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'list_syntax' => ['syntax' => 'short'],
'no_short_echo_tag' => true,
'native_function_invocation' => true,
'no_extra_consecutive_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
'no_null_property_initialization' => true,
'no_short_echo_tag' => true,
'no_short_echo_tag' => true,
'no_superfluous_elseif' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_final_method' => true,
Expand Down
2 changes: 1 addition & 1 deletion src/Provider.php
Expand Up @@ -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;
};
Expand Down

0 comments on commit 219d472

Please sign in to comment.