oledrion_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
eloc 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
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
 * oledrion
14
 *
15
 * @copyright   {@link https://xoops.org/ XOOPS Project}
16
 * @license     {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
17
 * @author      Hervé Thouzard (http://www.herve-thouzard.com/)
18
 * @param $product_id
19
 * @param $total_num
20
 */
21
22
// defined('XOOPS_ROOT_PATH') || die('Restricted access');
23
24
function oledrion_com_update($product_id, $total_num)
25
{
26
    require_once XOOPS_ROOT_PATH . '/modules/oledrion/include/common.php';
27
    global $productsHandler;
28
    if (!is_object($productsHandler)) {
29
        //        $handlers            = HandlerManager::getInstance();
30
        $productsHandler = $handlers->oledrion_products;
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $handlers seems to be never defined.
Loading history...
31
    }
32
    $productsHandler->updateCommentsCount($product_id, $total_num);
33
}
34
35
/**
36
 * @param $comment
37
 */
38
function oledrion_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 oledrion_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