Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor 2019-12-11 23:37:36 +00:00
commit 80917692c1

View File

@ -35,6 +35,9 @@ class SkinImage{
private $data;
public function __construct(int $height, int $width, string $data){
if(($expected = $height * $width * 4) !== ($actual = strlen($data))){
throw new \InvalidArgumentException("Data should be exactly $expected bytes, got $actual bytes");
}
$this->height = $height;
$this->width = $width;
$this->data = $data;