ArrayFormData::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
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