Code Duplication    Length = 10-10 lines in 2 locations

src/Xtools/EditCounterRepository.php 2 locations

@@ 218-227 (lines=10) @@
215
     * @param User $user
216
     * @return array
217
     */
218
    public function getBlocksSet(Project $project, User $user)
219
    {
220
        $ipblocksTable = $this->getTableName($project->getDatabaseName(), 'ipblocks');
221
        $sql = "SELECT * FROM $ipblocksTable WHERE ipb_by = :userId";
222
        $resultQuery = $this->getProjectsConnection()->prepare($sql);
223
        $userId = $user->getId($project);
224
        $resultQuery->bindParam('userId', $userId);
225
        $resultQuery->execute();
226
        return $resultQuery->fetchAll();
227
    }
228
229
    /**
230
     * Get data for all blocks set on the given user.
@@ 235-244 (lines=10) @@
232
     * @param User $user
233
     * @return array
234
     */
235
    public function getBlocksReceived(Project $project, User $user)
236
    {
237
        $ipblocksTable = $this->getTableName($project->getDatabaseName(), 'ipblocks');
238
        $sql = "SELECT * FROM $ipblocksTable WHERE ipb_user = :userId";
239
        $resultQuery = $this->getProjectsConnection()->prepare($sql);
240
        $userId = $user->getId($project);
241
        $resultQuery->bindParam('userId', $userId);
242
        $resultQuery->execute();
243
        return $resultQuery->fetchAll();
244
    }
245
246
    /**
247
     * Get a user's total edit count on all projects.