Completed
Push — develop ( 6e6e75...91883d )
by Baptiste
01:42
created

Mixed::build()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 2
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Config\Property;
5
6
use Innmind\Config\{
7
    Property,
8
    Properties,
9
    Exception\SchemaNotParseable,
10
    Exception\InvalidArgumentException,
11
};
12
use Innmind\Immutable\Str;
13
14
final class Mixed implements Property
15
{
16 10
    public static function build(Str $schema, Properties $properties): Property
17
    {
18 10
        if ((string) $schema !== 'mixed') {
19 2
            throw new SchemaNotParseable((string) $schema);
20
        }
21
22 8
        return new self;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 7
    public function process($value)
29
    {
30 7
        return $value;
31
    }
32
}
33