Passed
Push — master ( 2715f7...fbc634 )
by Laurent
02:37
created

app_RoleSet   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
1
<?php
2
//-------------------------------------------------------------------------
3
// OVIDENTIA http://www.ovidentia.org
4
// Ovidentia is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 2, or (at your option)
7
// any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
// See the GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17
// USA.
18
//-------------------------------------------------------------------------
19
/**
20
 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
21
 * @copyright Copyright (c) 2008-2018 by CANTICO ({@link http://www.cantico.fr})
22
 * @copyright Copyright (c) 2019 by CapWelton ({@link https://www.capwelton.com})
23
 */
24
25
26
27
28
/**
29
 * @property	 ORM_StringField	$name
30
 * @property	 ORM_TextField		$description
31
 *
32
 * @method app_Role   get(mixed $criteria)
33
 * @method app_Role   request(mixed $criteria)
34
 * @method app_Role[] select(\ORM_Criteria $criteria = null)
35
 * @method app_Role   newRecord()
36
 */
37
class app_RoleSet extends app_RecordSet
38
{
39
    public function __construct(Func_App $App = null)
40
    {
41
        parent::__construct($App);
0 ignored issues
show
Bug introduced by
It seems like $App can also be of type null; however, parameter $app of app_RecordSet::__construct() does only seem to accept Func_App, maybe add an additional type check? ( Ignorable by Annotation )

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

41
        parent::__construct(/** @scrutinizer ignore-type */ $App);
Loading history...
42
43
        $App = $this->App();
0 ignored issues
show
Unused Code introduced by
The assignment to $App is dead and can be removed.
Loading history...
44
45
        $this->setPrimaryKey('id');
46
47
        $this->addFields(
48
            ORM_StringField('name')
49
                ->setDescription('Name'),
50
			ORM_TextField('description')
51
                ->setDescription('Description')
52
        );
53
    }
54
}
55
56
/**
57
 * @property	 string		$name
58
 * @property	 string		$description
59
 *
60
 * @method app_RoleSet getParentSet()
61
 */
62
class app_Role extends app_Record
63
{
64
}
65