The expression return self::getInstance...alias, $throwException) could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
31
}
32
33
/**
34
* @param AliasService $service
35
*/
36
public static function setInstance(AliasService $service)
37
{
38
self::$aliasService = $service;
39
}
40
41
/**
42
* @return AliasService
43
*/
44
protected static function getInstance(): AliasService
45
{
46
return self::$aliasService ?? new AliasService([]);