Force types of RegistryTrait usages to shut PHPStan up

we need generic traits to solve this problem properly.
This commit is contained in:
Dylan K. Taylor
2020-05-21 19:12:48 +01:00
parent 8e2b9b686b
commit f93bc0739c
6 changed files with 26 additions and 142 deletions

View File

@ -312,7 +312,10 @@ final class VanillaItems{
* @return Item[]
*/
public static function getAll() : array{
return self::_registryGetAll();
//phpstan doesn't support generic traits yet :(
/** @var Item[] $result */
$result = self::_registryGetAll();
return $result;
}
protected static function setup() : void{