Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
StringInputTransformer
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 supports
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Core\Engine\Application\Transformer;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11use App\Core\Engine\Domain\Model\FieldMetadata;
12
13/**
14 * String Input UiType Transformer.
15 *
16 * Handles UiTypes: string_input.
17 * Read: HTML-escapes and trims the value for safe grid display.
18 * Write: trims whitespace and HTML-escapes for safe DB storage.
19 *
20 * @package App\Core\Engine\Application\Transformer
21 */
22final class StringInputTransformer extends AbstractStringTransformer
23{
24    /** @var string[] Supported UiType names. */
25    private const array SUPPORTED = ['string_input'];
26
27    /** {@inheritdoc} */
28    public function supports(string $uitypeName): bool
29    {
30        return in_array($uitypeName, self::SUPPORTED, true);
31    }
32}