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

StructureFactory::buildFromTraversable()   A

Complexity

Conditions 4
Paths 6

Size

Total Lines 17
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 4

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 8
cts 8
cp 1
rs 9.2
c 0
b 0
f 0
cc 4
eloc 8
nc 6
nop 1
crap 4
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