1
0
mirror of synced 2025-01-08 10:07:10 +03:00

Fix some code standard things

This commit is contained in:
Geoffrey Wagner 2014-01-09 10:48:38 -06:00
parent 4772cbfae6
commit e9739f8591
3 changed files with 11 additions and 11 deletions

View File

@ -2550,8 +2550,9 @@ class ClassMetadataInfo implements ClassMetadata
*/
public function addLifecycleCallback($callback, $event)
{
if(isset($this->lifecycleCallbacks[$event]) && in_array($callback, $this->lifecycleCallbacks[$event]))
if(isset($this->lifecycleCallbacks[$event]) && in_array($callback, $this->lifecycleCallbacks[$event])) {
return;
}
$this->lifecycleCallbacks[$event][] = $callback;
}

View File

@ -469,10 +469,10 @@ class AnnotationDriver extends AbstractAnnotationDriver
if (isset($classAnnotations['Doctrine\ORM\Mapping\HasLifecycleCallbacks']))
{
/* @var $method \ReflectionMethod */
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method)
{
foreach ($this->getMethodCallbacks($method) as $value)
{
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method){
foreach ($this->getMethodCallbacks($method) as $value) {
$metadata->addLifecycleCallback($value[0], $value[1]);
}
}

View File

@ -1,13 +1,12 @@
<?php
/**
* Created by PhpStorm.
* User: gwagner
* Date: 1/8/14
* Time: 8:19 PM
*/
namespace Doctrine\Tests\ORM\Functional\Ticket;
/**
* Class DDC2895Test
* @package Doctrine\Tests\ORM\Functional\Ticket
* @author http://github.com/gwagner
*/
class DDC2895Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
public function setUp()