ViewAwareTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setView() 0 3 1
1
<?php
2
/**
3
 * This file is part of the sauls/widget package.
4
 *
5
 * @author    Saulius Vaičeliūnas <[email protected]>
6
 * @link      http://saulius.vaiceliunas.lt
7
 * @copyright 2018
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Sauls\Component\Widget\View\Traits;
14
15
use Sauls\Component\Widget\View\ViewInterface;
16
17
trait ViewAwareTrait
18
{
19
    private ViewInterface $view;
20
21 6
    public function setView(ViewInterface $view): void
22
    {
23 6
        $this->view = $view;
24 6
    }
25
}
26