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
</InvalidReturnType> | </InvalidReturnType> | ||||
</file> | </file> | ||||
<file src="apps/files_external/lib/Lib/Storage/SMB.php"> | <file src="apps/files_external/lib/Lib/Storage/SMB.php"> | ||||
<InvalidPropertyAssignmentValue occurrences="1"/> | |||||
<InvalidScalarArgument occurrences="7"> | <InvalidScalarArgument occurrences="7"> | ||||
<code>$e->getCode()</code> | <code>$e->getCode()</code> | ||||
<code>$e->getCode()</code> | <code>$e->getCode()</code> |
final class Server { | final class Server { | ||||
/** | /** | ||||
* @template T | * @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 ContainerExceptionInterface | ||||
* @throws NotFoundExceptionInterface | * @throws NotFoundExceptionInterface | ||||
* @since 25.0.0 | * @since 25.0.0 |