ArrayFormData   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
dl 0
loc 11
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
namespace SKien\Formgenerator;
3
4
/**
5
 * Data Class for the FormGenerator that can be initialized with arrays.
6
 *
7
 * @package Formgenerator
8
 * @author Stefanius <[email protected]>
9
 * @copyright MIT License - see the LICENSE file for details
10
 */
11
class ArrayFormData extends AbstractFormData
12
{
13
    /**
14
     * Creating an ArrayFormData instance.
15
     * @param array<string,mixed> $aData  associative array 'name' => value
16
     * @param array<string,array<int|string,string>> $aSelectOptions associative array 'name' => selectoptions-array
17
     */
18
    public function __construct(array $aData, array $aSelectOptions = [])
19
    {
20
        $this->aValues = $aData;
21
        $this->aSelectOptions = $aSelectOptions;
22
    }
23
}
24
25