mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-19 18:04:07 +00:00
phpstan 0.12.65
This commit is contained in:
parent
0d8858f948
commit
972c911485
@ -37,7 +37,7 @@
|
|||||||
"composer-runtime-api": "^2.0"
|
"composer-runtime-api": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "0.12.64",
|
"phpstan/phpstan": "0.12.65",
|
||||||
"phpstan/phpstan-phpunit": "^0.12.6",
|
"phpstan/phpstan-phpunit": "^0.12.6",
|
||||||
"phpstan/phpstan-strict-rules": "^0.12.2",
|
"phpstan/phpstan-strict-rules": "^0.12.2",
|
||||||
"phpunit/phpunit": "^9.2"
|
"phpunit/phpunit": "^9.2"
|
||||||
|
14
composer.lock
generated
14
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "f0cec87ced440a2ea2b189283e9f696c",
|
"content-hash": "21ef5b68eba33e23b11acde01e8a2f36",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adhocore/json-comment",
|
"name": "adhocore/json-comment",
|
||||||
@ -1000,16 +1000,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan",
|
"name": "phpstan/phpstan",
|
||||||
"version": "0.12.64",
|
"version": "0.12.65",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpstan/phpstan.git",
|
"url": "https://github.com/phpstan/phpstan.git",
|
||||||
"reference": "23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa"
|
"reference": "1c7658668b28f8d647a8b874372acf14c4352688"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa",
|
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/1c7658668b28f8d647a8b874372acf14c4352688",
|
||||||
"reference": "23eb1cb7ae125f45f1d0e48051bcf67a9a9b08aa",
|
"reference": "1c7658668b28f8d647a8b874372acf14c4352688",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1040,7 +1040,7 @@
|
|||||||
"description": "PHPStan - PHP Static Analysis Tool",
|
"description": "PHPStan - PHP Static Analysis Tool",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||||
"source": "https://github.com/phpstan/phpstan/tree/0.12.64"
|
"source": "https://github.com/phpstan/phpstan/tree/0.12.65"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -1056,7 +1056,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-12-21T11:59:02+00:00"
|
"time": "2021-01-06T16:51:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan-phpunit",
|
"name": "phpstan/phpstan-phpunit",
|
||||||
|
@ -29,7 +29,10 @@ namespace pocketmine\metadata;
|
|||||||
use pocketmine\plugin\Plugin;
|
use pocketmine\plugin\Plugin;
|
||||||
|
|
||||||
abstract class MetadataStore{
|
abstract class MetadataStore{
|
||||||
/** @var \SplObjectStorage[]|MetadataValue[][] */
|
/**
|
||||||
|
* @var \SplObjectStorage[]|MetadataValue[][]
|
||||||
|
* @phpstan-var array<string, \SplObjectStorage<Plugin, MetadataValue>>
|
||||||
|
*/
|
||||||
private $metadataMap;
|
private $metadataMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,6 +44,7 @@ abstract class MetadataStore{
|
|||||||
$owningPlugin = $newMetadataValue->getOwningPlugin();
|
$owningPlugin = $newMetadataValue->getOwningPlugin();
|
||||||
|
|
||||||
if(!isset($this->metadataMap[$key])){
|
if(!isset($this->metadataMap[$key])){
|
||||||
|
/** @phpstan-var \SplObjectStorage<Plugin, MetadataValue> $entry */
|
||||||
$entry = new \SplObjectStorage();
|
$entry = new \SplObjectStorage();
|
||||||
$this->metadataMap[$key] = $entry;
|
$this->metadataMap[$key] = $entry;
|
||||||
}else{
|
}else{
|
||||||
@ -92,7 +96,6 @@ abstract class MetadataStore{
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function invalidateAll(Plugin $owningPlugin){
|
public function invalidateAll(Plugin $owningPlugin){
|
||||||
/** @var \SplObjectStorage|MetadataValue[] $values */
|
|
||||||
foreach($this->metadataMap as $values){
|
foreach($this->metadataMap as $values){
|
||||||
if(isset($values[$owningPlugin])){
|
if(isset($values[$owningPlugin])){
|
||||||
$values[$owningPlugin]->invalidate();
|
$values[$owningPlugin]->invalidate();
|
||||||
|
@ -51,6 +51,7 @@ use function unserialize;
|
|||||||
abstract class AsyncTask extends Collectable{
|
abstract class AsyncTask extends Collectable{
|
||||||
/**
|
/**
|
||||||
* @var \SplObjectStorage|null
|
* @var \SplObjectStorage|null
|
||||||
|
* @phpstan-var \SplObjectStorage<AsyncTask, mixed>
|
||||||
* Used to store objects on the main thread which should not be serialized.
|
* Used to store objects on the main thread which should not be serialized.
|
||||||
*/
|
*/
|
||||||
private static $threadLocalStorage;
|
private static $threadLocalStorage;
|
||||||
@ -258,7 +259,9 @@ abstract class AsyncTask extends Collectable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(self::$threadLocalStorage === null){
|
if(self::$threadLocalStorage === null){
|
||||||
self::$threadLocalStorage = new \SplObjectStorage(); //lazy init
|
/** @phpstan-var \SplObjectStorage<AsyncTask, mixed> $storage */
|
||||||
|
$storage = new \SplObjectStorage();
|
||||||
|
self::$threadLocalStorage = $storage; //lazy init
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset(self::$threadLocalStorage[$this])){
|
if(isset(self::$threadLocalStorage[$this])){
|
||||||
|
@ -745,6 +745,11 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/pocketmine/level/generator/normal/Normal.php
|
path: ../../../src/pocketmine/level/generator/normal/Normal.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Method pocketmine\\\\metadata\\\\MetadataStore\\:\\:getMetadataInternal\\(\\) should return array\\<pocketmine\\\\metadata\\\\MetadataValue\\> but returns SplObjectStorage\\<pocketmine\\\\plugin\\\\Plugin, pocketmine\\\\metadata\\\\MetadataValue\\>\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: ../../../src/pocketmine/metadata/MetadataStore.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Variable method call on pocketmine\\\\event\\\\Listener\\.$#"
|
message: "#^Variable method call on pocketmine\\\\event\\\\Listener\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user