ButtonGroup   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
3
/*
4
 * To change this license header, choose License Headers in Project Properties.
5
 * To change this template file, choose Tools | Templates
6
 * and open the template in the editor.
7
 */
8
9
namespace hemio\form;
10
11
use hemio\html;
12
13
/**
14
 * Groups a bunch of buttons
15
 *
16
 * @since 1.0
17
 */
18
class ButtonGroup extends html\Fieldset {
19
20
    /**
21
     * 
22
     * @param array $buttons
23
     */
24
    public function __construct(array $buttons = []) {
25
        $this->addInheritableAppendage(
26
                FormPost::FORM_FIELD_TEMPLATE, new template\FormPlainControl()
27
        );
28
29
        foreach ($buttons as $button) {
30
            $this[$button->getName()] = $button;
31
        }
32
    }
33
34
}
35