UservotedataHandler   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace XoopsModules\Adslight;
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
use Xmf\Module\Helper\Permission;
16
17
/**
18
 * Module: Adslight
19
 *
20
 * @category        Module
21
 * @author          XOOPS Development Team <https://xoops.org>
22
 * @copyright       {@link https://xoops.org/ XOOPS Project}
23
 * @license         GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html)
24
 * @link            https://xoops.org/
25
 * @since           1.0.0
26
 */
27
$moduleDirName = \basename(\dirname(__DIR__));
28
$permHelper    = new Permission();
29
30
/**
31
 * Class UservotedataHandler
32
 */
33
class UservotedataHandler extends \XoopsPersistableObjectHandler
34
{
35
    private const TABLE      = 'adslight_user_votedata';
36
    private const ENTITY     = Uservotedata::class;
37
    private const ENTITYNAME = 'Uservotedata';
38
    private const KEYNAME    = 'ratingid';
39
    private const IDENTIFIER = 'ratingid';
40
41
    /**
42
     * Constructor
43
     * @param \XoopsDatabase|null $xoopsDatabase
44
     */
45
    public function __construct(?\XoopsDatabase $xoopsDatabase = null)
46
    {
47
        $this->db = $xoopsDatabase;
48
        parent::__construct($xoopsDatabase, static::TABLE, static::ENTITY, static::KEYNAME, static::IDENTIFIER);
49
    }
50
}
51