Code Duplication    Length = 10-10 lines in 2 locations

src/Repository/AbstractEndpointRepository.php 2 locations

@@ 186-195 (lines=10) @@
183
     *
184
     * @return array
185
     */
186
    public function readSinglebyId($id, $keyType = 'primary', $object = false, $archive = false)
187
    {
188
        $query = $this->newQuery();
189
        $key = $this->returnKeyType($keyType);
190
191
        $query->cols(['*'])
192
              ->where("{$key} = ?", $id);
193
194
        return $this->fireStatementAndReturn($query, true, $object, $archive);
195
    }
196
197
    /**
198
     * Allows reading of elements by ID including those from the archive
@@ 223-232 (lines=10) @@
220
     *
221
     * @return array
222
     */
223
    public function readAllById($id, $keyType = 'primary', $archive = false)
224
    {
225
        $query = $this->newQuery();
226
        $key = $this->returnKeyType($keyType);
227
228
        $query->cols(['*'])
229
              ->where("{$key} = ?", $id);
230
231
        return $this->fireStatementAndReturn($query, false, false, $archive);
232
    }
233
234
    /**
235
     * Grab all data from the database including from the archive