HCaptchaProtector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFormField() 0 4 1
A setFieldMapping() 0 3 1
1
<?php
2
3
namespace X3dgoo\HCaptcha\Forms;
4
5
use SilverStripe\SpamProtection\SpamProtector;
6
7
class HCaptchaProtector implements SpamProtector
8
{
9
    /**
10
     * Return the Field that we will use in this protector
11
     * @return string
12
     */
13
    public function getFormField($name = 'HCaptchaField', $title = 'Captcha', $value = null)
14
    {
15
        return HCaptchaField::create($name, $title);
16
    }
17
18
    /**
19
     * Not used by HCaptcha
20
     */
21
    public function setFieldMapping($fieldMapping)
22
    {
23
    }
24
}
25