EntriesHandler::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace XoopsModules\Gbook;
6
7
use XoopsDatabase;
8
use XoopsPersistableObjectHandler;
9
10
/**
11
 * ****************************************************************************
12
 *  GBOOK - MODULE FOR XOOPS
13
 *  Copyright (c) 2007 - 2012
14
 *  Ingo H. de Boer (http://www.winshell.org)
15
 *
16
 *  This program is free software; you can redistribute it and/or modify
17
 *  it under the terms of the GNU General Public License as published by
18
 *  the Free Software Foundation; either version 2 of the License, or
19
 *  (at your option) any later version.
20
 *
21
 *  You may not change or alter any portion of this comment or credits
22
 *  of supporting developers from this source code or any supporting
23
 *  source code which is considered copyrighted (c) material of the
24
 *  original comment or credit authors.
25
 *
26
 *  This program is distributed in the hope that it will be useful,
27
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
28
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29
 *  GNU General Public License for more details.
30
 *  ---------------------------------------------------------------------------
31
 *
32
 * @copyright       Ingo H. de Boer (http://www.winshell.org)
33
 * @license         GNU General Public License (GPL)
34
 * @package         GBook
35
 * @author          Ingo H. de Boer ([email protected])
36
 *
37
 * ****************************************************************************
38
 */
39
40
/**
41
 * @package   kernel
42
 * @copyright copyright &copy; 2000 XOOPS.org
43
 */
44
class EntriesHandler extends XoopsPersistableObjectHandler
45
{
46
    /**
47
     * @param null|\XoopsDatabase $db
48
     */
49
    public function __construct(XoopsDatabase $db = null)
50
    {
51
        parent::__construct($db, 'gbook_entries', Entries::class, 'id', 'name', 'email', 'url', 'message', 'note', 'time', 'date', 'ip', 'admin');
0 ignored issues
show
Unused Code introduced by
The call to XoopsPersistableObjectHandler::__construct() has too many arguments starting with 'email'. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

51
        parent::/** @scrutinizer ignore-call */ 
52
                __construct($db, 'gbook_entries', Entries::class, 'id', 'name', 'email', 'url', 'message', 'note', 'time', 'date', 'ip', 'admin');

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
52
    }
53
}
54