GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

TemplateResponse   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 1
dl 0
loc 40
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getTemplate() 0 4 1
A withTemplate() 0 7 1
A getTemplateData() 0 4 1
A withTemplateData() 0 7 1
1
<?php declare(strict_types=1);
2
3
namespace WyriHaximus\React\Http\Middleware;
4
5
use RingCentral\Psr7\Response;
6
7
final class TemplateResponse extends Response
8
{
9
    /** @var string */
10
    private $template;
11
12
    /** @var mixed[] */
13
    private $templateData = [];
14
15
    public function getTemplate(): string
16
    {
17
        return $this->template;
18
    }
19
20
    public function withTemplate(string $template): TemplateResponse
21
    {
22
        $clone = clone $this;
23
        $clone->template = $template;
24
25
        return $clone;
26
    }
27
28
    /**
29
     * @return mixed[]
30
     */
31
    public function getTemplateData(): array
32
    {
33
        return $this->templateData;
34
    }
35
36
    /**
37
     * @param mixed[] $data
38
     */
39
    public function withTemplateData(array $data): TemplateResponse
40
    {
41
        $clone = clone $this;
42
        $clone->templateData = $data;
43
44
        return $clone;
45
    }
46
}
47