Identical blocks of code found in 2 locations. Consider refactoring. Open
} elseif (!$con) {
$confirmed = (0 == $con) ? 1 : 0;
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' SET confirmed=' . $confirmed;
if (1 == $confirmed) {
$sql .= ', acknowledged=' . $confirmed;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 147.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if ($con) {
$confirmed = (0 == $con) ? 1 : 0;
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' SET confirmed=' . $confirmed;
if (1 == $confirmed) {
$sql .= ', acknowledged=' . $confirmed;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 147.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if ($ack && !$con) {
$acknowledged = (0 == $ack) ? 1 : 0;
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' SET acknowledged=' . $acknowledged;
if (0 == $acknowledged) {
$sql .= ', confirmed=0 ';
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 143.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
} elseif (!$ack && !$con) {
$acknowledged = (0 == $ack) ? 1 : 0;
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' SET acknowledged=' . $acknowledged;
if (0 == $acknowledged) {
$sql .= ', confirmed=0 ';
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 143.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
echo '
<fieldset style="border: #E8E8E8 1px solid;">
<legend style="display: inline; font-weight: bold; color: #0A3760;">' . _AM_XOOPSTUBE_BROKEN_REPORTINFO . '</legend>
<div style="padding: 8px;">' . _AM_XOOPSTUBE_BROKEN_REPORTSNO . ' <b>' . $totalbrokenvideos . '</b><div>
<div style="padding-left: 8px;">
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 102.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Line exceeds 120 characters; contains 187 characters Open
echo '<td class="even" style="text-align: center;">' . Xoopstube\Utility::getTimestamp(formatTimestamp($date, $GLOBALS['xoopsModuleConfig']['dateformatadmin'])) . '</td>';
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' SET acknowledged=' . $acknowledged;
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
$sql = 'UPDATE ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' SET acknowledged=' . $acknowledged;
- Exclude checks
Line exceeds 120 characters; contains 150 characters Open
echo '<td class="even"><a href="mailto:' . $email . '">' . \XoopsUserUtility::getUnameFromId($sender) . '</a> (' . $ip . ')</td>';
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
<legend style="display: inline; font-weight: bold; color: #0A3760;">' . _AM_XOOPSTUBE_BROKEN_REPORTINFO . '</legend>
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
<div style="padding: 8px;">' . _AM_XOOPSTUBE_BROKEN_REPORTSNO . ' <b>' . $totalbrokenvideos . '</b><div>
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
echo '<a href="brokenvideo.php?op=delbrokenvideos&lid=' . $lid . '">' . $xtubeImageArray['deleteimg'] . '</a>';
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$GLOBALS['xoopsDB']->queryF('DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' WHERE lid=' . $lid);
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
echo '<tr style="text-align: center;"><td style="text-align: center;" class="head" colspan="8">' . _AM_XOOPSTUBE_BROKEN_NOFILEMATCH . '</td></tr>';
- Exclude checks
Line exceeds 120 characters; contains 172 characters Open
$result2 = $GLOBALS['xoopsDB']->query('SELECT cid, title, vidid, submitter FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE lid=' . $lid);
- Exclude checks
Line exceeds 120 characters; contains 152 characters Open
$result3 = $GLOBALS['xoopsDB']->query('SELECT uname, email FROM ' . $GLOBALS['xoopsDB']->prefix('users') . ' WHERE uid=' . $sender);
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
echo '<td class="even"><a href="brokenvideo.php?op=updateNotice&lid=' . $lid . '&con=' . (int)$confirmed . '">' . $con_image . '</a></td>';
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$GLOBALS['xoopsDB']->queryF('DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' WHERE lid=' . $lid);
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
while (list($reportid, $lid, $sender, $ip, $date, $confirmed, $acknowledged) = $GLOBALS['xoopsDB']->fetchRow($result)) {
- Exclude checks
Line exceeds 120 characters; contains 244 characters Open
echo '<td class="even" style="text-align: left;"><a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/singlevideo.php?cid=' . $cid . '&lid=' . $lid . '" target="_blank">' . $videoshowname . '</a></td>';
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
echo '<table width="100%" border="0" cellspacing="1" cellpadding="2" class="outer" style="font-size: smaller;">';
- Exclude checks
Line exceeds 120 characters; contains 163 characters Open
echo '<td class="even"><a href="brokenvideo.php?op=updateNotice&lid=' . $lid . '&ack=' . (int)$acknowledged . '">' . $ack_image . ' </a></td>';
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$GLOBALS['xoopsDB']->queryF('DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE lid=' . $lid);
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
$GLOBALS['xoopsDB']->queryF('DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_votedata') . ' WHERE lid=' . $lid);
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
$result = $GLOBALS['xoopsDB']->query('SELECT * FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_broken') . ' ORDER BY reportid');
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
echo '<a href="brokenvideo.php?op=ignorebrokenvideos&lid=' . $lid . '">' . $xtubeImageArray['ignore'] . '</a> ';
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
$result4 = $GLOBALS['xoopsDB']->query('SELECT uname, email FROM ' . $GLOBALS['xoopsDB']->prefix('users') . ' WHERE uid=' . $sender);
- Exclude checks