diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 9d4ef09a30b5d..b5a722c8e7c31 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -1639,8 +1639,7 @@ $files_list - - $freeSpace + $maxUploadFilesize $maxUploadFilesize @@ -1967,10 +1966,8 @@ - + $share->getId() - $shareId - $shareId (int)$data['id'] diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php index 588f7e8a4b647..c00118473ed6d 100644 --- a/lib/private/AppFramework/Utility/SimpleContainer.php +++ b/lib/private/AppFramework/Utility/SimpleContainer.php @@ -53,9 +53,10 @@ public function __construct() { } /** - * @template T - * @param class-string $id - * @return T + * @psalm-suppress MoreSpecificImplementedParamType + * @psalm-template T + * @psalm-param class-string|'ThemingDefaults' $id + * @psalm-return T */ public function get(string $id) { return $this->query($id); diff --git a/lib/private/Server.php b/lib/private/Server.php index 13bbf972abb0a..ac71aa252f265 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -123,6 +123,7 @@ use OC\Preview\GeneratorHelper; use OC\Remote\Api\ApiFactory; use OC\Remote\InstanceFactory; +use OC\RedisFactory; use OC\RichObjectStrings\Validator; use OC\Route\Router; use OC\Security\Bruteforce\Throttler; @@ -163,6 +164,7 @@ use OCP\Encryption\IFile; use OCP\Encryption\Keys\IStorage; use OCP\EventDispatcher\IEventDispatcher; +use OCP\EventDispatcher\GenericEvent; use OCP\Federation\ICloudFederationFactory; use OCP\Federation\ICloudFederationProviderManager; use OCP\Federation\ICloudIdManager; @@ -248,7 +250,6 @@ use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\GenericEvent; use OCA\Files_External\Service\UserStoragesService; use OCA\Files_External\Service\UserGlobalStoragesService; use OCA\Files_External\Service\GlobalStoragesService; @@ -1645,6 +1646,7 @@ public function getUserSession() { * @deprecated 20.0.0 */ public function getSession() { + /** @psalm-suppress UndefinedInterfaceMethod */ return $this->get(IUserSession::class)->getSession(); } @@ -1653,6 +1655,7 @@ public function getSession() { */ public function setSession(\OCP\ISession $session) { $this->get(SessionStorage::class)->setSession($session); + /** @psalm-suppress UndefinedInterfaceMethod */ $this->get(IUserSession::class)->setSession($session); $this->get(Store::class)->setSession($session); } @@ -1763,7 +1766,7 @@ public function getMemCacheFactory() { * @deprecated 20.0.0 */ public function getGetRedisFactory() { - return $this->get('RedisFactory'); + return $this->get(RedisFactory::class); } @@ -2243,7 +2246,7 @@ public function getAutoCompleteManager() { * @deprecated 20.0.0 */ public function getLDAPProvider() { - return $this->get('LDAPProvider'); + return $this->get(\OCA\User_LDAP\LDAPProvider::class); } /** diff --git a/lib/private/Template/Base.php b/lib/private/Template/Base.php index 2de8c7ad5b18c..fedffa6eab663 100644 --- a/lib/private/Template/Base.php +++ b/lib/private/Template/Base.php @@ -92,7 +92,7 @@ protected function getCoreTemplateDirs($theme, $serverRoot) { /** * Assign variables * @param string $key key - * @param array|bool|integer|string|Throwable $value value + * @param mixed $value value * @return bool * * This function assigns a variable. It can be accessed via $_[$key] in