Completed
Push — develop ( 16a458...a6c01a )
by jake
01:48
created

Helper   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 5
cp 0
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
A __invoke() 0 4 1
1
<?php
2
// @codingStandardsIgnoreFile
3
4
5
namespace Jnjxp\Form;
6
7
class Helper
8
{
9
10
    protected $factory;
11
12
    public function __construct(FieldFactory $factory = null)
13
    {
14
        $this->factory = $factory ?: new FieldFactory;
15
    }
16
17
    public function __invoke($class)
18
    {
19
        return $this->factory->newFieldCollection($class);
20
    }
21
}
22