Code Duplication    Length = 13-14 lines in 2 locations

src/Governor/Framework/Test/Matchers/ListWithAllOfMatcher.php 1 location

@@ 57-69 (lines=13) @@
54
     */
55
    protected function matchesList(array $items)
56
    {
57
        foreach ($this->getMatchers() as $matcher) {
58
            $match = false;
59
            foreach ($items as $item) {
60
                if ($matcher->matches($item)) {
61
                    $match = true;
62
                }
63
            }
64
            if (!$match) {
65
                $this->reportFailed($matcher);
66
67
                return false;
68
            }
69
        }
70
71
        return true;
72
    }

src/Governor/Framework/Test/Matchers/ListWithAnyOfMatcher.php 1 location

@@ 54-67 (lines=14) @@
51
    public function matchesList(array $items)
52
    {
53
        $match = false;
54
        foreach ($this->getMatchers() as $matcher) {
55
            $matcherMatch = false;
56
            
57
            foreach ($items as $item) {
58
                if ($matcher->matches($item)) {
59
                    $match = true;
60
                    $matcherMatch = true;
61
                }
62
            }
63
            
64
            if (!$matcherMatch) {
65
                $this->reportFailed($matcher);
66
            }
67
        }
68
        return $match;
69
    }
70