minor fixes
This commit is contained in:
parent
b3414e3c1a
commit
3b7b457d35
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue