Passed
Push — master ( b47fe7...645f8c )
by Chris
29:23
created

DataOnly::for()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace WebTheory\Saveyour\Field;
4
5
use WebTheory\Saveyour\Contracts\Field\FormFieldInterface;
6
use WebTheory\Saveyour\Field\Type\Abstracts\AbstractFormField;
7
8
class DataOnly extends AbstractFormField implements FormFieldInterface
9
{
10
    protected function renderHtmlMarkup(): string
11
    {
12
        return '';
13
    }
14
15
    public static function for(string $name): FormFieldInterface
16
    {
17
        $data = new static();
18
        $data->setName($name);
19
20
        return $data;
21
    }
22
}
23