Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
BracketResult
0.00% covered (danger)
0.00%
0 / 3
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 / 3
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Wikimedia\LangConv;
4
5/**
6 * A simple tuple type for the results of ReplacementMachine::countBrackets().
7 */
8class BracketResult {
9    /**
10     * The number of codepoints we wouldn't have to escape.
11     * @var int
12     */
13    public $safe;
14    /**
15     * The number of codepoints we'd have to specially escape.
16     * @var int
17     */
18    public $unsafe;
19    /**
20     * The total number of codepoints (sum of `safe` and `unsafe`).
21     * @var int
22     */
23    public $length;
24
25    /**
26     * Create a new BracketResult.
27     * @param int $safe
28     * @param int $unsafe
29     * @param int $length
30     */
31    public function __construct( int $safe, int $unsafe, int $length ) {
32        $this->safe = $safe;
33        $this->unsafe = $unsafe;
34        $this->length = $length;
35    }
36}