Header::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
crap 1
1
<?php
2
3
namespace erasys\OpenApi\Spec\v3;
4
5
/**
6
 * The Header Object follows the structure of the Parameter Object with the following changes:
7
 *
8
 * - name MUST NOT be specified, it is given in the corresponding headers map.
9
 * - in MUST NOT be specified, it is implicitly in header.
10
 * - All traits that are affected by the location MUST be applicable to a location of header (for example, style).
11
 *
12
 * @see https://swagger.io/specification/#headerObject
13
 */
14
class Header extends AbstractParameter
15
{
16
    /**
17
     * @param string|null $description
18
     * @param array       $additionalProperties
19
     */
20 6
    public function __construct(string $description = null, array $additionalProperties = [])
21
    {
22 6
        parent::__construct($additionalProperties);
23 6
        $this->description = $description;
24 6
    }
25
}
26