Completed
Push — master ( bca24d...1b0d8b )
by John
03:18
created

Response::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\PhpApi\Descriptions package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace KleijnWeb\PhpApi\Descriptions\Description;
10
11
use KleijnWeb\PhpApi\Descriptions\Description\Schema\Schema;
12
use KleijnWeb\PhpApi\Descriptions\Description\Visitor\VisiteeMixin;
13
14
/**
15
 * @author John Kleijn <[email protected]>
16
 */
17
class Response implements Element
18
{
19
    use VisiteeMixin;
20
21
    /**
22
     * @var int
23
     */
24
    protected $code;
25
26
    /**
27
     * @var Schema
28
     */
29
    protected $schema;
30
31
    /**
32
     * Response constructor.
33
     *
34
     * @param int    $code
35
     * @param Schema $schema
36
     */
37
    public function __construct(int $code, Schema $schema)
38
    {
39
        $this->code   = $code;
40
        $this->schema = $schema;
41
    }
42
43
    /**
44
     * @return int
45
     */
46
    public function getCode(): int
47
    {
48
        return $this->code;
49
    }
50
51
    /**
52
     * @return Schema
53
     */
54
    public function getSchema(): Schema
55
    {
56
        return $this->schema;
57
    }
58
}
59