Passed
Pull Request — master (#159)
by Sergei
02:40
created

Field::inputText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Form;
6
7
use Yiisoft\Form\Field\InputText;
8
use Yiisoft\Form\Field\Part\Error;
9
use Yiisoft\Form\Field\Part\Hint;
10
use Yiisoft\Form\Field\Part\Label;
11
12
final class Field
13
{
14 1
    public static function inputText(FormModelInterface $formModel, string $attribute): InputText
15
    {
16 1
        return FieldStaticFactory::factory()->inputText($formModel, $attribute);
17
    }
18
19 1
    public static function label(FormModelInterface $formModel, string $attribute): Label
20
    {
21 1
        return FieldStaticFactory::factory()->label($formModel, $attribute);
22
    }
23
24 1
    public static function hint(FormModelInterface $formModel, string $attribute): Hint
25
    {
26 1
        return FieldStaticFactory::factory()->hint($formModel, $attribute);
27
    }
28
29 1
    public static function error(FormModelInterface $formModel, string $attribute): Error
30
    {
31 1
        return FieldStaticFactory::factory()->error($formModel, $attribute);
32
    }
33
}
34