Code Duplication    Length = 11-11 lines in 2 locations

source/Spiral/Database/Schemas/StateComparator.php 2 locations

@@ 175-185 (lines=11) @@
172
    /**
173
     * @return ReferenceInterface[]
174
     */
175
    public function addedForeigns(): array
176
    {
177
        $difference = [];
178
        foreach ($this->current->getForeigns() as $name => $foreign) {
179
            if (!$this->initial->knowsForeign($name)) {
180
                $difference[] = $foreign;
181
            }
182
        }
183
184
        return $difference;
185
    }
186
187
    /**
188
     * @return ReferenceInterface[]
@@ 190-200 (lines=11) @@
187
    /**
188
     * @return ReferenceInterface[]
189
     */
190
    public function droppedForeigns(): array
191
    {
192
        $difference = [];
193
        foreach ($this->initial->getForeigns() as $name => $foreign) {
194
            if (!$this->current->knowsForeign($name)) {
195
                $difference[] = $foreign;
196
            }
197
        }
198
199
        return $difference;
200
    }
201
202
    /**
203
     * Returns array where each value contain current and initial element state.