Extcal_2_37::alterTable_event()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 10
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * extcal module.
4
 *
5
 * You may not change or alter any portion of this comment or credits
6
 * of supporting developers from this source code or any supporting source code
7
 * which is considered copyrighted (c) material of the original comment or credit authors.
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
 * @copyright           XOOPS Project (https://xoops.org)
13
 * @license             http://www.fsf.org/copyleft/gpl.html GNU public license
14
 *
15
 * @since               2.2
16
 *
17
 * @author              JJDai <http://xoops.kiolo.com>
18
 **/
19
20
//----------------------------------------------------
21
class Extcal_2_37
22
{
23
    //----------------------------------------------------
24
    /**
25
     * @param \XoopsModule $module
26
     * @param              $options
27
     */
28
    public function __construct(\XoopsModule $module, $options)
0 ignored issues
show
Unused Code introduced by
The parameter $options 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

28
    public function __construct(\XoopsModule $module, /** @scrutinizer ignore-unused */ $options)

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...
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

28
    public function __construct(/** @scrutinizer ignore-unused */ \XoopsModule $module, $options)

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...
29
    {
30
        global $xoopsDB;
31
32
        $this->alterTable_event();
33
        $this->alterTable_cat();
34
    }
35
36
    //----------------------------------------------------
37
    public function alterTable_event()
38
    {
39
        global $xoopsDB;
40
        $tbl = $xoopsDB->prefix('extcal_event');
41
42
        $sql = <<<__sql__
43
ALTER TABLE `{$tbl}` ADD `event_icone` VARCHAR(50) NOT NULL;
44
__sql__;
45
46
        $xoopsDB->queryF($sql);
47
    }
48
49
    //-----------------------------------------------------------------
50
51
    public function alterTable_cat()
52
    {
53
        global $xoopsDB;
54
        $tbl = $xoopsDB->prefix('extcal_cat');
55
56
        $sql = <<<__sql__
57
ALTER TABLE `{$tbl}` ADD `cat_icone` VARCHAR(50) NOT NULL ;
58
__sql__;
59
60
        $xoopsDB->queryF($sql);
61
    }
62
    //-----------------------------------------------------------------
63
}   // fin de la classe
64