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

CaptchaConfigDefaults   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A defaults() 0 12 1
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