e107_handlers/comment_class.php
Method form_comment
has 9 arguments (exceeds 7 allowed). Consider refactoring. Open
Open
function form_comment($action, $table, $id, $subject, $content_type, $return = FALSE, $rating = FALSE, $tablerender = TRUE,$pid = false)
Avoid deeply nested control flow statements. Open
Open
if ($installed = isset($pref['plug_installed'][$var['plugin_path']]))
{
$qryp = str_replace("{NID}", $row['comment_item_id'], $var['qry']);
if ($sql2->gen($qryp))
{
Avoid deeply nested control flow statements. Open
Open
if ($sql2->select($var['db_table'], $var['db_title'], $var['db_id']." = '".$row['comment_item_id']."' "))
{
$row2 = $sql2->fetch();
$ret['comment_type'] = $var['plugin_name'];
$ret['comment_title'] = $tp->toHTML($row2[$var['db_title']], TRUE, 'emotes_off, no_make_clickable');
Method compose_comment
has 8 arguments (exceeds 7 allowed). Consider refactoring. Open
Open
function compose_comment($table, $action, $id, $width, $subject, $rate = FALSE, $return = FALSE, $tablerender = TRUE)
Avoid too many return
statements within this method. Open
Open
return $ns->tablerender("<span id='e-comment-total'>".$this->totalComments."</span> ".LAN_COMMENTS, $TEMPL, 'comment', true);
Avoid too many return
statements within this method. Open
Open
return emessage;
Avoid too many return
statements within this method. Open
Open
return false; //3rd party code interception
Avoid too many return
statements within this method. Open
Open
return $inserted_id; // return the ID number so it can be used. true;
Avoid too many return
statements within this method. Open
Open
return "Error";
Avoid too many return
statements within this method. Open
Open
return 'ro';
Avoid too many return
statements within this method. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return (!$return) ? "" : $ret;
Returning type null
but form_comment()
is declared to return string
Open
Open
return null;
- Exclude checks
Parameter $table
has undeclared type \unknown_type
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Argument 1 (caption)
is null
but \e_render::tablerender()
takes string
defined at /code/e107_handlers/e_render_class.php:314
Open
Open
echo $ns->tablerender(null, $text, 'comment', true);
- Exclude checks
Returning type ?string
but form_comment()
is declared to return string
Open
Open
return $text;
- Exclude checks
Variable $plugin_name
is undeclared Open
Open
$e_comment['plugin_name'] = $plugin_name;
- Exclude checks
Default value for \unknown_type
$rateindex
can't be false
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Parameter $pid
has undeclared type \unknown_type
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Parameter $id
has undeclared type \unknown_type
Open
Open
function count_comments($table, $id)
- Exclude checks
Call to deprecated function \getperms()
defined at /code/class2.php:1322
Open
Open
if($this->totalComments && getperms("B"))
- Exclude checks
Call to deprecated function \getperms()
defined at /code/class2.php:1322
Open
Open
if(!getperms('0') && !getperms("B"))
- Exclude checks
Suspicious array access to ?mixed
Open
Open
$ret['comment_title'] = $tp->toHTML($row2[$var['db_title']], TRUE, 'emotes_off, no_make_clickable');
- Exclude checks
Parameter $rateindex
has undeclared type \unknown_type
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Parameter $type
has undeclared type \str
Open
Open
public function getNested($pid, $type)
- Exclude checks
Argument 3 (default)
is 'e107'
but \e107::pref()
takes null
defined at /code/e107_handlers/e107_class.php:4016
Open
Open
$this->engine = e107::pref('core', 'comments_engine', 'e107');
- Exclude checks
Call to deprecated function \getperms()
defined at /code/class2.php:1322
Open
Open
if(getperms('B')) // moderator perms.
- Exclude checks
Default value for \unknown_type
$comment
can't be string
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Default value for \unknown_type
$pid
can't be string
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Parameter $subject
has undeclared type \unknown_type
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Variable $ret
was undeclared, but array fields are being added to it. Open
Open
$ret['comment'] = $text;
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param array - a row from the comments table.':
after array,
did not see an element name (will guess based on comment order) Open
Open
* @param array - a row from the comments table.
- Exclude checks
Parameter $comment
has undeclared type \unknown_type
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Suspicious array access to ?mixed
Open
Open
if ($sql2->select($var['db_table'], $var['db_title'], $var['db_id']." = '".$row['comment_item_id']."' "))
- Exclude checks
Suspicious argument null
for an echo/print statement Open
Open
echo $ns->tablerender(null, $text, 'comment', true);
- Exclude checks
Suspicious argument array|bool
for an echo/print statement Open
Open
echo $text;
- Exclude checks
Default value for \unknown_type
$table
can't be string
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Argument 1 (caption)
is null
but \e_render::tablerender()
takes string
defined at /code/e107_handlers/e_render_class.php:314
Open
Open
return $ns->tablerender(null, $text, 'comment', true);
- Exclude checks
Call to deprecated function \getperms()
defined at /code/class2.php:1322
Open
Open
if(!getperms('0') && !getperms("B"))
- Exclude checks
Default value for int
$id
can't be string
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Argument 2 (text)
is array|bool
but \e_render::tablerender()
takes string
defined at /code/e107_handlers/e_render_class.php:314
Open
Open
return $ns->tablerender(null, $text, 'comment', true);
- Exclude checks
Default value for int
$addrating
can't be false
Open
Open
function render_comment($row, $table, $action, $id, $width=0, $subject='', $addrating = FALSE)
- Exclude checks
Parameter $table
has undeclared type \unknown_type
Open
Open
function count_comments($table, $id)
- Exclude checks
Argument 1 (table)
is \unknown_type
but \comment::getCommentType()
takes string
defined at /code/e107_handlers/comment_class.php:914
Open
Open
$type = $this->getCommentType($table);
- Exclude checks
Variable $plugin_path
is undeclared Open
Open
$e_comment['plugin_path'] = $plugin_path;
- Exclude checks
Default value for \unknown_type
$subject
can't be string
Open
Open
function enter_comment($data, $comment='', $table='', $id='', $pid='', $subject='', $rateindex = FALSE)
- Exclude checks
Suspicious argument null
for an echo/print statement Open
Open
echo $ns->tablerender("<span id='e-comment-total'>".$this->totalComments."</span> ".LAN_COMMENTS, $TEMPL, 'comment', TRUE);
- Exclude checks
Argument 2 (text)
is array|bool
but \e_render::tablerender()
takes string
defined at /code/e107_handlers/e_render_class.php:314
Open
Open
echo $ns->tablerender(null, $text, 'comment', true);
- Exclude checks
Suspicious array access to ?mixed
Open
Open
$ret['comment_type'] = $var['plugin_name'];
- Exclude checks
Suspicious array access to false
Open
Open
$data[$key] = $e_comment;
- Exclude checks
Variable $link_name
is undeclared Open
Open
$e_comment['db_title'] = $link_name;
- Exclude checks
Variable $e_comment
is undeclared Open
Open
unset($e_comment, $key);
- Exclude checks
Argument 2 (fields)
is true
but \e_db::retrieve()
takes string
defined at /code/e107_handlers/e_db_interface.php:153
Open
Open
if ($rows = $sql->retrieve($query,true))
- Exclude checks
Variable $reply_location
is undeclared Open
Open
$e_comment['reply_location'] = $reply_location;
- Exclude checks
Suspicious array access to false
Open
Open
$data[$key] = $e_comment;
- Exclude checks
Suspicious array access to ?mixed
Open
Open
$ret['comment_url'] = str_replace("{NID}", $row['comment_item_id'], $var['reply_location']);
- Exclude checks
Suspicious array access to ?mixed
Open
Open
$ret['comment_category_heading'] = $var['plugin_name'];
- Exclude checks
Argument 2 (fields)
is true
but \e_db::retrieve()
takes string
defined at /code/e107_handlers/e_db_interface.php:153
Open
Open
if($nested = e107::getDb()->retrieve($query, true))
- Exclude checks
Variable $key
is undeclared Open
Open
unset($e_comment, $key);
- Exclude checks
Variable $db_id
is undeclared Open
Open
$e_comment['db_id'] = $db_id;
- Exclude checks
Variable $db_table
is undeclared Open
Open
$e_comment['db_table'] = $db_table;
- Exclude checks
Suspicious array access to ?mixed
Open
Open
$ret['comment_category_url'] = e_PLUGIN_ABS.$var['plugin_name'].'/'.$var['plugin_name'].'.php';
- Exclude checks