Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 4
BracketResult
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 4
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 4
<?php
namespace Wikimedia\LangConv;
/**
 * A simple tuple type for the results of ReplacementMachine::countBrackets().
 */
class BracketResult {
    /**
     * The number of codepoints we wouldn't have to escape.
     * @var int
     */
    public $safe;
    /**
     * The number of codepoints we'd have to specially escape.
     * @var int
     */
    public $unsafe;
    /**
     * The total number of codepoints (sum of `safe` and `unsafe`).
     * @var int
     */
    public $length;
    /**
     * Create a new BracketResult.
     * @param int $safe
     * @param int $unsafe
     * @param int $length
     */
    public function __construct( int $safe, int $unsafe, int $length ) {
        $this->safe = $safe;
        $this->unsafe = $unsafe;
        $this->length = $length;
    }
}