diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-01-27 20:04:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-27 20:04:02 +0100 |
commit | 73e3d06781d0b0f5f38a30ff6365fe79c9421caa (patch) | |
tree | 66ba1a25e3e4907aa85041727b01f9666db179ea /lib | |
parent | 3231b3f49f1c5db58b50079c155adc2921099738 (diff) | |
parent | 760db78dbac8ac81f58dd0f2797b7d76fb0af239 (diff) | |
download | nextcloud-server-73e3d06781d0b0f5f38a30ff6365fe79c9421caa.tar.gz nextcloud-server-73e3d06781d0b0f5f38a30ff6365fe79c9421caa.zip |
Merge pull request #30855 from nextcloud/psalm/theming
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Memcache/Memcached.php | 9 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php | 5 | ||||
-rw-r--r-- | lib/public/AppFramework/Bootstrap/IRegistrationContext.php | 4 | ||||
-rw-r--r-- | lib/public/Util.php | 4 |
4 files changed, 14 insertions, 8 deletions
diff --git a/lib/private/Memcache/Memcached.php b/lib/private/Memcache/Memcached.php index 08880451a73..f78be581d63 100644 --- a/lib/private/Memcache/Memcached.php +++ b/lib/private/Memcache/Memcached.php @@ -65,8 +65,13 @@ class Memcached extends Cache implements IMemcache { // Enable Binary Protocol //\Memcached::OPT_BINARY_PROTOCOL => true, ]; - // by default enable igbinary serializer if available - /** @psalm-suppress RedundantCondition */ + /** + * By default enable igbinary serializer if available + * + * Psalm checks depend on if igbinary is installed or not with memcached + * @psalm-suppress RedundantCondition + * @psalm-suppress TypeDoesNotContainType + */ if (\Memcached::HAVE_IGBINARY) { $defaultOptions[\Memcached::OPT_SERIALIZER] = \Memcached::SERIALIZER_IGBINARY; diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 4b53bbca3fc..abe7e59f695 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -1130,11 +1130,12 @@ class OC_Util { * This function is used to sanitize HTML and should be applied on any * string or array of strings before displaying it on a web page. * - * @param string|array $value - * @return string|array an array of sanitized strings or a single sanitized string, depends on the input parameter. + * @param string|string[] $value + * @return string|string[] an array of sanitized strings or a single sanitized string, depends on the input parameter. */ public static function sanitizeHTML($value) { if (is_array($value)) { + /** @var string[] $value */ $value = array_map(function ($value) { return self::sanitizeHTML($value); }, $value); diff --git a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php index 4e895b73b3d..be936540aee 100644 --- a/lib/public/AppFramework/Bootstrap/IRegistrationContext.php +++ b/lib/public/AppFramework/Bootstrap/IRegistrationContext.php @@ -122,11 +122,11 @@ interface IRegistrationContext { * * This is equivalent to calling IEventDispatcher::addServiceListener * - * @template T of \OCP\EventDispatcher\Event + * @psalm-template T of \OCP\EventDispatcher\Event * @param string $event preferably the fully-qualified class name of the Event sub class to listen for * @psalm-param string|class-string<T> $event preferably the fully-qualified class name of the Event sub class to listen for * @param string $listener fully qualified class name (or ::class notation) of a \OCP\EventDispatcher\IEventListener that can be built by the DI container - * @psalm-param class-string<\OCP\EventDispatcher\IEventListener<T>> $listener fully qualified class name that can be built by the DI container + * @psalm-param class-string<\OCP\EventDispatcher\IEventListener> $listener fully qualified class name that can be built by the DI container * @param int $priority The higher this value, the earlier an event * listener will be triggered in the chain (defaults to 0) * diff --git a/lib/public/Util.php b/lib/public/Util.php index f8d8b1aaf71..b839318303a 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -435,8 +435,8 @@ class Util { * This function is used to sanitize HTML and should be applied on any * string or array of strings before displaying it on a web page. * - * @param string|array $value - * @return string|array an array of sanitized strings or a single sanitized string, depends on the input parameter. + * @param string|string[] $value + * @return string|string[] an array of sanitized strings or a single sanitized string, depends on the input parameter. * @since 4.5.0 */ public static function sanitizeHTML($value) { |