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

AfterRun   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 19
ccs 6
cts 8
cp 0.75
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getResult() 0 3 1
A getWidget() 0 3 1
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