Code Duplication    Length = 11-12 lines in 4 locations

tests/FormSpamProtectionExtensionTest/BarProtector.php 1 location

@@ 12-23 (lines=12) @@
9
/**
10
 * @package spamprotection
11
 */
12
class BarProtector implements SpamProtector, TestOnly
13
{
14
    public function getFormField($name = null, $title = null, $value = null)
15
    {
16
        $title = $title ?: 'Bar';
17
        return new TextField($name, $title, $value);
18
    }
19
20
    public function setFieldMapping($fieldMapping)
21
    {
22
    }
23
}
24

tests/FormSpamProtectionExtensionTest/BazProtector.php 1 location

@@ 12-22 (lines=11) @@
9
/**
10
 * @package spamprotection
11
 */
12
class BazProtector implements SpamProtector, TestOnly
13
{
14
    public function getFormField($name = null, $title = null, $value = null)
15
    {
16
        return new TextField($name, $title, $value);
17
    }
18
19
    public function setFieldMapping($fieldMapping)
20
    {
21
    }
22
}
23

tests/Stub/BarProtector.php 1 location

@@ 12-23 (lines=12) @@
9
/**
10
 * @package spamprotection
11
 */
12
class BarProtector implements SpamProtector, TestOnly
13
{
14
    public function getFormField($name = null, $title = null, $value = null)
15
    {
16
        $title = $title ?: 'Bar';
17
        return new TextField($name, $title, $value);
18
    }
19
20
    public function setFieldMapping($fieldMapping)
21
    {
22
    }
23
}
24

tests/Stub/BazProtector.php 1 location

@@ 12-22 (lines=11) @@
9
/**
10
 * @package spamprotection
11
 */
12
class BazProtector implements SpamProtector, TestOnly
13
{
14
    public function getFormField($name = null, $title = null, $value = null)
15
    {
16
        return new TextField($name, $title, $value);
17
    }
18
19
    public function setFieldMapping($fieldMapping)
20
    {
21
    }
22
}
23