PropertyNamesKeyword   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
3
namespace JsonSchema\Keyword;
4
5
use JsonSchema\Schema\StringSchema;
6
7
class PropertyNamesKeyword extends AbstractKeyword
8
{
9
    const NAME = 'propertyNames';
10
11 1
    public function __construct(?StringSchema $propertyNames)
12
    {
13 1
        if (null === $propertyNames) {
14 1
            parent::__construct(static::NAME, null);
15
16 1
            return;
17
        }
18
19 1
        parent::__construct(static::NAME, $propertyNames->toJsonSchema());
20 1
    }
21
}
22