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
ContentStreamOp
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\Reader\Parser;
6
7/**
8 * A single content stream operation: zero or more operands followed
9 * by an operator keyword.
10 *
11 * Examples:
12 *   "BT"              → operator="BT", operands=[]
13 *   "/F1 12 Tf"       → operator="Tf", operands=["/F1", "12"]
14 *   "72 720 Td"       → operator="Td", operands=["72", "720"]
15 *   "(Hello World) Tj" → operator="Tj", operands=["(Hello World)"]
16 */
17final class ContentStreamOp
18{
19    /**
20     * @param list<string> $operands Raw operand strings
21     * @param string $operator The operator keyword (e.g., "BT", "Tf", "Tj")
22     */
23    public function __construct(
24        public readonly array $operands,
25        public readonly string $operator,
26    ) {}
27}