Notification   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 19
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 3
1
<?php declare(strict_types=1);
2
3
namespace XoopsModules\Xhelp;
4
5
/*
6
 * You may not change or alter any portion of this comment or credits
7
 * of supporting developers from this source code or any supporting source code
8
 * which is considered copyrighted (c) material of the original comment or credit authors.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
 */
14
15
/**
16
 * @copyright    {@link https://xoops.org/ XOOPS Project}
17
 * @license      {@link https://www.gnu.org/licenses/gpl-2.0.html GNU GPL 2 or later}
18
 * @author       Eric Juden <[email protected]>
19
 * @author       XOOPS Development Team
20
 */
21
22
if (!\defined('XHELP_CLASS_PATH')) {
23
    exit();
24
}
25
26
// require_once XHELP_CLASS_PATH . '/BaseObjectHandler.php';
27
28
/**
29
 * Xhelp\Notification class
30
 *
31
 * @author  Eric Juden <[email protected]>
32
 */
33
class Notification extends \XoopsObject
34
{
35
    /**
36
     * Xhelp\Notification constructor.
37
     * @param array|null $id
38
     */
39
    public function __construct(array $id = null)
40
    {
41
        $this->initVar('notif_id', \XOBJ_DTYPE_INT, null, false);
42
        $this->initVar('staff_setting', \XOBJ_DTYPE_INT, null, false);
43
        $this->initVar('user_setting', \XOBJ_DTYPE_INT, null, false);
44
        $this->initVar('staff_options', \XOBJ_DTYPE_ARRAY, null, false, 1000000);
45
46
        if (null !== $id) {
47
            if (\is_array($id)) {
0 ignored issues
show
introduced by
The condition is_array($id) is always true.
Loading history...
48
                $this->assignVars($id);
49
            }
50
        } else {
51
            $this->setNew();
52
        }
53
    }
54
}   //end of class
55