Now using class-string<T> as input will only return T, and any other string will return mixed Signed-off-by: Carl Schwan <carl@carlschwan.eu>tags/v25.0.0beta1
@@ -1371,7 +1371,6 @@ | |||
</InvalidReturnType> | |||
</file> | |||
<file src="apps/files_external/lib/Lib/Storage/SMB.php"> | |||
<InvalidPropertyAssignmentValue occurrences="1"/> | |||
<InvalidScalarArgument occurrences="7"> | |||
<code>$e->getCode()</code> | |||
<code>$e->getCode()</code> |
@@ -41,8 +41,9 @@ use Psr\Container\NotFoundExceptionInterface; | |||
final class Server { | |||
/** | |||
* @template T | |||
* @param class-string<T>|string $serviceName | |||
* @return T|mixed | |||
* @template S as class-string<T>|string | |||
* @param S $serviceName | |||
* @return (S is class-string<T> ? T : mixed) | |||
* @throws ContainerExceptionInterface | |||
* @throws NotFoundExceptionInterface | |||
* @since 25.0.0 |