Test Failed
Push — develop ( c20cce...d7326d )
by Paul
08:34
created

ControlDefaults::finalize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 2
nc 2
nop 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Integrations\FusionBuilder\Defaults;
4
5
use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract;
6
7
class ControlDefaults extends DefaultsAbstract
8
{
9
    /**
10
     * The values that should be constrained after sanitization is run.
11
     * This is done after $casts and $sanitize.
12
     */
13
    public array $enums = [
14
        'group' => [
15
            'design', 'general',
16
        ],
17
    ];
18
19
    /**
20
     * The keys that should be mapped to other keys.
21
     * Keys are mapped before the values are normalized and sanitized.
22
     * Note: Mapped keys should not be included in the defaults!
23
     */
24
    public array $mapped = [
25
        'label' => 'heading',
26
        'name' => 'param_name',
27
    ];
28
29
    protected function defaults(): array
30
    {
31
        return [
32
            'group' => 'general',
33
            'label' => '',
34
            'type' => 'textfield',
35
        ];
36
    }
37
}
38