Location::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace XoopsModules\Oledrion;
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
 * oledrion
17
 *
18
 * @copyright   {@link https://xoops.org/ XOOPS Project}
19
 * @license     {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
20
 * @author      Hossein Azizabadi ([email protected])
21
 */
22
23
use XoopsModules\Oledrion;
24
25
/**
26
 * Class Location
27
 */
28
class Location extends OledrionObject
29
{
30
    public $location_id;
31
    public $location_pid;
32
    public $location_title;
33
    public $location_online;
34
    public $location_type;
35
36
    /**
37
     * constructor
38
     *
39
     * normally, this is called from child classes only
40
     */
41
    public function __construct()
42
    {
43
        $this->initVar('location_id', XOBJ_DTYPE_INT, null, false);
44
        $this->initVar('location_pid', XOBJ_DTYPE_INT, null, false);
45
        $this->initVar('location_title', XOBJ_DTYPE_TXTBOX, null, false);
46
        $this->initVar('location_online', XOBJ_DTYPE_INT, null, false);
47
        $this->initVar('location_type', XOBJ_DTYPE_TXTBOX, null, false);
48
    }
49
50
    /**
51
     * Retourne les éléments du produits formatés pour affichage
52
     *
53
     * @param  string $format
54
     * @return array
55
     */
56
    public function toArray($format = 's')
57
    {
58
        $ret = [];
0 ignored issues
show
Unused Code introduced by
The assignment to $ret is dead and can be removed.
Loading history...
59
        $ret = parent::toArray($format);
60
61
        return $ret;
62
    }
63
}
64