Skip to content

Commit

Permalink
Fix some CS
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioBatSilva authored and fabio.silva committed Jan 29, 2013
1 parent a265511 commit 27745bb
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
6 changes: 4 additions & 2 deletions lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,7 @@ public function addSqlResultSetMapping(array $resultMapping)
}

$entityResult['entityClass'] = $this->fullyQualifiedClassName($entityResult['entityClass']);

$resultMapping['entities'][$key]['entityClass'] = ltrim($entityResult['entityClass'], '\\');
$resultMapping['entities'][$key]['isSelfClass'] = $entityResult['isSelfClass'];

Expand Down Expand Up @@ -2496,6 +2497,7 @@ public function setLifecycleCallbacks(array $callbacks)
*
* @param string $callback
* @param string $eventName
* @throws \Doctrine\ORM\Mapping\MappingException
*/
public function addEntityListener($eventName, $class, $method)
{
Expand All @@ -2510,8 +2512,8 @@ public function addEntityListener($eventName, $class, $method)
}

$this->entityListeners[$eventName][] = array(
'class' => $class,
'method' => $method
'class' => $class,
'method' => $method
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ public function loadMetadataForClass($className, ClassMetadata $metadata)
}
}

// 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)) {
/* @var $method \Doctrine\ORM\Mapping\LifecycleCallback */
foreach ($entityListenersAnnot->callbacks as $callback) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,8 @@ public function loadMetadataForClass($className, ClassMetadata $metadata)

$eventName = $prefix . ucfirst($suffix);
$methodName = (string) $callbackElement['method'];
$listeners[] = array($eventName, $methodName);

$listeners[] = array($eventName, $methodName);
}

if (isset($listenerElement['class'])) {
Expand All @@ -581,7 +581,7 @@ public function loadMetadataForClass($className, ClassMetadata $metadata)
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) {
$metadata->addLifecycleCallback($item[1], $item[0]);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ public function loadMetadataForClass($className, ClassMetadata $metadata)
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){
$metadata->addLifecycleCallback($item[1], $item[0]);
}
Expand Down
10 changes: 2 additions & 8 deletions lib/Doctrine/ORM/Mapping/MappingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,7 @@ public static function lifecycleCallbackMethodNotFound($className, $methodName)
*/
public static function entityListenerClassNotFound($listenerName, $className)
{
return new self(sprintf(
'Entity Listener "%s" declared on "%s" not found.',
$listenerName, $className
));
return new self(sprintf('Entity Listener "%s" declared on "%s" not found.', $listenerName, $className));
}

/**
Expand All @@ -707,10 +704,7 @@ public static function entityListenerClassNotFound($listenerName, $className)
*/
public static function entityListenerMethodNotFound($listenerName, $methodName, $className)
{
return new self(sprintf(
'Entity Listener "%s" declared on "%s" has no method "%s".',
$listenerName, $className, $methodName
));
return new self(sprintf('Entity Listener "%s" declared on "%s" has no method "%s".', $listenerName, $className, $methodName));
}

/**
Expand Down
1 change: 0 additions & 1 deletion lib/Doctrine/ORM/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,6 @@ private function executeInserts($class)
}

foreach ($entities as $entity) {

if ($hasListeners || $hasEntityListeners | $hasLifecycleCallbacks) {
$event = new LifecycleEventArgs($entity, $this->em);
}
Expand Down

0 comments on commit 27745bb

Please sign in to comment.