Completed
Push — master ( 340112...af02a4 )
by Alex
14:15 queued 11:56
created

PayloadInterfaceRenderTrait   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 1
cbo 0
dl 0
loc 21
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 7 1
1
<?php
2
3
namespace Asmaster\EquipTwig\Traits;
4
5
trait PayloadInterfaceRenderTrait
6
{
7
    /**
8
     * @var \Equip\Adr\PayloadInterface
9
     */
10
    protected $payload;
11
12
    /**
13
     * @param string $template The template name
14
     * @param array  $output   The output produced by the domain layer
15
     *
16
     * @return PayloadInterface
17
     */
18
    protected function render($template, array $output = [])
19
    {
20
        return $this->payload
21
            ->withStatus(PayloadInterface::STATUS_OK)
22
            ->withSetting('template', $template)
23
            ->withOutput($output);
24
    }
25
}
26