Code Duplication    Length = 4-4 lines in 2 locations

sample/inc/routes.php 2 locations

@@ 31-34 (lines=4) @@
28
29
    $acct_input = $action->param['acct'];
30
31
    if (!isset($_SESSION['mastodons'][$acct_input])) {
32
        set_flash(['error' => "Not logged in: {$acct_input}"]);
33
        return [302, ['Location' => '/'], null];
34
    };
35
36
    return [200, [], view('acct', [
37
        'acct' => $acct_input,
@@ 75-78 (lines=4) @@
72
73
    $_SESSION['mastodons'] = isset($_SESSION['mastodons']) ? $_SESSION['mastodons'] : [];
74
75
    if (isset($_SESSION['mastodons'][$instance])) {
76
        set_flash(['error' => "already linked to {$instance}"]);
77
        return [302, ['Location' => '/'], null];
78
    }
79
80
    $_SESSION['login'][$state] = [
81
        'instance' => $instance,