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

ArrayHydrator::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
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