Extcal_2_34::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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_34
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_etablissement();
33
    }
34
35
    //----------------------------------------------------
36
    public function alterTable_etablissement()
37
    {
38
        global $xoopsDB;
39
        $tbl = $xoopsDB->prefix('extcal_etablissement');
40
41
        $sql = <<<__sql__
42
ALTER TABLE `{$tbl}`
43
 CHANGE `desc` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
44
__sql__;
45
46
        $xoopsDB->queryF($sql);
47
        //echo "<hr>{$sql}<hr>";
48
    }
49
50
    //----------------------------------------------------
51
52
    //-----------------------------------------------------------------
53
}   // fin de la classe
54