Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
TextFieldOptions
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
 __construct
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
5namespace Phpdftk\Pdf\Writer\Form;
6
7/**
8 * Options for {@see \Phpdftk\Pdf\Writer\PdfDoc::addTextField()}.
9 *
10 * Sensible defaults: single-line, not required, not read-only,
11 * unlimited length. The `defaultAppearance` matches what most viewers
12 * expect for a Helvetica 10pt black text field.
13 */
14final class TextFieldOptions
15{
16    public function __construct(
17        public readonly ?string $defaultValue = null,
18        public readonly ?int $maxLength = null,
19        public readonly bool $multiline = false,
20        public readonly bool $password = false,
21        public readonly bool $required = false,
22        public readonly bool $readOnly = false,
23        public readonly string $defaultAppearance = '/Helv 10 Tf 0 0 0 rg',
24    ) {}
25}