smartfaq_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
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
eloc 0
nc 1
nop 1
1
<?php declare(strict_types=1);
2
3
/**
4
 * Module: SmartFAQ
5
 * Author: The SmartFactory <www.smartfactory.ca>
6
 * Licence: GNU
7
 * @param $faq_id
8
 * @param $total_num
9
 */
10
function smartfaq_com_update($faq_id, $total_num): void
11
{
12
    $db  = \XoopsDatabaseFactory::getDatabaseConnection();
13
    $sql = 'UPDATE ' . $db->prefix('smartfaq_faq') . ' SET comments = ' . $total_num . ' WHERE faqid = ' . $faq_id;
14
    $db->query($sql);
15
}
16
17
/**
18
 * @param $comment
19
 */
20
function smartfaq_com_approve(&$comment): void
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

20
function smartfaq_com_approve(/** @scrutinizer ignore-unused */ &$comment): void

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...
21
{
22
    // notification mail here
23
}
24