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

@ -39,11 +39,15 @@ final class TestCloningRegistry{
* @return \stdClass[]
*/
public static function getAll() : array{
return self::_registryGetAll();
/** @var \stdClass[] $result */
$result = self::_registryGetAll();
return $result;
}
public static function fromString(string $s) : \stdClass{
return self::_registryFromString($s);
/** @var \stdClass $result */
$result = self::_registryFromString($s);
return $result;
}
protected static function setup() : void{