Code Duplication    Length = 6-6 lines in 3 locations

lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php 1 location

@@ 368-373 (lines=6) @@
365
366
        $conditions = [];
367
368
        foreach ($joinColumns as $joinColumn) {
369
            $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
370
            $refColumnName  = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
371
372
            $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName;
373
        }
374
375
        return $conditions;
376
    }

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

@@ 998-1003 (lines=6) @@
995
                    ? $assoc['joinTable']['joinColumns']
996
                    : $assoc['joinTable']['inverseJoinColumns'];
997
998
                foreach ($relationColumns as $joinColumn) {
999
                    $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
1000
                    $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
1001
1002
                    $conditions[] = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1003
                }
1004
1005
                $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions);
1006
@@ 1015-1020 (lines=6) @@
1012
                    ? $assoc['joinTable']['inverseJoinColumns']
1013
                    : $assoc['joinTable']['joinColumns'];
1014
1015
                foreach ($relationColumns as $joinColumn) {
1016
                    $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
1017
                    $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
1018
1019
                    $conditions[] = $targetTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableAlias . '.' . $quotedSourceColumn;
1020
                }
1021
1022
                // Apply remaining inheritance restrictions
1023
                $discrSql = $this->_generateDiscriminatorColumnConditionSQL([$joinedDqlAlias]);