xoops_module_uninstall_cardealer()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
nc 1
nop 1
dl 0
loc 17
rs 9.9666
c 1
b 0
f 0
1
<?php
2
3
/*
4
 You may not change or alter any portion of this comment or credits
5
 of supporting developers from this source code or any supporting source code
6
 which is considered copyrighted (c) material of the original comment or credit authors.
7
8
 This program is distributed in the hope that it will be useful,
9
 but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
*/
12
13
/**
14
 * Module: cardealer
15
 *
16
 * @category        Module
17
 * @package         cardealer
18
 * @author          XOOPS Development Team <[email protected]> - <https://xoops.org>
19
 * @copyright       {@link https://xoops.org/ XOOPS Project}
20
 * @license         GPL 2.0 or later
21
 * @link            https://xoops.org/
22
 * @since           1.0.0
23
 */
24
25
use XoopsModules\Cardealer;
26
27
/**
28
 * Prepares system prior to attempting to uninstall module
29
 * @param \XoopsModule $module {@link XoopsModule}
30
 *
31
 * @return bool true if ready to uninstall, false if not
32
 */
33
function xoops_module_pre_uninstall_cardealer(\XoopsModule $module)
0 ignored issues
show
Unused Code introduced by
The parameter $module 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

33
function xoops_module_pre_uninstall_cardealer(/** @scrutinizer ignore-unused */ \XoopsModule $module)

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...
34
{
35
    // Do some synchronization if needed
36
    return true;
37
}
38
39
/**
40
 *
41
 * Performs tasks required during uninstallation of the module
42
 * @param XoopsModule $module {@link XoopsModule}
43
 *
44
 * @return bool true if uninstallation successful, false if not
45
 */
46
function xoops_module_uninstall_cardealer(\XoopsModule $module)
47
{
48
    include dirname(__DIR__) . '/preloads/autoloader.php';
49
    $moduleDirName      = basename(dirname(__DIR__));
50
    $moduleDirNameUpper = strtoupper($moduleDirName); //$capsDirName
0 ignored issues
show
Unused Code introduced by
The assignment to $moduleDirNameUpper is dead and can be removed.
Loading history...
51
52
    /** @var Cardealer\Helper $helper */
53
    /** @var Cardealer\Utility $utility */
54
    $helper  = Cardealer\Helper::getInstance();
55
    $utility = new Cardealer\Utility();
0 ignored issues
show
Unused Code introduced by
The assignment to $utility is dead and can be removed.
Loading history...
56
57
    // Load language files
58
    $helper->loadLanguage('admin');
59
    $helper->loadLanguage('common');
60
    $success = true;
61
62
    return $success;
63
}
64