TypeUser::setId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
class TypeUser extends \Phalcon\Mvc\Model
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5
6
    /**
7
     *
8
     * @var integer
9
     */
10
    protected $id;
11
12
    /**
13
     *
14
     * @var string
15
     */
16
    protected $libelle;
17
18
    /**
19
     * Method to set the value of field id
20
     *
21
     * @param integer $id
22
     * @return $this
23
     */
24
    public function setId($id)
25
    {
26
        $this->id = $id;
27
28
        return $this;
29
    }
30
31
    /**
32
     * Method to set the value of field objet
33
     *
34
     * @param string $objet
0 ignored issues
show
Bug introduced by
There is no parameter named $objet. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
35
     * @return $this
36
     */
37
    public function setLibelle($libelle)
38
    {
39
        $this->libelle = $libelle;
40
41
        return $this;
42
    }
43
44
    /**
45
     * Returns the value of field id
46
     *
47
     * @return integer
48
     */
49
    public function getId()
50
    {
51
        return $this->id;
52
    }
53
54
    /**
55
     * Returns the value of field objet
56
     *
57
     * @return string
58
     */
59
    public function getLibelle()
60
    {
61
        return $this->libelle;
62
    }
63
    
64
    /**
65
     * Initialize method for model.
66
     */
67
    public function initialize()
68
    {
69
        $this->hasMany('id', 'Acl', 'idTypeUser', array('alias' => 'Acl'));
70
        $this->hasMany('id', 'User', 'idTypeUser', array('alias' => 'Users'));
71
    }
72
73
    /**
74
     * Returns table name mapped in the model.
75
     *
76
     * @return string
77
     */
78
    public function getSource()
79
    {
80
        return 'typeuser';
81
    }
82
83
    /**
84
     * Allows to query a set of records that match the specified conditions
85
     *
86
     * @param mixed $parameters
87
     * @return TypeUser[]
88
     */
89
    public static function find($parameters = null)
90
    {
91
        return parent::find($parameters);
92
    }
93
94
    /**
95
     * Allows to query the first record that match the specified conditions
96
     *
97
     * @param mixed $parameters
98
     * @return TypeUser
99
     */
100
    public static function findFirst($parameters = null)
101
    {
102
        return parent::findFirst($parameters);
103
    }
104
    
105
    public function toString() {
106
    	return $this->libelle;
107
    }
108
109
}
110