Code Duplication    Length = 14-14 lines in 2 locations

src/Log/Json.php 1 location

@@ 109-122 (lines=14) @@
106
     * @param \phpbu\App\Result $result
107
     * @return array
108
     */
109
    protected function extractErrors(Result $result) : array
110
    {
111
        $errors = [];
112
        /** @var \Exception $e */
113
        foreach ($result->getErrors() as $e) {
114
            $errors[] = [
115
                'class' => get_class($e),
116
                'msg'   => $e->getMessage(),
117
                'file'  => $e->getFile(),
118
                'line'  => $e->getLine()
119
            ];
120
        }
121
        return $errors;
122
    }
123
124
    /**
125
     * Return backup information.

src/Log/Webhook.php 1 location

@@ 224-237 (lines=14) @@
221
     * @param \phpbu\App\Result $result
222
     * @return array
223
     */
224
    protected function extractErrors(Result $result) : array
225
    {
226
        $errors = [];
227
        /** @var \Exception $e */
228
        foreach ($result->getErrors() as $e) {
229
            $errors[] = [
230
                'class' => get_class($e),
231
                'msg' => $e->getMessage(),
232
                'file' => $e->getFile(),
233
                'line' => $e->getLine()
234
            ];
235
        }
236
        return $errors;
237
    }
238
239
    /**
240
     * Return backup information.