Code Duplication    Length = 4-4 lines in 2 locations

action.post.php 1 location

@@ 24-27 (lines=4) @@
21
$op   = in_array($op, ['approve', 'delete', 'restore', 'split'], true) ? $op : '';
22
$mode = Request::getInt('mode', 1, 'GET');
23
24
if (0 === count($post_id) || 0 === count($op)) {
25
    // irmtfan - issue with javascript:history.go(-1)
26
    redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_NORIGHTTOACCESS);
27
}
28
/** @var NewbbPostHandler $postHandler */
29
$postHandler = xoops_getModuleHandler('post', 'newbb');
30
/** @var NewbbTopicHandler $topicHandler */

action.topic.php 1 location

@@ 22-25 (lines=4) @@
19
$op = Request::getCmd('op', '', 'POST');
20
$op = in_array($op, ['approve', 'delete', 'restore', 'move'], true) ? $op : '';
21
22
if (0 === count($topic_id) || 0 === count($op)) {
23
    // irmtfan - issue with javascript:history.go(-1)
24
    redirect_header(Request::getString('HTTP_REFERER', '', 'SERVER'), 2, _MD_NEWBB_NORIGHTTOACCESS);
25
}
26
27
$topic_id = array_values($topic_id);
28
/** @var \NewbbTopicHandler|XoopsPersistableObjectHandler $topicHandler */