mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Bump phpstan/phpstan from 1.11.2 to 1.11.8 in the development-patch-updates group (#6410)
This commit is contained in:
@ -60,6 +60,8 @@ interface ResourcePack{
|
||||
* @param int $start Offset to start reading the chunk from
|
||||
* @param int $length Maximum length of data to return.
|
||||
*
|
||||
* @phpstan-param positive-int $length
|
||||
*
|
||||
* @return string byte-array
|
||||
* @throws \InvalidArgumentException if the chunk does not exist
|
||||
*/
|
||||
|
@ -154,6 +154,9 @@ class ZippedResourcePack implements ResourcePack{
|
||||
}
|
||||
|
||||
public function getPackChunk(int $start, int $length) : string{
|
||||
if($length < 1){
|
||||
throw new \InvalidArgumentException("Pack length must be positive");
|
||||
}
|
||||
fseek($this->fileResource, $start);
|
||||
if(feof($this->fileResource)){
|
||||
throw new \InvalidArgumentException("Requested a resource pack chunk with invalid start offset");
|
||||
|
Reference in New Issue
Block a user