Code Duplication    Length = 8-8 lines in 2 locations

lib/Doctrine/ORM/UnitOfWork.php 2 locations

@@ 1563-1570 (lines=8) @@
1560
     *
1561
     * @return object|bool The found entity or FALSE.
1562
     */
1563
    public function tryGetByIdHash($idHash, $rootClassName)
1564
    {
1565
        $stringIdHash = (string) $idHash;
1566
1567
        return isset($this->identityMap[$rootClassName][$stringIdHash])
1568
            ? $this->identityMap[$rootClassName][$stringIdHash]
1569
            : false;
1570
    }
1571
1572
    /**
1573
     * Checks whether an entity is registered in the identity map of this UnitOfWork.
@@ 2944-2951 (lines=8) @@
2941
     * @return object|bool Returns the entity with the specified identifier if it exists in
2942
     *                     this UnitOfWork, FALSE otherwise.
2943
     */
2944
    public function tryGetById($id, $rootClassName)
2945
    {
2946
        $idHash = implode(' ', (array) $id);
2947
2948
        return isset($this->identityMap[$rootClassName][$idHash])
2949
            ? $this->identityMap[$rootClassName][$idHash]
2950
            : false;
2951
    }
2952
2953
    /**
2954
     * Schedules an entity for dirty-checking at commit-time.