Code Duplication    Length = 19-19 lines in 2 locations

src/Governor/Framework/Test/ResultValidatorImpl.php 2 locations

@@ 90-108 (lines=19) @@
87
        return $this;
88
    }
89
90
    public function expectPublishedEvents(array $expectedEvents)
91
    {
92
        if (count($expectedEvents) !== count($this->publishedEvents)) {
93
            $this->reporter->reportWrongEvent($this->publishedEvents,
94
                $expectedEvents, $this->actualException);
95
        }
96
97
        foreach ($expectedEvents as $expectedEvent) {
98
            $actualEvent = current($this->publishedEvents);
99
            if (!$this->verifyEventEquality($expectedEvent,
100
                $actualEvent->getPayload())) {
101
                $this->reporter->reportWrongEvent($this->publishedEvents,
102
                    $expectedEvents, $this->actualException);
103
            }
104
105
            next($this->publishedEvents);
106
        }
107
        return $this;
108
    }
109
110
    public function expectPublishedEventsMatching(Matcher $matcher)
111
    {
@@ 145-163 (lines=19) @@
142
        return $this;
143
    }
144
145
    public function expectStoredEvents(array $expectedEvents)
146
    {
147
        if (count($expectedEvents) !== count($this->storedEvents)) {
148
            $this->reporter->reportWrongEvent($this->storedEvents,
149
                $expectedEvents, $this->actualException);
150
        }
151
152
        foreach ($expectedEvents as $expectedEvent) {
153
            $actualEvent = current($this->storedEvents);
154
            if (!$this->verifyEventEquality($expectedEvent,
155
                $actualEvent->getPayload())) {
156
                $this->reporter->reportWrongEvent($this->storedEvents,
157
                    $expectedEvents, $this->actualException);
158
            }
159
160
            next($this->storedEvents);
161
        }
162
        return $this;
163
    }
164
165
    public function expectStoredEventsMatching(Matcher $matcher)
166
    {