From: Côme Chilliet Date: Mon, 5 Feb 2024 17:08:26 +0000 (+0100) Subject: chore: Add missing ArrayAccess template parameters X-Git-Tag: v29.0.0beta1~288^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F43361%2Fhead;p=nextcloud-server.git chore: Add missing ArrayAccess template parameters Signed-off-by: Côme Chilliet --- diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index e913c83fa8d..72ecffa773f 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -63,6 +63,7 @@ use Symfony\Component\HttpFoundation\IpUtils; * @property string method * @property mixed[] parameters * @property mixed[] server + * @template-implements \ArrayAccess */ class Request implements \ArrayAccess, \Countable, IRequest { public const USER_AGENT_IE = '/(MSIE)|(Trident)/'; diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index 5ba2f27b78b..a1f6238db02 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -40,6 +40,9 @@ use OCP\Files\Cache\ICacheEntry; use OCP\Files\Mount\IMountPoint; use OCP\IUser; +/** + * @template-implements \ArrayAccess + */ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { private array|ICacheEntry $data; /** diff --git a/lib/private/Memcache/Cache.php b/lib/private/Memcache/Cache.php index 1d54a705098..f0e794d6582 100644 --- a/lib/private/Memcache/Cache.php +++ b/lib/private/Memcache/Cache.php @@ -24,6 +24,9 @@ */ namespace OC\Memcache; +/** + * @template-implements \ArrayAccess + */ abstract class Cache implements \ArrayAccess, \OCP\ICache { /** * @var string $prefix diff --git a/lib/private/Memcache/ProfilerWrapperCache.php b/lib/private/Memcache/ProfilerWrapperCache.php index a5cb667114c..0d991a87ab8 100644 --- a/lib/private/Memcache/ProfilerWrapperCache.php +++ b/lib/private/Memcache/ProfilerWrapperCache.php @@ -32,6 +32,7 @@ use OCP\IMemcacheTTL; /** * Cache wrapper that logs profiling information + * @template-implements \ArrayAccess */ class ProfilerWrapperCache extends AbstractDataCollector implements IMemcacheTTL, \ArrayAccess { /** @var Redis $wrappedCache*/ diff --git a/lib/private/Session/CryptoSessionData.php b/lib/private/Session/CryptoSessionData.php index 22d2aba0405..34aab2a5165 100644 --- a/lib/private/Session/CryptoSessionData.php +++ b/lib/private/Session/CryptoSessionData.php @@ -39,6 +39,7 @@ use function OCP\Log\logger; * Class CryptoSessionData * * @package OC\Session + * @template-implements \ArrayAccess */ class CryptoSessionData implements \ArrayAccess, ISession { /** @var ISession */ diff --git a/lib/private/Session/Session.php b/lib/private/Session/Session.php index b434461a335..04fc61fe610 100644 --- a/lib/private/Session/Session.php +++ b/lib/private/Session/Session.php @@ -29,6 +29,9 @@ namespace OC\Session; use OCP\ISession; +/** + * @template-implements \ArrayAccess + */ abstract class Session implements \ArrayAccess, ISession { /** * @var bool diff --git a/lib/public/Cache/CappedMemoryCache.php b/lib/public/Cache/CappedMemoryCache.php index 6699600d42c..c92f68044ba 100644 --- a/lib/public/Cache/CappedMemoryCache.php +++ b/lib/public/Cache/CappedMemoryCache.php @@ -30,6 +30,7 @@ use OCP\ICache; * * @since 25.0.0 * @template T + * @template-implements \ArrayAccess */ class CappedMemoryCache implements ICache, \ArrayAccess { private int $capacity; diff --git a/lib/public/Files/Cache/ICacheEntry.php b/lib/public/Files/Cache/ICacheEntry.php index 3a069ca69e0..6b83d31d55c 100644 --- a/lib/public/Files/Cache/ICacheEntry.php +++ b/lib/public/Files/Cache/ICacheEntry.php @@ -28,6 +28,7 @@ use ArrayAccess; * meta data for a file or folder * * @since 9.0.0 + * @template-extends ArrayAccess * * This interface extends \ArrayAccess since v21.0.0, previous versions only * implemented it in the private implementation. Hence php would allow using the