Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| GLTFBuffer | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\GLTFHandler\Parser; |
| 4 | |
| 5 | use InvalidArgumentException; |
| 6 | |
| 7 | final class GLTFBuffer { |
| 8 | |
| 9 | /** |
| 10 | * @param string|null $value Null if unresolved |
| 11 | * @param int $byte_length Buffer length in bytes |
| 12 | * @param string|null $uri Null if unresolvable |
| 13 | * @param string|null $name Buffer name |
| 14 | * @param array $extensions Buffer extensions |
| 15 | * @param array $extras Application-specific data |
| 16 | */ |
| 17 | public function __construct( |
| 18 | public ?string $value, |
| 19 | public int $byte_length, |
| 20 | public ?string $uri, |
| 21 | public ?string $name, |
| 22 | public array $extensions, |
| 23 | public array $extras |
| 24 | ) { |
| 25 | $this->byte_length >= 1 || throw new InvalidArgumentException( "Expected 'byteLength' >= 1, got {$this->byte_length}" ); |
| 26 | } |
| 27 | } |