Code Duplication    Length = 106-106 lines in 2 locations

app/models/Operation.php 1 location

@@ 3-108 (lines=106) @@
1
<?php
2
3
class Operation extends \Phalcon\Mvc\Model
4
{
5
6
    /**
7
     *
8
     * @var integer
9
     */
10
    protected $id;
11
12
    /**
13
     *
14
     * @var string
15
     */
16
    protected $operation;
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 operation
33
     *
34
     * @param string $operation
35
     * @return $this
36
     */
37
    public function setOperation($operation)
38
    {
39
        $this->operation = $operation;
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 operation
56
     *
57
     * @return string
58
     */
59
    public function getOperation()
60
    {
61
        return $this->operation;
62
    }
63
    
64
    /**
65
     * Initialize method for model.
66
     */
67
    public function initialize()
68
    {
69
        $this->hasMany('id', 'Acl', 'idRole', array('alias' => 'Acl'));
70
    }
71
72
    /**
73
     * Returns table name mapped in the model.
74
     *
75
     * @return string
76
     */
77
    public function getSource()
78
    {
79
        return 'operation';
80
    }
81
82
    /**
83
     * Allows to query a set of records that match the specified conditions
84
     *
85
     * @param mixed $parameters
86
     * @return Operation[]
87
     */
88
    public static function find($parameters = null)
89
    {
90
        return parent::find($parameters);
91
    }
92
93
    /**
94
     * Allows to query the first record that match the specified conditions
95
     *
96
     * @param mixed $parameters
97
     * @return Operation
98
     */
99
    public static function findFirst($parameters = null)
100
    {
101
        return parent::findFirst($parameters);
102
    }
103
    
104
    public function toString() {
105
    	return $this->operation;
106
    }
107
108
}
109

app/models/Ressource.php 1 location

@@ 3-108 (lines=106) @@
1
<?php
2
3
class Ressource extends \Phalcon\Mvc\Model
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 libelle
33
     *
34
     * @param string $libelle
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 libelle
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', 'idRessource', array('alias' => 'Acl'));
70
    }
71
72
    /**
73
     * Returns table name mapped in the model.
74
     *
75
     * @return string
76
     */
77
    public function getSource()
78
    {
79
        return 'ressource';
80
    }
81
82
    /**
83
     * Allows to query a set of records that match the specified conditions
84
     *
85
     * @param mixed $parameters
86
     * @return Ressource[]
87
     */
88
    public static function find($parameters = null)
89
    {
90
        return parent::find($parameters);
91
    }
92
93
    /**
94
     * Allows to query the first record that match the specified conditions
95
     *
96
     * @param mixed $parameters
97
     * @return Ressource
98
     */
99
    public static function findFirst($parameters = null)
100
    {
101
        return parent::findFirst($parameters);
102
    }
103
    
104
    public function toString() {
105
    	return $this->libelle;
106
    }
107
108
}
109