Reference to undeclared constant \_CM_COULDNOTCHANGEROOTID
Open
$errs[] = sprintf(_CM_COULDNOTCHANGEROOTID, icms_conv_nr2local($com_id), icms_conv_nr2local($new_rootid));
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
$moddir = icms::$module->getVar('dirname');
- Exclude checks
Call to method getFirstChild
from undeclared class \icms_ipf_Tree
Open
$child_comments =& $xot->getFirstChild($com_id);
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_modid', $com_modid));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('com_status', XOOPS_COMMENT_ACTIVE));
- Exclude checks
Call to method error
from undeclared class \icms_core_Message
Open
icms_core_Message::error(_CM_COMDELETENG . ' (ID: ' . $comment->getVar('com_id') . ')');
- Exclude checks
Reference to undeclared constant \_CM_COULDNOTCHANGEPIDTOID
Open
$errs[] = sprintf(_CM_COULDNOTCHANGEPIDTOID, icms_conv_nr2local($com_id), icms_conv_nr2local($new_pid), icms_conv_nr2local($new_rootid));
- Exclude checks
Call to method error
from undeclared class \icms_core_Message
Open
icms_core_Message::error($errs);
- Exclude checks
Reference to undeclared constant \_NOPERM
Open
redirect_header($ref, 2, _NOPERM);
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('com_status', XOOPS_COMMENT_ACTIVE));
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
if (!icms::$user->isAdmin($com_modid)) {
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$sysperm_handler = icms::handler('icms_member_groupperm');
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Compo
Open
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_modid', $com_modid));
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$comment_handler = icms::handler('icms_data_comment');
- Exclude checks
Reference to undeclared constant \_CM_COMDELETED
Open
$msgs[] = _CM_COMDELETED . ' (ID: ' . icms_conv_nr2local($child_comments[$i]->getVar('com_id')) . ')';
- Exclude checks
Reference to undeclared constant \_CM_DELETESELECT
Open
icms_core_Message::confirm($comment_confirm, 'comment_delete.php', _CM_DELETESELECT);
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('com_itemid', $com_itemid));
- Exclude checks
Reference to undeclared constant \_BACK
Open
echo '<br /><a href="' . $redirect_page . '=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode . '">' . _BACK . '</a>';
- Exclude checks
Variable $com_itemid
is undeclared Open
redirect_header($redirect_page . '?' . $comment_config['itemName'] . '=' . (int) $com_itemid, 2, _NOPERM);
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('com_itemid', $com_itemid));
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$comment_handler = icms::handler('icms_data_comment');
- Exclude checks
Reference to undeclared constant \_NOPERM
Open
redirect_header($redirect_page . '?' . $comment_config['itemName'] . '=' . (int) $com_itemid, 2, _NOPERM);
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_modid', $com_modid));
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$member_handler = icms::handler('icms_member');
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$comment_handler = icms::handler('icms_data_comment');
- Exclude checks
Reference to undeclared constant \_CM_COULDNOTCHANGEPAID
Open
$errs[] = sprintf(_CM_COULDNOTCHANGEPAID, icms_conv_nr2local($com_id), icms_conv_nr2local($new_pid));
- Exclude checks
Call to method __construct
from undeclared class \icms_ipf_Tree
Open
$xot = new icms_ipf_Tree($thread_comments, 'com_id', 'com_pid', 'com_rootid');
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
if ('system' == icms::$module->getVar('dirname')) {
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('com_status', XOOPS_COMMENT_ACTIVE));
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$member_handler = icms::handler('icms_member');
- Exclude checks
Reference to undeclared constant \_CM_COMDELETED
Open
redirect_header($redirect_page .'=' . $com_itemid . '&com_order=' . $com_order . '&com_mode=' . $com_mode, 1, _CM_COMDELETED);
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
if (!is_object(icms::$user)) {
- Exclude checks
Reference to undeclared constant \_CM_COMDELETENG
Open
icms_core_Message::error(_CM_COMDELETENG . ' (ID: ' . $comment->getVar('com_id') . ')');
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Compo
Open
$criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('com_modid', $com_modid));
- Exclude checks
Call to method confirm
from undeclared class \icms_core_Message
Open
icms_core_Message::confirm($comment_confirm, 'comment_delete.php', _CM_DELETESELECT);
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
if (!defined('ICMS_ROOT_PATH') || !is_object(icms::$module)) {
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
if (XOOPS_COMMENT_APPROVENONE == icms::$module->config['com_rule']) {
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('com_itemid', $com_itemid));
- Exclude checks
Call to method getAllChild
from undeclared class \icms_ipf_Tree
Open
$c_child_comments =& $xot->getAllChild($new_rootid);
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('com_status', XOOPS_COMMENT_ACTIVE));
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$module_handler = icms::handler('icms_module');
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
$redirect_page .= $extra_param . '=' . icms_core_DataFilter::htmlSpecialChars(trim($_GET[$extra_param])) . '&';
- Exclude checks
Call to method getAllChild
from undeclared class \icms_ipf_Tree
Open
$child_comments =& $xot->getAllChild($com_id);
- Exclude checks
Reference to undeclared constant \_CM_COMDELETENG
Open
$msgs[] = _CM_COMDELETENG . ' (ID: ' . icms_conv_nr2local($child_comments[$i]->getVar('com_id')) . ')';
- Exclude checks
Reference to undeclared constant \_CM_DELETEALL
Open
$comment_confirm = array('com_id' => $com_id, 'com_mode' => $com_mode, 'com_order' => $com_order, 'op' => array(_CM_DELETEONE => 'delete_one', _CM_DELETEALL => 'delete_all'));
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
$comment_config = icms::$module->getInfo('comments');
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
$com_modid = icms::$module->getVar('mid');
- Exclude checks
Call to method htmlSpecialChars
from undeclared class \icms_core_DataFilter
Open
$comment_confirm_extra [$extra_param] = icms_core_DataFilter::htmlSpecialChars(trim($_GET[$extra_param]));
- Exclude checks
Call to method result
from undeclared class \icms_core_Message
Open
icms_core_Message::result($msgs);
- Exclude checks
Reference to undeclared constant \_CM_DELETEONE
Open
$comment_confirm = array('com_id' => $com_id, 'com_mode' => $com_mode, 'com_order' => $com_order, 'op' => array(_CM_DELETEONE => 'delete_one', _CM_DELETEALL => 'delete_all'));
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, icms::$user->getGroups())) {
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('com_itemid', $com_itemid));
- Exclude checks
Call to method __construct
from undeclared class \icms_ipf_Tree
Open
$xot = new icms_ipf_Tree($thread_comments, 'com_id', 'com_pid', 'com_rootid');
- Exclude checks
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (isset($comment_config['callback']['update']) && trim($comment_config['callback']['update']) != '') {
$skip = false;
if (!function_exists($comment_config['callback']['update'])) {
if (isset($comment_config['callbackFile'])) {
$callbackfile = trim($comment_config['callbackFile']);
- 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 312.
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 (isset($comment_config['callback']['update']) && trim($comment_config['callback']['update']) != '') {
$skip = false;
if (!function_exists($comment_config['callback']['update'])) {
if (isset($comment_config['callbackFile'])) {
$callbackfile = trim($comment_config['callbackFile']);
- 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 312.
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
Blank line found at end of control structure Open
- Exclude checks