VentHydrator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A supports() 0 3 1
A hydrate() 0 3 1
A validate() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PanicLabCore\Services\Hydrators;
6
7
use PanicLabCore\Structs\Tile;
8
use PanicLabCore\Structs\VentTile;
9
10
class VentHydrator implements HydratorInterface
11
{
12 13
    public function supports(string $type): bool
13
    {
14 13
        return $type === 'vent';
15
    }
16
17 12
    public function hydrate(array $tile): Tile
18
    {
19 12
        return new VentTile();
20
    }
21
22 11
    public function validate(array $tile): void
23
    {
24
        // No validation necessary
25 11
    }
26
}
27