Schema   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A type() 0 4 1
1
<?php
2
3
namespace JsonSchema\Schema;
4
5
use JsonSchema\Keyword\TypeKeyword;
6
7
class Schema extends AbstractSchema
8
{
9 22
    public function __construct()
10
    {
11 22
        parent::__construct();
12 22
    }
13
14
    /**
15
     * @param string|string[]|null $type
16
     *
17
     * @return static
18
     */
19 1
    public function type($type): self
20
    {
21 1
        return $this->with(
22 1
            new TypeKeyword($type)
23
        );
24
    }
25
}
26