phpstan 0.12.65

This commit is contained in:
Dylan K. Taylor
2021-01-09 18:04:42 +00:00
parent 0d8858f948
commit 972c911485
5 changed files with 22 additions and 11 deletions

View File

@@ -51,6 +51,7 @@ use function unserialize;
abstract class AsyncTask extends Collectable{
/**
* @var \SplObjectStorage|null
* @phpstan-var \SplObjectStorage<AsyncTask, mixed>
* Used to store objects on the main thread which should not be serialized.
*/
private static $threadLocalStorage;
@@ -258,7 +259,9 @@ abstract class AsyncTask extends Collectable{
}
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])){