Completed
Pull Request — master (#3407)
by Antoine
07:35
created

Response   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A setContent() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace ApiPlatform\Core\OpenApi;
15
16
class Response
17
{
18
    private $description;
19
    private $content;
20
    private $headers;
21
    private $links;
22
23
    public function __construct(string $description = '', array $content = [], array $headers = [], array $links = [])
24
    {
25
        $this->description = $description;
26
        $this->content = $content;
27
        $this->headers = $headers;
28
        $this->links = $links;
29
    }
30
31
    public function setContent(array $content = [])
32
    {
33
        $this->content = $content;
34
35
        return $this;
36
    }
37
}
38