Completed
Pull Request — master (#6)
by Trevor N.
01:14
created

StructureFactory::buildFromTraversableLike()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 3

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 6
nc 3
nop 1
crap 3
1
<?php
2
/**
3
 * Incoming
4
 *
5
 * @author    Trevor Suarez (Rican7)
6
 * @copyright (c) Trevor Suarez
7
 * @link      https://github.com/Rican7/incoming
8
 * @license   MIT
9
 */
10
11
declare(strict_types=1);
12
13
namespace Incoming\Structure;
14
15
/**
16
 * Defines an interface for building structural data types from a loose input
17
 */
18
interface StructureFactory
19
{
20
21
    /**
22
     * Build a structure from a loose-type
23
     *
24
     * @param mixed $data The input data
25
     * @return Structure The resulting data-structure
26
     */
27
    public function build($data): Structure;
28
}
29