Test Failed
Push — master ( e3c39f...fe570d )
by Mihail
07:20
created

Widget::init()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 0
1
<?php
2
3
namespace Widgets\Front\Test;
4
5
use Ffcms\Core\App;
6
use Ffcms\Core\Arch\View;
7
use Ffcms\Core\Arch\Widget as AbstractWidget;
8
9
class Widget extends AbstractWidget
10
{
11
    public $message;
12
13
    public function init()
14
    {
15
        if ($this->message === null) {
16
            $this->message = 'Hello, world';
17
        }
18
    }
19
20
    public function display()
21
    {
22
        return App::$View->render('widget/test', null, __DIR__);
0 ignored issues
show
Bug introduced by
null of type null is incompatible with the type array expected by parameter $data of Ffcms\Templex\Engine::render(). ( Ignorable by Annotation )

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

22
        return App::$View->render('widget/test', /** @scrutinizer ignore-type */ null, __DIR__);
Loading history...
23
    }
24
}
25