DataContainerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 3 1
1
<?php
2
3
/**
4
 * Copyright MediaCT. All rights reserved.
5
 * https://www.mediact.nl
6
 */
7
8
namespace Mediact\DataContainer;
9
10
/**
11
 * Creates data containers.
12
 */
13
class DataContainerFactory implements DataContainerFactoryInterface
14
{
15
    /**
16
     * Create a data container.
17
     *
18
     * @param array $data
19
     *
20
     * @return DataContainerInterface
21
     */
22 1
    public function create(array $data = []): DataContainerInterface
23
    {
24 1
        return new DataContainer($data);
25
    }
26
}
27