RawValue   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 21
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getValue() 0 3 1
1
<?php
2
3
namespace erasys\OpenApi;
4
5
/**
6
 * Represents a raw value.
7
 * This allows, for example exporting a null value, which is by default excluded when exporting to array.
8
 *
9
 * Not part of the OAS specification.
10
 */
11
class RawValue
12
{
13
    /**
14
     * @var mixed
15
     */
16
    private $value;
17
18
    /**
19
     * @param mixed $value
20
     */
21 3
    public function __construct($value)
22
    {
23 3
        $this->value = $value;
24 3
    }
25
26
    /**
27
     * @return mixed
28
     */
29 3
    public function getValue()
30
    {
31 3
        return $this->value;
32
    }
33
}
34