Completed
Push — master ( 9d457f...574e8f )
by Jesse
02:48
created

ArrayHydrator   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
A fromArray() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Stratadox\Hydrator;
6
7
/**
8
 * Hydrates an array. Since the input is already array, do nothing, really.
9
 *
10
 * @package Stratadox\Hydrate
11
 * @author Stratadox
12
 */
13
final class ArrayHydrator implements Hydrates
14
{
15
    /**
16
     * Creates a new array hydrator.
17
     *
18
     * @return self
19
     */
20
    public static function create() : self
21
    {
22
        return new self;
23
    }
24
25
    /** @inheritdoc */
26
    public function fromArray(array $input)
27
    {
28
        return $input;
29
    }
30
}
31