1
0
Fork 0
mirror of synced 2025-04-01 20:36:14 +03:00

minor fixes

This commit is contained in:
Adam Prager 2013-04-04 20:07:21 +02:00
parent b3414e3c1a
commit 3b7b457d35
2 changed files with 4 additions and 4 deletions

View file

@ -759,12 +759,12 @@ public function __construct()
*/
protected function getTraits(ClassMetadataInfo $metadata)
{
if ($metadata->reflClass != null || class_exists($metadata->name)) {
$reflClass = $metadata->reflClass == null
if ($metadata->reflClass !== null || class_exists($metadata->name)) {
$reflClass = $metadata->reflClass === null
? new \ReflectionClass($metadata->name)
: $metadata->reflClass;
if (method_exists($reflClass, 'getTraits')) {
if (PHP_VERSION_ID >= 50400) {
return $reflClass->getTraits();
}
}

View file

@ -458,7 +458,7 @@ class EntityGeneratorTest extends \Doctrine\Tests\OrmTestCase
*/
public function testTraitPropertiesAndMethodsAreNotDuplicated()
{
if (function_exists('trait_exists')) {
if (PHP_VERSION_ID >= 50400) {
$cmf = new ClassMetadataFactory();
$em = $this->_getTestEntityManager();
$cmf->setEntityManager($em);