NullFormData::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 2
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace SKien\Formgenerator;
3
4
/**
5
 * Empty FormData class.
6
 *
7
 * If no formdata is passed to the formgenerator, instance of this class is
8
 * created internaly. This ensures that a valid instance is always set
9
 * internally and this not have to be checked at every point in the code
10
 * where the data provider is accessed.
11
 *
12
 * @package Formgenerator
13
 * @author Stefanius <[email protected]>
14
 * @copyright MIT License - see the LICENSE file for details
15
 */
16
class NullFormData extends AbstractFormData
17
{
18
    /**
19
     * create empty array for both iterators.
20
     */
21
    public function __construct()
22
    {
23
        $this->aValues = [];
24
        $this->aSelectOptions = [];
25
    }
26
}
27