DummyResolver   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setViewEngineConfig() 0 4 1
A resolve() 0 6 2
1
<?php
2
3
namespace App\ViewResolver;
4
5
use Core\View\ViewResolverInterface;
6
use App\ViewEngine\DummyView;
7
8
class DummyResolver implements ViewResolverInterface
9
{
10
    private $settings = [];
11
12
    public function setViewEngineConfig(array $settings)
13
    {
14
        $this->settings = $settings;
15
    }
16
17
    public function resolve($viewData)
18
    {
19
        if ($viewData === null) {
20
            return new DummyView($this->settings);
21
        }
22
    }
23
}
24