lexikon_com_update()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
// comment callback functions
3
4
/**
5
 * @param $entry_ID
6
 * @param $total_num
7
 */
8
function lexikon_com_update($entry_ID, $total_num)
9
{
10
    $db  = \XoopsDatabaseFactory::getDatabaseConnection();
11
    $sql = 'UPDATE ' . $db->prefix('lxentries') . ' SET comments = ' . $total_num . ' WHERE entryID = ' . $entry_ID;
12
    $db->query($sql);
13
}
14
15
/**
16
 * @param $comment
17
 */
18
function lexikon_com_approve(&$comment)
0 ignored issues
show
Unused Code introduced by
The parameter $comment is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

18
function lexikon_com_approve(/** @scrutinizer ignore-unused */ &$comment)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
{
20
    // notification mail here
21
}
22