Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| IdentityTransformParams | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| toPdf | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\Pdf\Core\Interactive\Signature; |
| 6 | |
| 7 | use Phpdftk\Pdf\Core\PdfName; |
| 8 | use Phpdftk\Pdf\Core\PdfVersion; |
| 9 | use Phpdftk\Pdf\Core\RequiresPdfVersion; |
| 10 | |
| 11 | /** |
| 12 | * Identity transform parameters — ISO 32000-2 §12.8.2. |
| 13 | * |
| 14 | * The Identity transform covers every byte of the document so that any |
| 15 | * change invalidates the signature. It carries only the optional /V |
| 16 | * version entry; there are no other fields. |
| 17 | */ |
| 18 | #[RequiresPdfVersion(PdfVersion::V1_6)] |
| 19 | class IdentityTransformParams extends TransformParams |
| 20 | { |
| 21 | public ?PdfName $v = null; // /V |
| 22 | |
| 23 | public function toPdf(): string |
| 24 | { |
| 25 | $dict = $this->baseDictionary(); |
| 26 | if ($this->v !== null) { |
| 27 | $dict->set('V', $this->v); |
| 28 | } |
| 29 | return $dict->toPdf(); |
| 30 | } |
| 31 | } |