Code Duplication    Length = 9-9 lines in 2 locations

src/Mouf/Utils/Patcher/Controllers/PatchController.php 2 locations

@@ 198-206 (lines=9) @@
195
        $nbPatchesApplied = array_sum($appliedPatchArray);
196
        $nbPatchesSkipped = array_sum($skippedPatchArray);
197
        $msg = '';
198
        if ($nbPatchesApplied !== 0) {
199
            $patchArr = [];
200
            foreach ($appliedPatchArray as $name => $number) {
201
                $name = $name ?: 'default';
202
                $patchArr[] = plainstring_to_htmlprotected($name).': '.$number;
203
            }
204
205
            $msg .= sprintf('%d patch(es) applied (%s)', $nbPatchesApplied, implode(', ', $patchArr));
206
        }
207
        if ($nbPatchesSkipped !== 0) {
208
            $patchArr = [];
209
            foreach ($skippedPatchArray as $name => $number) {
@@ 207-215 (lines=9) @@
204
205
            $msg .= sprintf('%d patch(es) applied (%s)', $nbPatchesApplied, implode(', ', $patchArr));
206
        }
207
        if ($nbPatchesSkipped !== 0) {
208
            $patchArr = [];
209
            foreach ($skippedPatchArray as $name => $number) {
210
                $name = $name ?: 'default';
211
                $patchArr[] = plainstring_to_htmlprotected($name).': '.$number;
212
            }
213
214
            $msg .= sprintf('%d patch(es) skipped (%s)', $nbPatchesSkipped, implode(', ', $patchArr));
215
        }
216
217
        if ($msg !== '') {
218
            set_user_message($msg, UserMessageInterface::SUCCESS);