Fix some CS
This commit is contained in:
parent
a265511368
commit
27745bb87b
@ -2311,6 +2311,7 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
}
|
}
|
||||||
|
|
||||||
$entityResult['entityClass'] = $this->fullyQualifiedClassName($entityResult['entityClass']);
|
$entityResult['entityClass'] = $this->fullyQualifiedClassName($entityResult['entityClass']);
|
||||||
|
|
||||||
$resultMapping['entities'][$key]['entityClass'] = ltrim($entityResult['entityClass'], '\\');
|
$resultMapping['entities'][$key]['entityClass'] = ltrim($entityResult['entityClass'], '\\');
|
||||||
$resultMapping['entities'][$key]['isSelfClass'] = $entityResult['isSelfClass'];
|
$resultMapping['entities'][$key]['isSelfClass'] = $entityResult['isSelfClass'];
|
||||||
|
|
||||||
@ -2496,6 +2497,7 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
*
|
*
|
||||||
* @param string $callback
|
* @param string $callback
|
||||||
* @param string $eventName
|
* @param string $eventName
|
||||||
|
* @throws \Doctrine\ORM\Mapping\MappingException
|
||||||
*/
|
*/
|
||||||
public function addEntityListener($eventName, $class, $method)
|
public function addEntityListener($eventName, $class, $method)
|
||||||
{
|
{
|
||||||
|
@ -436,7 +436,7 @@ class AnnotationDriver extends AbstractAnnotationDriver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// evaluate as lifecycle callback if the listener class is not given.
|
// Evaluate as lifecycle callback if the listener class is not given.
|
||||||
if(empty($entityListenersAnnot->value)) {
|
if(empty($entityListenersAnnot->value)) {
|
||||||
/* @var $method \Doctrine\ORM\Mapping\LifecycleCallback */
|
/* @var $method \Doctrine\ORM\Mapping\LifecycleCallback */
|
||||||
foreach ($entityListenersAnnot->callbacks as $callback) {
|
foreach ($entityListenersAnnot->callbacks as $callback) {
|
||||||
|
@ -567,8 +567,8 @@ class XmlDriver extends FileDriver
|
|||||||
|
|
||||||
$eventName = $prefix . ucfirst($suffix);
|
$eventName = $prefix . ucfirst($suffix);
|
||||||
$methodName = (string) $callbackElement['method'];
|
$methodName = (string) $callbackElement['method'];
|
||||||
$listeners[] = array($eventName, $methodName);
|
|
||||||
|
|
||||||
|
$listeners[] = array($eventName, $methodName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($listenerElement['class'])) {
|
if (isset($listenerElement['class'])) {
|
||||||
@ -581,7 +581,7 @@ class XmlDriver extends FileDriver
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// evaluate as lifecycle callback if the listener class is not given.
|
// Evaluate as lifecycle callback if the listener class is not given.
|
||||||
foreach ($listeners as $item) {
|
foreach ($listeners as $item) {
|
||||||
$metadata->addLifecycleCallback($item[1], $item[0]);
|
$metadata->addLifecycleCallback($item[1], $item[0]);
|
||||||
}
|
}
|
||||||
|
@ -599,7 +599,7 @@ class YamlDriver extends FileDriver
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// evaluate as lifecycle callback if the listener class is not given.
|
// Evaluate as lifecycle callback if the listener class is not given.
|
||||||
foreach ($listeners as $item){
|
foreach ($listeners as $item){
|
||||||
$metadata->addLifecycleCallback($item[1], $item[0]);
|
$metadata->addLifecycleCallback($item[1], $item[0]);
|
||||||
}
|
}
|
||||||
|
@ -692,10 +692,7 @@ class MappingException extends \Doctrine\ORM\ORMException
|
|||||||
*/
|
*/
|
||||||
public static function entityListenerClassNotFound($listenerName, $className)
|
public static function entityListenerClassNotFound($listenerName, $className)
|
||||||
{
|
{
|
||||||
return new self(sprintf(
|
return new self(sprintf('Entity Listener "%s" declared on "%s" not found.', $listenerName, $className));
|
||||||
'Entity Listener "%s" declared on "%s" not found.',
|
|
||||||
$listenerName, $className
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -707,10 +704,7 @@ class MappingException extends \Doctrine\ORM\ORMException
|
|||||||
*/
|
*/
|
||||||
public static function entityListenerMethodNotFound($listenerName, $methodName, $className)
|
public static function entityListenerMethodNotFound($listenerName, $methodName, $className)
|
||||||
{
|
{
|
||||||
return new self(sprintf(
|
return new self(sprintf('Entity Listener "%s" declared on "%s" has no method "%s".', $listenerName, $className, $methodName));
|
||||||
'Entity Listener "%s" declared on "%s" has no method "%s".',
|
|
||||||
$listenerName, $className, $methodName
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -977,7 +977,6 @@ class UnitOfWork implements PropertyChangedListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($entities as $entity) {
|
foreach ($entities as $entity) {
|
||||||
|
|
||||||
if ($hasListeners || $hasEntityListeners | $hasLifecycleCallbacks) {
|
if ($hasListeners || $hasEntityListeners | $hasLifecycleCallbacks) {
|
||||||
$event = new LifecycleEventArgs($entity, $this->em);
|
$event = new LifecycleEventArgs($entity, $this->em);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user