Code Duplication    Length = 10-10 lines in 2 locations

lib/Doctrine/ORM/Query/SqlWalker.php 2 locations

@@ 772-781 (lines=10) @@
769
                $owningClass   = (isset($assoc['inherited'])) ? $this->em->getClassMetadata($assoc['inherited']) : $class;
770
                $sqlTableAlias = $this->getSQLTableAlias($owningClass->getTableName(), $dqlAlias);
771
772
                foreach ($assoc['joinColumns'] as $joinColumn) {
773
                    $columnName  = $joinColumn['name'];
774
                    $columnAlias = $this->getSQLColumnAlias($columnName);
775
                    $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
776
777
                    $quotedColumnName       = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
778
                    $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias;
779
780
                    $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $isIdentifier, $columnType);
781
                }
782
            }
783
784
            // Add foreign key columns to SQL, if necessary
@@ 801-810 (lines=10) @@
798
                    if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
799
                        $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
800
801
                        foreach ($assoc['joinColumns'] as $joinColumn) {
802
                            $columnName  = $joinColumn['name'];
803
                            $columnAlias = $this->getSQLColumnAlias($columnName);
804
                            $columnType  = PersisterHelper::getTypeOfColumn($joinColumn['referencedColumnName'], $targetClass, $this->em);
805
806
                            $quotedColumnName       = $this->quoteStrategy->getJoinColumnName($joinColumn, $subClass, $this->platform);
807
                            $sqlSelectExpressions[] = $sqlTableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias;
808
809
                            $this->rsm->addMetaResult($dqlAlias, $columnAlias, $columnName, $subClass->isIdentifier($columnName), $columnType);
810
                        }
811
                    }
812
                }
813
            }