Code Duplication    Length = 10-10 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/Section/Handler.php 2 locations

@@ 90-99 (lines=10) @@
87
     *
88
     * @return \eZ\Publish\SPI\Persistence\Content\Section
89
     */
90
    public function load($id)
91
    {
92
        $rows = $this->sectionGateway->loadSectionData($id);
93
94
        if (empty($rows)) {
95
            throw new NotFound('Section', $id);
96
        }
97
98
        return $this->createSectionFromArray(reset($rows));
99
    }
100
101
    /**
102
     * Get all section data.
@@ 122-131 (lines=10) @@
119
     *
120
     * @return \eZ\Publish\SPI\Persistence\Content\Section
121
     */
122
    public function loadByIdentifier($identifier)
123
    {
124
        $rows = $this->sectionGateway->loadSectionDataByIdentifier($identifier);
125
126
        if (empty($rows)) {
127
            throw new NotFound('Section', $identifier);
128
        }
129
130
        return $this->createSectionFromArray(reset($rows));
131
    }
132
133
    /**
134
     * Creates a Section from the given $data.