Code Duplication    Length = 10-10 lines in 2 locations

src/Xtools/EditCounterRepository.php 2 locations

@@ 266-275 (lines=10) @@
263
     * @param User $user
264
     * @return array
265
     */
266
    public function getBlocksSet(Project $project, User $user)
267
    {
268
        $ipblocksTable = $this->getTableName($project->getDatabaseName(), 'ipblocks');
269
        $sql = "SELECT * FROM $ipblocksTable WHERE ipb_by = :userId";
270
        $resultQuery = $this->getProjectsConnection()->prepare($sql);
271
        $userId = $user->getId($project);
272
        $resultQuery->bindParam('userId', $userId);
273
        $resultQuery->execute();
274
        return $resultQuery->fetchAll();
275
    }
276
277
    /**
278
     * @param Project $project
@@ 282-291 (lines=10) @@
279
     * @param User $user
280
     * @return array
281
     */
282
    public function getBlocksReceived(Project $project, User $user)
283
    {
284
        $ipblocksTable = $this->getTableName($project->getDatabaseName(), 'ipblocks');
285
        $sql = "SELECT * FROM $ipblocksTable WHERE ipb_user = :userId";
286
        $resultQuery = $this->getProjectsConnection()->prepare($sql);
287
        $userId = $user->getId($project);
288
        $resultQuery->bindParam('userId', $userId);
289
        $resultQuery->execute();
290
        return $resultQuery->fetchAll();
291
    }
292
293
    /**
294
     * Get a user's total edit count on all projects.