Skip to content
Permalink
Browse files

refactor: let's make SymfonyInsights happy again

  • Loading branch information...
tarlepp committed May 5, 2019
1 parent 54f409d commit b5206cda597df5e188e5667384820905c82ea503
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Repository/Traits/LoadUserByUserNameTrait.php
@@ -10,6 +10,7 @@
use App\Entity\User as Entity;
use Doctrine\ORM\QueryBuilder;
use function array_key_exists;
use function getenv;
/**
* Trait LoadUserByUserNameTrait
@@ -43,7 +44,7 @@ public function loadUserByUsername($username): ?Entity
{
static $cache = [];
if ($_SERVER['APP_ENV'] === 'test' || !array_key_exists($username, $cache)) {
if (!array_key_exists($username, $cache) && getenv('APP_ENV') !== 'test') {
// Build query
$query = $this
->createQueryBuilder('u')

0 comments on commit b5206cd

Please sign in to comment.
You can’t perform that action at this time.