GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 16-20 lines in 2 locations

routes/manage.php 1 location

@@ 304-319 (lines=16) @@
301
        $app->redirect($app->request()->getPathInfo());
302
    }
303
304
    if (isset($_POST['delete'])) {
305
        ORM::get_db()->beginTransaction();
306
        $ok = deleteDocumentById($revision['original_document_id'], $preferences);
307
        $ok = $ok && $revision->delete();
308
309
        if ($ok) {
310
            $app->flash('save_ok', 'delete');
311
            ORM::get_db()->commit();
312
        }
313
        else {
314
            $app->flash('save_error', 'delete');
315
            ORM::get_db()->rollback();
316
        }
317
318
        $app->redirect($app->urlFor('modify', array('id' => $delivery['id'], 'folderid' => $folder['id'])));
319
    }
320
321
    if (isset($_POST['replace']) && isset($_FILES['document']) && isset($_FILES['document']['name'][0]) && is_uploaded_file($_FILES['document']['tmp_name'][0])) {
322

routes/tree.php 1 location

@@ 223-242 (lines=20) @@
220
        $app->redirect($url);
221
    }
222
223
    if (isset($_POST['deletefolder'])) {
224
        // realizar los cambios en una transacción
225
        ORM::get_db()->beginTransaction();
226
227
        $folder = getFolderById($organization['id'], $id);
228
229
        $category = $folder['category_id'];
230
231
        $ok = $folder->delete();
232
233
        if ($ok) {
234
            $app->flash('save_ok', 'delete');
235
            ORM::get_db()->commit();
236
            $app->redirect($app->urlFor('tree', array('id' => $category)));
237
        }
238
        else {
239
            $app->flash('save_error', 'delete');
240
            ORM::get_db()->rollback();
241
        }
242
    }
243
244
    $folder = getFolder($organization['id'], $id);
245