Passed
Push — master ( d8e403...d1c323 )
by Paul
05:05
created

Honeypot   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 25
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 8 1
A required() 0 7 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Modules\Html\Fields;
4
5
use GeminiLabs\SiteReviews\Modules\Html\Fields\Field;
6
7
class Honeypot extends Field
8
{
9
	/**
10
	 * @return string|void
11
	 */
12
	public function build()
13
	{
14
		$this->builder->args = wp_parse_args( $this->builder->args, [
15
			'name' => $this->builder->args['text'],
16
		]);
17
		$this->mergeFieldArgs();
18
		$this->builder->tag = 'input';
19
		return $this->builder->getOpeningTag();
20
	}
21
22
	/**
23
	 * @return array
24
	 */
25
	public static function required()
26
	{
27
		return [
28
			'autocomplete' => 'off',
29
			'style' => 'display:none!important',
30
			'tabindex' => '-1',
31
			'type' => 'text',
32
		];
33
	}
34
}
35