Test Failed
Push — develop ( 444e5e...4db3e8 )
by Paul
07:08
created

FeatureDefaults   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaults() 0 6 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Defaults;
4
5
class FeatureDefaults extends DefaultsAbstract
6
{
7
    /**
8
     * The values that should be cast before sanitization is run.
9
     * This is done before $sanitize and $enums.
10
     */
11
    public array $casts = [
12
        'premium' => 'bool',
13
    ];
14
15
    /**
16
     * The values that should be sanitized.
17
     * This is done after $casts and before $enums.
18
     */
19
    public array $sanitize = [
20
        'feature' => 'text',
21
        'tooltip' => 'text',
22
    ];
23
24
    protected function defaults(): array
25
    {
26
        return [
27
            'feature' => '',
28
            'premium' => false,
29
            'tooltip' => '',
30
        ];
31
    }
32
}
33