AttributeDataTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 11
ccs 0
cts 6
cp 0
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
    public function getAttributeData(FormInterface $form): array {
9
        $children = $form->get('group_attributes');
10
11
        $data = [ ];
12
13
        foreach($children as $child) {
14
            $data[$child->getName()] = $child->getData();
15
        }
16
17
        return $data;
18
    }
19
}