Widget::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Widget\Model;
4
5
class Widget extends \Phalcon\Mvc\Model
6
{
7
8
    public $id;
9
    public $title;
10
    public $html;
11
12
    public function getId()
13
    {
14
        return $this->id;
15
16
    }
17
18
    public function setId($id)
19
    {
20
        $this->id = $id;
21
22
    }
23
24
    public function getTitle()
25
    {
26
        return $this->title;
27
28
    }
29
30
    public function setTitle($title)
31
    {
32
        $this->title = $title;
33
34
    }
35
36
    public function getHtml()
37
    {
38
        return $this->html;
39
40
    }
41
42
    public function setHtml($html)
43
    {
44
        $this->html = $html;
45
46
    }
47
48
    public function getCsrf()
49
    {
50
        return $this->getDi()->get('security')->getToken();
0 ignored issues
show
Bug introduced by
The method get cannot be called on $this->getDi() (of type null).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
51
    }
52
53
}