</RedundantCondition>
<TypeDoesNotContainType occurrences="2">
<code>get_class($res) === 'OpenSSLAsymmetricKey'</code>
+ <code>is_object($res)</code>
</TypeDoesNotContainType>
</file>
<file src="apps/encryption/lib/Crypto/EncryptAll.php">
<code>bool</code>
<code>int</code>
<code>string</code>
- <code>string</code>
</InvalidReturnType>
<InvalidScalarArgument occurrences="5">
<code>$lastChunkPos</code>
<code>\OCP\Calendar\Room\IManager</code>
<code>\OCP\Files\Folder|null</code>
</ImplementedReturnTypeMismatch>
+ <InvalidArgument occurrences="1">
+ <code>new GenericEvent($user)</code>
+ </InvalidArgument>
<InvalidCatch occurrences="1"/>
<UndefinedDocblockClass occurrences="1">
<code>\OC\OCSClient</code>
$this->container = new Container();
}
+ /**
+ * @template T
+ * @param class-string<T>|string $id
+ * @return T|mixed
+ * @psalm-template S as class-string<T>|string
+ * @psalm-param S $id
+ * @psalm-return (S is class-string<T> ? T : mixed)
+ * @throws QueryException
+ */
public function get(string $id) {
return $this->query($id);
}
use OC\User\DisplayNameCache;
use OC\User\Listeners\BeforeUserDeletedListener;
use OC\User\Listeners\UserChangedListener;
+use OC\User\Session;
use OCA\Theming\ImageManager;
use OCA\Theming\ThemingDefaults;
use OCA\Theming\Util;
* @deprecated 20.0.0
*/
public function getSession() {
- return $this->get(IUserSession::class)->getSession();
+ return $this->get(Session::class)->getSession();
}
/**
*/
public function setSession(\OCP\ISession $session) {
$this->get(SessionStorage::class)->setSession($session);
- $this->get(IUserSession::class)->setSession($session);
+ $this->get(Session::class)->setSession($session);
$this->get(Store::class)->setSession($session);
}
}
/**
+ * @template T
+ * @param class-string<T>|string $name
+ * @return T|mixed
+ * @psalm-template S as class-string<T>|string
+ * @psalm-param S $name
+ * @psalm-return (S is class-string<T> ? T : mixed)
+ * @throws QueryException
* @deprecated 20.0.0 use \Psr\Container\ContainerInterface::get
*/
public function query(string $name, bool $autoload = true) {
final class Server {
/**
* @template T
- * @template S as class-string<T>|string
- * @param S $serviceName
- * @return (S is class-string<T> ? T : mixed)
+ * @param class-string<T>|string $serviceName
+ * @return T|mixed
+ * @psalm-template S as class-string<T>|string
+ * @psalm-param S $serviceName
+ * @psalm-return (S is class-string<T> ? T : mixed)
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @since 25.0.0