mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Improve psalm annotation to make it stricter
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>
This commit is contained in:
parent
f4058a2432
commit
7f899b3bc8
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue