Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
BoardBounds
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 add
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3require_once(__DIR__ . "/IntegerBounds.php");
4
5class BoardBounds
6{
7    public function __construct()
8    {
9        $this->x = new IntegerBounds();
10        $this->y = new IntegerBounds();
11    }
12
13    public function add(int $packed)
14    {
15        $this->x->add(BoardPosition::unpackX($packed));
16        $this->y->add(BoardPosition::unpackY($packed));
17    }
18
19    public IntegerBounds $x;
20    public IntegerBounds $y;
21}