Code Duplication    Length = 3-4 lines in 2 locations

ratethread.php 1 location

@@ 39-42 (lines=4) @@
36
$ratinguser   = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0;
37
$anonwaitdays = 1;
38
$ip           = \Xmf\IPAddress::fromRequest()->asReadable();
39
foreach (['topic_id', 'rate', 'forum'] as $var) {
40
    //    ${$var} = isset($_POST[$var]) ? (int)($_POST[$var]) : (isset($_GET[$var])?(int)($_GET[$var]):0);
41
    ${$var} = Request::getInt($var, Request::getInt($var, 0, 'POST'), 'GET');
42
}
43
44
///** @var Newbb\TopicHandler $topicHandler */
45
//$topicHandler = Newbb\Helper::getInstance()->getHandler('Topic');

edit.php 1 location

@@ 17-19 (lines=3) @@
14
15
include_once __DIR__ . '/header.php';
16
17
foreach (['forum', 'topic_id', 'post_id', 'order'] as $getint) {
18
    ${$getint} = Request::getInt($getint, 0, 'GET');
19
}
20
21
if (!$topic_id && !$post_id) {
22
    $redirect = empty($forum) ? 'index.php' : "viewforum.php?forum={$forum}";