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

DataOnly   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 13
ccs 0
cts 6
cp 0
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A renderHtmlMarkup() 0 3 1
A for() 0 6 1
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