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

Code::required()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Modules\Html\Fields;
4
5
use GeminiLabs\SiteReviews\Modules\Html\Fields\Field;
6
7
class Code extends Field
8
{
9
	/**
10
	 * @return string|void
11
	 */
12
	public function build()
13
	{
14
		$this->mergeFieldArgs();
15
		$this->builder->tag = 'textarea';
16
		return $this->builder->buildTag();
17
	}
18
19
	/**
20
	 * @return array
21
	 */
22
	public static function defaults()
23
	{
24
		return [
25
			'class' => 'large-text code',
26
		];
27
	}
28
29
	/**
30
	 * @return array
31
	 */
32
	public static function required()
33
	{
34
		return [
35
			'type' => 'textarea',
36
		];
37
	}
38
}
39