Passed
Push — master ( 0074b5...431277 )
by Alexander
02:14
created

AfterRun::getResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Yiisoft\Widget\Event;
5
6
use Yiisoft\Widget\Widget;
7
8
/**
9
 * AfterRun event is raised right after executing a widget.
10
 */
11
class AfterRun
12
{
13
    private Widget $widget;
14
    private string $result;
15
16 3
    public function __construct(Widget $widget, string $result)
17
    {
18 3
        $this->result = $result;
19 3
        $this->widget = $widget;
20 3
    }
21
22 3
    public function getResult(): string
23
    {
24 3
        return $this->result;
25
    }
26
27
    public function getWidget(): Widget
28
    {
29
        return $this->widget;
30
    }
31
}
32