Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Edge | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Wikimedia\LangConv\Construct; |
| 4 | |
| 5 | /** |
| 6 | * An edge between states in a mutable FST. |
| 7 | */ |
| 8 | class Edge { |
| 9 | /** @var State */ |
| 10 | public $from; |
| 11 | /** @var int */ |
| 12 | public $id; |
| 13 | /** @var string */ |
| 14 | public $upper; |
| 15 | /** @var string */ |
| 16 | public $lower; |
| 17 | /** @var State */ |
| 18 | public $to; |
| 19 | |
| 20 | /** |
| 21 | * Create a new Edge. |
| 22 | * @param State $from State this edge is coming from (and stored in) |
| 23 | * @param int $id Index of this edge in from State's edges array. |
| 24 | * @param string $upper Token on the upper side of this edge |
| 25 | * @param string $lower Token on the lower side of this edge |
| 26 | * @param State $to Destination state |
| 27 | */ |
| 28 | public function __construct( State $from, int $id, string $upper, string $lower, State $to ) { |
| 29 | $this->from = $from; |
| 30 | $this->id = $id; |
| 31 | $this->upper = $upper; |
| 32 | $this->lower = $lower; |
| 33 | $this->to = $to; |
| 34 | } |
| 35 | } |