1
0
mirror of synced 2025-02-02 13:31:45 +03:00

#6626 #6625 minor CS fixes (removed useless assignments)

This commit is contained in:
Marco Pivetta 2017-08-16 15:16:00 +02:00
parent 0bc91f8733
commit 71218b66b9
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629
2 changed files with 13 additions and 8 deletions

View File

@ -91,7 +91,9 @@ class ProxyFactory extends AbstractProxyFactory
protected function skipClass(ClassMetadata $metadata)
{
/* @var $metadata \Doctrine\ORM\Mapping\ClassMetadataInfo */
return $metadata->isMappedSuperclass || $metadata->isEmbeddedClass || $metadata->getReflectionClass()->isAbstract();
return $metadata->isMappedSuperclass
|| $metadata->isEmbeddedClass
|| $metadata->getReflectionClass()->isAbstract();
}
/**

View File

@ -75,15 +75,16 @@ class ProxyFactoryTest extends OrmTestCase
$proxy->getDescription();
}
public function testSkipMappedSuperClassesOnGeneration(): void
{
$cm = new ClassMetadata(\stdClass::class);
$cm->isMappedSuperclass = true;
$num = $this->proxyFactory->generateProxyClasses([$cm]);
self::assertSame(0, $num, 'No proxies generated.');
self::assertSame(
0,
$this->proxyFactory->generateProxyClasses([$cm]),
'No proxies generated.'
);
}
/**
@ -94,9 +95,11 @@ class ProxyFactoryTest extends OrmTestCase
$cm = new ClassMetadata(\stdClass::class);
$cm->isEmbeddedClass = true;
$num = $this->proxyFactory->generateProxyClasses([$cm]);
self::assertSame(0, $num, 'No proxies generated.');
self::assertSame(
0,
$this->proxyFactory->generateProxyClasses([$cm]),
'No proxies generated.'
);
}
/**