| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | trait FieldTrait |
||
| 13 | { |
||
| 14 | 2 | public static function inputText(FormModelInterface $formModel, string $attribute, array $config = []): InputText |
|
| 15 | { |
||
| 16 | 2 | return self::widget(InputText::class, $formModel, $attribute, $config); |
|
| 17 | } |
||
| 18 | |||
| 19 | 2 | public static function label(FormModelInterface $formModel, string $attribute, array $config = []): Label |
|
| 20 | { |
||
| 21 | 2 | return FieldStaticFactory::factory()->label($formModel, $attribute, $config); |
|
| 22 | } |
||
| 23 | |||
| 24 | 2 | public static function hint(FormModelInterface $formModel, string $attribute, array $config = []): Hint |
|
| 27 | } |
||
| 28 | |||
| 29 | 2 | public static function error(FormModelInterface $formModel, string $attribute, array $config = []): Error |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @psalm-template T |
||
| 36 | * @psalm-param class-string<T> $class |
||
| 37 | * @psalm-return T |
||
| 38 | */ |
||
| 39 | 2 | public static function widget(string $class, FormModelInterface $formModel, string $attribute, array $config = []): object |
|
| 44 |