Skip to content

Commit

Permalink
Fix more CS violations
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Sep 25, 2018
1 parent 9e6bb0b commit 199f593
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions DataCollector/DoctrineDataCollector.php
Expand Up @@ -6,7 +6,9 @@
use Doctrine\ORM\Cache\Logging\CacheLoggerChain;
use Doctrine\ORM\Cache\Logging\StatisticsCacheLogger;
use Doctrine\ORM\Configuration;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping\ClassMetadataFactory;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Tools\SchemaValidator;
use Doctrine\ORM\Version;
use Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector as BaseCollector;
Expand Down Expand Up @@ -58,14 +60,14 @@ public function collect(Request $request, Response $response, \Exception $except
],
];

/** @var \Doctrine\ORM\EntityManager $em */
/** @var EntityManager $em */
foreach ($this->registry->getManagers() as $name => $em) {
$entities[$name] = [];
/** @var ClassMetadataFactory $factory */
$factory = $em->getMetadataFactory();
$validator = new SchemaValidator($em);

/** @var \Doctrine\ORM\Mapping\ClassMetadataInfo $class */
/** @var ClassMetadataInfo $class */
foreach ($factory->getLoadedMetadata() as $class) {
if (isset($entities[$name][$class->getName()])) {
continue;
Expand Down
3 changes: 2 additions & 1 deletion DoctrineBundle.php
Expand Up @@ -6,6 +6,7 @@
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\MessengerPass;
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass;
use Doctrine\Common\Util\ClassUtils;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Proxy\Autoloader;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\DoctrineValidationPass;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass;
Expand Down Expand Up @@ -67,7 +68,7 @@ public function boot()
$registry = $container->get('doctrine');

// Tries to auto-generate the proxy file
/** @var \Doctrine\ORM\EntityManager $em */
/** @var EntityManager $em */
foreach ($registry->getManagers() as $em) {
if (! $em->getConfiguration()->getAutoGenerateProxyClasses()) {
continue;
Expand Down

0 comments on commit 199f593

Please sign in to comment.