Bump phpstan/phpstan from 1.11.2 to 1.11.8 in the development-patch-updates group (#6410)

This commit is contained in:
dependabot[bot] 2024-07-30 06:47:56 +00:00 committed by GitHub
parent df4ada81e5
commit 237677c028
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 7 deletions

View File

@ -52,7 +52,7 @@
"symfony/filesystem": "~6.4.0"
},
"require-dev": {
"phpstan/phpstan": "1.11.2",
"phpstan/phpstan": "1.11.8",
"phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.0",
"phpunit/phpunit": "^10.5.24"

12
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d459605b85f247204988a879982aab50",
"content-hash": "3ee9506c0be6b8b202d790824344e79c",
"packages": [
{
"name": "adhocore/json-comment",
@ -1389,16 +1389,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.11.2",
"version": "1.11.8",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "0d5d4294a70deb7547db655c47685d680e39cfec"
"reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/0d5d4294a70deb7547db655c47685d680e39cfec",
"reference": "0d5d4294a70deb7547db655c47685d680e39cfec",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec",
"reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec",
"shasum": ""
},
"require": {
@ -1443,7 +1443,7 @@
"type": "github"
}
],
"time": "2024-05-24T13:23:04+00:00"
"time": "2024-07-24T07:01:22+00:00"
},
{
"name": "phpstan/phpstan-phpunit",

View File

@ -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
*/

View File

@ -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");

View File

@ -27,6 +27,7 @@ use function range;
class RegionLocationTableEntry{
private int $firstSector;
/** @phpstan-var positive-int */
private int $sectorCount;
private int $timestamp;
@ -61,6 +62,9 @@ class RegionLocationTableEntry{
return range($this->getFirstSector(), $this->getLastSector());
}
/**
* @phpstan-return positive-int
*/
public function getSectorCount() : int{
return $this->sectorCount;
}