for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\Security;
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction;
use function sprintf;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Core\User\UserInterface;
final class GetUser extends ExpressionFunction
{
public function __construct(Security $security)
parent::__construct(
'getUser',
function (): string {
return sprintf('\%s::getUser($globalVariable)', Helper::class);
},
function () use ($security): ?UserInterface {
return $security->getUser();
}
);