Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
State
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2declare( strict_types = 1 );
3
4namespace Wikimedia\Parsoid\Html2Wt\ConstrainedText;
5
6class State {
7    /** @var string */
8    public $leftContext;
9    /** @var string */
10    public $rightContext;
11    /** @var ConstrainedText[] */
12    public $line;
13    /** @var int */
14    public $pos;
15
16    /**
17     * @param ConstrainedText[] $line
18     */
19    public function __construct( array $line ) {
20        $this->leftContext = '';
21        $this->rightContext = implode( '', array_map( static function ( $ct ) {
22            return $ct->text;
23        }, $line ) );
24        $this->line = $line;
25        $this->pos = 0;
26    }
27}