Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 7 |
TokenHandlerResult | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
20 | |
0.00% |
0 / 7 |
__construct | |
0.00% |
0 / 1 |
20 | |
0.00% |
0 / 7 |
<?php | |
declare( strict_types = 1 ); | |
namespace Wikimedia\Parsoid\Wt2Html\TT; | |
class TokenHandlerResult { | |
/** @var array|null */ | |
public $tokens; | |
/** @var bool */ | |
public $skipOnAny; | |
/** | |
* @param array|null $tokens The new array of tokens, or null to retain the | |
* current token | |
* @param bool $skipOnAny Don't call this handler's onAny() method for this token | |
*/ | |
public function __construct( array $tokens = null, $skipOnAny = false ) { | |
if ( $tokens ) { | |
foreach ( $tokens as $token ) { | |
if ( $token === null ) { | |
throw new \Exception( "Invalid token" ); | |
} | |
} | |
} | |
$this->tokens = $tokens; | |
$this->skipOnAny = $skipOnAny; | |
} | |
} |