Test Failed
Push — main ( 6435b1...db043e )
by Paul
16:23 queued 07:02
created

CaptchaConfigDefaults::defaults()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 12
rs 9.9332
cc 1
nc 1
nop 0
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Defaults;
4
5
class CaptchaConfigDefaults 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
        'urls' => 'array',
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
        'badge' => 'text',
21
        'captcha_type' => 'text',
22
        'class' => 'attr-class',
23
        'language' => 'text',
24
        'sitekey' => 'text',
25
        'size' => 'text',
26
        'theme' => 'text',
27
        'type' => 'text',
28
    ];
29
30
    protected function defaults(): array
31
    {
32
        return [
33
            'badge' => '',
34
            'captcha_type' => '',
35
            'class' => '',
36
            'language' => 'en',
37
            'sitekey' => '',
38
            'size' => '',
39
            'theme' => '',
40
            'type' => '',
41
            'urls' => [],
42
        ];
43
    }
44
}
45