diff options
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) { |