From beae0865dbe7416f2639100c45dcb477b734af9d Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:18:57 +0100 Subject: [PATCH 01/16] [Mapping] removed unused local variable $fieldName in ClassMetadataFactory class. --- lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index a74ddac8b..2aaa30a44 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -406,7 +406,7 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface */ private function addInheritedFields(ClassMetadata $subClass, ClassMetadata $parentClass) { - foreach ($parentClass->fieldMappings as $fieldName => $mapping) { + foreach ($parentClass->fieldMappings as $mapping) { if ( ! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) { $mapping['inherited'] = $parentClass->name; } From a3d8207578c8ec704c6fa02b287db8a2b5d40ffd Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:19:59 +0100 Subject: [PATCH 02/16] [Mapping] removed unused local variable $field in ClassMetadataInfo class. --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index eb50d1251..8c3dac229 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -838,7 +838,7 @@ class ClassMetadataInfo implements ClassMetadata */ public function validateAssocations() { - foreach ($this->associationMappings as $field => $mapping) { + foreach ($this->associationMappings as $mapping) { if ( ! \Doctrine\Common\ClassLoader::classExists($mapping['targetEntity']) ) { throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']); } From 155c24772ad1dc3a15b65bf0baf98b9fcd798180 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:24:45 +0100 Subject: [PATCH 03/16] [Mapping] removed unused local variables $versionAnnot and $tblGeneratorAnnot in AnnotationDriver class. --- lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index 94a624c0a..22a1250ba 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -328,7 +328,7 @@ class AnnotationDriver implements Driver $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . $generatedValueAnnot->strategy)); } - if ($versionAnnot = $this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Version')) { + if ($this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\Version')) { $metadata->setVersionMapping($mapping); } @@ -341,7 +341,7 @@ class AnnotationDriver implements Driver 'allocationSize' => $seqGeneratorAnnot->allocationSize, 'initialValue' => $seqGeneratorAnnot->initialValue )); - } else if ($tblGeneratorAnnot = $this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\TableGenerator')) { + } else if ($this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\TableGenerator')) { throw MappingException::tableIdGeneratorNotImplemented($className); } else if ($customGeneratorAnnot = $this->_reader->getPropertyAnnotation($property, 'Doctrine\ORM\Mapping\CustomIdGenerator')) { $metadata->setCustomGeneratorDefinition(array( From 74f52a055e919f521bf6fbc6ee333fff639ae049 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:28:29 +0100 Subject: [PATCH 04/16] [Mapping] removed unused local variable $fileName in StaticPHPDriver class. --- lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php b/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php index 4e593ea8c..283ec7c5b 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php @@ -103,7 +103,7 @@ class StaticPHPDriver implements Driver ); foreach ($iterator as $file) { - if (($fileName = $file->getBasename($this->_fileExtension)) == $file->getBasename()) { + if ($file->getBasename($this->_fileExtension) == $file->getBasename()) { continue; } From d4bcbd4741c39c3fa4a89f88994a092dc8bab144 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:35:32 +0100 Subject: [PATCH 05/16] [Persisters] removed unused local variables in BasicEntityPersister class. --- .../ORM/Persisters/BasicEntityPersister.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 673d97496..d2638bea5 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -498,7 +498,6 @@ class BasicEntityPersister continue; } - $oldVal = $change[0]; $newVal = $change[1]; if (isset($this->_class->associationMappings[$field])) { @@ -711,7 +710,6 @@ class BasicEntityPersister */ public function loadAll(array $criteria = array(), array $orderBy = null, $limit = null, $offset = null) { - $entities = array(); $sql = $this->_getSelectEntitiesSQL($criteria, null, 0, $limit, $offset, $orderBy); list($params, $types) = $this->expandParameters($criteria); $stmt = $this->_conn->executeQuery($sql, $params, $types); @@ -995,7 +993,7 @@ class BasicEntityPersister $assocAlias = 'e' . ($eagerAliasCounter++); $this->_rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField); - foreach ($eagerEntity->fieldNames AS $field) { + foreach ($eagerEntity->fieldNames as $field) { if ($columnList) $columnList .= ', '; $columnList .= $this->_getSelectColumnSQL($field, $eagerEntity, $assocAlias); @@ -1016,7 +1014,7 @@ class BasicEntityPersister $this->_selectJoinSql .= ' ' . $eagerEntity->getQuotedTableName($this->_platform) . ' ' . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) .' ON '; $tableAlias = $this->_getSQLTableAlias($assoc['targetEntity'], $assocAlias); - foreach ($assoc['sourceToTargetKeyColumns'] AS $sourceCol => $targetCol) { + foreach ($assoc['sourceToTargetKeyColumns'] as $sourceCol => $targetCol) { if ( ! $first) { $this->_selectJoinSql .= ' AND '; } @@ -1037,7 +1035,7 @@ class BasicEntityPersister $this->_selectJoinSql .= ' ' . $eagerEntity->getQuotedTableName($this->_platform) . ' ' . $this->_getSQLTableAlias($eagerEntity->name, $assocAlias) . ' ON '; - foreach ($owningAssoc['sourceToTargetKeyColumns'] AS $sourceCol => $targetCol) { + foreach ($owningAssoc['sourceToTargetKeyColumns'] as $sourceCol => $targetCol) { if ( ! $first) { $this->_selectJoinSql .= ' AND '; } @@ -1139,7 +1137,7 @@ class BasicEntityPersister $columns = array_unique($columns); $values = array(); - foreach ($columns AS $column) { + foreach ($columns as $column) { $placeholder = '?'; if (isset($this->_class->fieldNames[$column]) && @@ -1267,7 +1265,7 @@ class BasicEntityPersister list($params, $types) = $this->expandParameters($criteria); - $stmt = $this->_conn->executeQuery($sql, $params, $types); + $this->_conn->executeQuery($sql, $params, $types); } /** @@ -1418,7 +1416,7 @@ class BasicEntityPersister { $params = $types = array(); - foreach ($criteria AS $field => $value) { + foreach ($criteria as $field => $value) { if ($value === null) { continue; // skip null values. } @@ -1539,7 +1537,7 @@ class BasicEntityPersister $sql .= ' AND ' . $filterSql; } - list($params, $types) = $this->expandParameters($criteria); + list($params) = $this->expandParameters($criteria); return (bool) $this->_conn->fetchColumn($sql, $params); } From d09b733cc369bb3f76056b33ebe6666af6f4eccf Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:39:37 +0100 Subject: [PATCH 06/16] [Persisters] removed unused local variable in ManyToManyPersister class. --- lib/Doctrine/ORM/Persisters/ManyToManyPersister.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php b/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php index daef03774..c7dc08dff 100644 --- a/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php +++ b/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php @@ -180,7 +180,7 @@ class ManyToManyPersister extends AbstractCollectionPersister // Composite identifier $sourceClass = $this->_em->getClassMetadata(get_class($mapping->getOwner())); - foreach ($mapping['relationToSourceKeyColumns'] as $relColumn => $srcColumn) { + foreach ($mapping['relationToSourceKeyColumns'] as $srcColumn) { $params[] = $identifier[$sourceClass->fieldNames[$srcColumn]]; } From c4dcd39666fa63e5498411e6b3a79a00a00e9e27 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:41:38 +0100 Subject: [PATCH 07/16] [Proxy] renamed AS to as. --- lib/Doctrine/ORM/Proxy/ProxyFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/lib/Doctrine/ORM/Proxy/ProxyFactory.php index 92a51481c..61c697f62 100644 --- a/lib/Doctrine/ORM/Proxy/ProxyFactory.php +++ b/lib/Doctrine/ORM/Proxy/ProxyFactory.php @@ -397,7 +397,7 @@ class extends \ implements \Doctrine\ORM\Proxy\Proxy if ($original === null) { throw new \Doctrine\ORM\EntityNotFoundException(); } - foreach ($class->reflFields AS $field => $reflProperty) { + foreach ($class->reflFields as $field => $reflProperty) { $reflProperty->setValue($this, $reflProperty->getValue($original)); } unset($this->_entityPersister, $this->_identifier); From 19602d0a26b61d9fe750603bb554b0c389190ade Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:43:39 +0100 Subject: [PATCH 08/16] [Query] removed unused local variable $platform in IdentityFunction class. --- lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php b/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php index 1b7592990..84e04a10b 100644 --- a/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php +++ b/lib/Doctrine/ORM/Query/AST/Functions/IdentityFunction.php @@ -39,7 +39,6 @@ class IdentityFunction extends FunctionNode */ public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) { - $platform = $sqlWalker->getConnection()->getDatabasePlatform(); $dqlAlias = $this->pathExpression->identificationVariable; $assocField = $this->pathExpression->field; From 43eebe1a8b2d5e1b97ccc0b32ee140478aaea89d Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:44:42 +0100 Subject: [PATCH 09/16] [Query] removed unused local variable $lexer in SizeFunction class. --- lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php b/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php index 3decb918e..52173c406 100644 --- a/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php +++ b/lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php @@ -109,8 +109,6 @@ class SizeFunction extends FunctionNode */ public function parse(\Doctrine\ORM\Query\Parser $parser) { - $lexer = $parser->getLexer(); - $parser->match(Lexer::T_SIZE); $parser->match(Lexer::T_OPEN_PARENTHESIS); From 5a1c1e55efae690898d3150c4bd6bdd6256d95b0 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 19:52:32 +0100 Subject: [PATCH 10/16] [Query] removed unused local variables in Parser class. --- lib/Doctrine/ORM/Query/Parser.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index bbb91c040..7cf6d891d 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -601,7 +601,7 @@ class Parser // Check if queryComponent points to an AbstractSchemaName or a ResultVariable if ( ! isset($qComp['resultVariable'])) { $this->semanticalError( - "'$identVariable' does not point to a ResultVariable.", $deferredItem['token'] + "'$resultVariable' does not point to a ResultVariable.", $deferredItem['token'] ); } @@ -652,8 +652,8 @@ class Parser $assoc = $class->associationMappings[$field]; $fieldType = ($assoc['type'] & ClassMetadata::TO_ONE) - ? AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION - : AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION; + ? AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION + : AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION; } // Validate if PathExpression is one of the expected types @@ -700,7 +700,7 @@ class Parser $foundRootEntity = false; - foreach ($this->_identVariableExpressions AS $dqlAlias => $expr) { + foreach ($this->_identVariableExpressions as $dqlAlias => $expr) { if (isset($this->_queryComponents[$dqlAlias]) && $this->_queryComponents[$dqlAlias]['parent'] === null) { $foundRootEntity = true; } @@ -905,7 +905,6 @@ class Parser */ public function JoinAssociationPathExpression() { - $token = $this->_lexer->lookahead; $identVariable = $this->IdentificationVariable(); if ( ! isset($this->_queryComponents[$identVariable])) { @@ -941,7 +940,6 @@ class Parser */ public function PathExpression($expectedTypes) { - $token = $this->_lexer->lookahead; $identVariable = $this->IdentificationVariable(); $field = null; @@ -1451,7 +1449,7 @@ class Parser */ public function SubselectIdentificationVariableDeclaration() { - $glimpse = $this->_lexer->glimpse(); + $this->_lexer->glimpse(); /* NOT YET IMPLEMENTED! @@ -2743,7 +2741,7 @@ class Parser */ public function ComparisonExpression() { - $peek = $this->_lexer->glimpse(); + $this->_lexer->glimpse(); $leftExpr = $this->ArithmeticExpression(); $operator = $this->ComparisonOperator(); From aca1470e6b3591c0c5af05d9eaaa345fdcd6091d Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 20:00:19 +0100 Subject: [PATCH 11/16] [Tools] removed unused local variable $cm in InfoCommand class. --- lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php index 77458cf13..820cab128 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php @@ -68,7 +68,7 @@ EOT foreach ($entityClassNames as $entityClassName) { try { - $cm = $entityManager->getClassMetadata($entityClassName); + $entityManager->getClassMetadata($entityClassName); $output->writeln(sprintf("[OK] %s", $entityClassName)); } catch (MappingException $e) { $output->writeln("[FAIL] ".$entityClassName); From 68806aa8c6813f1e4d70c067c7f6f6c36a2f16a5 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 20:02:02 +0100 Subject: [PATCH 12/16] [Tools] removed unused local variable $idHash in DebugUnitOfWorkListener class and renamed AS keywords to as. --- lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php b/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php index 0548b9644..2688c0f8a 100644 --- a/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php +++ b/lib/Doctrine/ORM/Tools/DebugUnitOfWorkListener.php @@ -70,14 +70,14 @@ class DebugUnitOfWorkListener } fwrite($fh, "Flush Operation [".$this->context."] - Dumping identity map:\n"); - foreach ($identityMap AS $className => $map) { + foreach ($identityMap as $className => $map) { fwrite($fh, "Class: ". $className . "\n"); - foreach ($map AS $idHash => $entity) { + foreach ($map as $entity) { fwrite($fh, " Entity: " . $this->getIdString($entity, $uow) . " " . spl_object_hash($entity)."\n"); fwrite($fh, " Associations:\n"); $cm = $em->getClassMetadata($className); - foreach ($cm->associationMappings AS $field => $assoc) { + foreach ($cm->associationMappings as $field => $assoc) { fwrite($fh, " " . $field . " "); $value = $cm->reflFields[$field]->getValue($entity); @@ -97,12 +97,12 @@ class DebugUnitOfWorkListener fwrite($fh, " NULL\n"); } else if ($initialized) { fwrite($fh, "[INITIALIZED] " . $this->getType($value). " " . count($value) . " elements\n"); - foreach ($value AS $obj) { + foreach ($value as $obj) { fwrite($fh, " " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n"); } } else { fwrite($fh, "[PROXY] " . $this->getType($value) . " unknown element size\n"); - foreach ($value->unwrap() AS $obj) { + foreach ($value->unwrap() as $obj) { fwrite($fh, " " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n"); } } @@ -128,7 +128,7 @@ class DebugUnitOfWorkListener if ($uow->isInIdentityMap($entity)) { $ids = $uow->getEntityIdentifier($entity); $idstring = ""; - foreach ($ids AS $k => $v) { + foreach ($ids as $k => $v) { $idstring .= $k."=".$v; } } else { From 505537d4ce44ccfd32aec2c48a68a2d108e2fdbe Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 20:03:31 +0100 Subject: [PATCH 13/16] [Tools] renamed AS to as in EntityGenerator class. --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index a6d52175a..448ff6869 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -430,7 +430,7 @@ public function () $collections = array(); - foreach ($metadata->associationMappings AS $mapping) { + foreach ($metadata->associationMappings as $mapping) { if ($mapping['type'] & ClassMetadataInfo::TO_MANY) { $collections[] = '$this->'.$mapping['fieldName'].' = new \Doctrine\Common\Collections\ArrayCollection();'; } From ffa372a76c8b0a6f01c4aedc8af401442f3bd80a Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 20:05:56 +0100 Subject: [PATCH 14/16] [Tools] removed unused local variable in YamlExporter class. --- lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php index 2d16792b1..457a0430e 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php @@ -115,7 +115,7 @@ class YamlExporter extends AbstractExporter } if ($idGeneratorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) { - $ids[$metadata->getSingleIdentifierFieldName()]['generator']['strategy'] = $this->_getIdGeneratorTypeString($metadata->generatorType); + $ids[$metadata->getSingleIdentifierFieldName()]['generator']['strategy'] = $idGeneratorType; } if ($ids) { @@ -129,7 +129,6 @@ class YamlExporter extends AbstractExporter $array['fields'] = array_merge($array['fields'], $fieldMappings); } - $associations = array(); foreach ($metadata->associationMappings as $name => $associationMapping) { $cascade = array(); if ($associationMapping['isCascadeRemove']) { From c0620bf8574ecff5ea92549953cdaf34555af03b Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 20:07:10 +0100 Subject: [PATCH 15/16] [Tools] removed unused local variable $assocName in ResolveTargetEntityListener class. --- lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php b/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php index 621214fdd..afdd334f8 100644 --- a/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php +++ b/lib/Doctrine/ORM/Tools/ResolveTargetEntityListener.php @@ -61,7 +61,7 @@ class ResolveTargetEntityListener public function loadClassMetadata(LoadClassMetadataEventArgs $args) { $cm = $args->getClassMetadata(); - foreach ($cm->associationMappings as $assocName => $mapping) { + foreach ($cm->associationMappings as $mapping) { if (isset($this->resolveTargetEntities[$mapping['targetEntity']])) { $this->remapAssociation($cm, $mapping); } From 16da74d1dacf7a730cc6feaae88eaa90c83da2d6 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Thu, 12 Jan 2012 20:16:34 +0100 Subject: [PATCH 16/16] [Query] removed unused private _peekBeyond() method from Parser class. --- lib/Doctrine/ORM/Query/Parser.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index 7cf6d891d..7b9a67135 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -413,26 +413,6 @@ class Parser throw QueryException::semanticalError($message); } - /** - * Peeks beyond the specified token and returns the first token after that one. - * - * @param array $token - * @return array - */ - private function _peekBeyond($token) - { - $peek = $this->_lexer->peek(); - - while ($peek['value'] != $token) { - $peek = $this->_lexer->peek(); - } - - $peek = $this->_lexer->peek(); - $this->_lexer->resetPeek(); - - return $peek; - } - /** * Peek beyond the matched closing parenthesis and return the first token after that one. *