Skip to content

Commit

Permalink
ORM extension: Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Dec 7, 2019
1 parent 814bebf commit 81b0e71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Orm/DI/OrmAnnotationsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
namespace Baraja\Doctrine\ORM\DI;


use Baraja\Doctrine\ORM\Exception\Logical\InvalidStateException;
use Baraja\Doctrine\ORM\Mapping\AnnotationDriver;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Annotations\CachedReader;
Expand All @@ -25,8 +27,6 @@
use Nette\PhpGenerator\ClassType;
use Nette\PhpGenerator\PhpLiteral;
use Nette\Utils\Validators;
use Baraja\Doctrine\ORM\Exception\Logical\InvalidStateException;
use Baraja\Doctrine\ORM\Mapping\AnnotationDriver;

class OrmAnnotationsExtension extends CompilerExtension
{
Expand Down Expand Up @@ -113,7 +113,7 @@ public function afterCompile(ClassType $classType): void
{
$initialize = $classType->getMethod('initialize');
$original = (string) $initialize->getBody();
$initialize->setBody('?::registerUniqueLoader("class_exists");' . "\n", [new PhpLiteral(AnnotationRegistry::class)]);
$initialize->setBody('?::registerUniqueLoader(\'class_exists\');' . "\n", [new PhpLiteral(AnnotationRegistry::class)]);
$initialize->addBody($original);
}

Expand Down

0 comments on commit 81b0e71

Please sign in to comment.