Code Duplication    Length = 12-12 lines in 2 locations

HandEvaluator/HandFinder.php 2 locations

@@ 306-317 (lines=12) @@
303
     *
304
     * @return array|bool
305
     */
306
    private function isFourOfAKind(array $cards)
307
    {
308
        $faces = $this->findMultipleFaceCards($cards);
309
310
        foreach ($faces as $face => $groupedFaces) {
311
            if (count($groupedFaces) == 4) {
312
                return $this->getResponse('Four of a kind', 8, $this->getRank($groupedFaces), $groupedFaces);
313
            }
314
        }
315
316
        return false;
317
    }
318
319
    /**
320
     * Return an array if the cards are a Full House
@@ 465-476 (lines=12) @@
462
     *
463
     * @return array|bool
464
     */
465
    private function isTreeOfAKind(array $cards)
466
    {
467
        $faces = $this->findMultipleFaceCards($cards);
468
469
        foreach ($faces as $face => $groupedFaces) {
470
            if (count($groupedFaces) == 3) {
471
                return $this->getResponse('Three of a kind', 4, $this->getRank($groupedFaces), $groupedFaces);
472
            }
473
        }
474
475
        return false;
476
    }
477
478
    /**
479
     * Find one or n pair