Code Duplication    Length = 8-8 lines in 2 locations

Components/LayoutMultiplePosts/functions.php 1 location

@@ 29-36 (lines=8) @@
26
    return array_merge(getPasswordContext(), $context, $data);
27
});
28
29
function getPasswordContext($postId = null)
30
{
31
    $passwordProtected = post_password_required($postId);
32
    return [
33
        'passwordProtected' => $passwordProtected,
34
        'passwordForm' => $passwordProtected ? get_the_password_form() : ''
35
    ];
36
}
37

Components/LayoutSinglePost/functions.php 1 location

@@ 29-36 (lines=8) @@
26
    }
27
});
28
29
function getPasswordContext($postId)
30
{
31
    $passwordProtected = post_password_required($postId);
32
    return [
33
        'passwordProtected' => $passwordProtected,
34
        'passwordForm' => $passwordProtected ? get_the_password_form() : ''
35
    ];
36
}
37