wflinks_com_approve()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * You may not change or alter any portion of this comment or credits
4
 * of supporting developers from this source code or any supporting source code
5
 * which is considered copyrighted (c) material of the original comment or credit authors.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * @copyright      {@link https://xoops.org/ XOOPS Project}
14
 * @license        {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
15
 * @package
16
 * @since
17
 * @author         XOOPS Development Team
18
 * @param mixed $linkload_id
19
 * @param mixed $total_num
20
 */
21
22
// comment callback functions
23
24
/**
25
 * @param $linkload_id
26
 * @param $total_num
27
 */
28
function wflinks_com_update($linkload_id, $total_num)
29
{
30
    $db  = \XoopsDatabaseFactory::getDatabaseConnection();
31
    $sql = 'UPDATE ' . $db->prefix('wflinks_links') . ' SET comments=' . $total_num . ' WHERE lid=' . $linkload_id;
32
    $db->query($sql);
33
}
34
35
/**
36
 * @param $comment
37
 */
38
function wflinks_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

38
function wflinks_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...
39
{
40
    // notification mail here
41
}
42