Completed
Push — master ( eaf36c...f92548 )
by Marcel
03:19
created

AttributeDataTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAttributeData() 0 10 2
1
<?php
2
3
namespace App\Form;
4
5
use Symfony\Component\Form\FormInterface;
6
7
trait AttributeDataTrait {
8 1
    public function getAttributeData(FormInterface $form) {
9 1
        $children = $form->get('group_attributes');
10
11 1
        $data = [ ];
12
13 1
        foreach($children as $child) {
14
            $data[$child->getName()] = $child->getData();
15
        }
16
17 1
        return $data;
18
    }
19
}