Header   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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