wfdownloads_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
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 2
rs 10
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
 * Wfdownloads module
14
 *
15
 * @copyright       XOOPS Project (https://xoops.org)
16
 * @license         GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
17
 * @package         wfdownload
18
 * @since           3.23
19
 * @author          Xoops Development Team
20
 */
21
22
use XoopsModules\Wfdownloads;
23
use XoopsModules\Wfdownloads\Helper;
24
25
defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
26
require_once __DIR__ . '/common.php';
27
28
// comment callback functions
29
30
/**
31
 * @param $downloadId
32
 * @param $commentCount
33
 */
34
function wfdownloads_com_update($downloadId, $commentCount)
35
{
36
    $helper = Helper::getInstance();
37
    $helper->getHandler('Download')->updateAll('comments', (int)$commentCount, new Criteria('lid', (int)$downloadId));
38
}
39
40
/**
41
 * @param $comment
42
 */
43
function wfdownloads_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

43
function wfdownloads_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...
44
{
45
    // notification mail here
46
}
47