Skip to content

Commit

Permalink
Merge pull request #43361 from nextcloud/fix/add-missing-phpdoc-templ…
Browse files Browse the repository at this point in the history
…ate-parameters

chore: Add missing ArrayAccess template parameters
  • Loading branch information
susnux authored Feb 6, 2024
2 parents 375dade + f73f966 commit 414a4ca
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/AppFramework/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
* @property string method
* @property mixed[] parameters
* @property mixed[] server
* @template-implements \ArrayAccess<string,mixed>
*/
class Request implements \ArrayAccess, \Countable, IRequest {
public const USER_AGENT_IE = '/(MSIE)|(Trident)/';
Expand Down
3 changes: 3 additions & 0 deletions lib/private/Files/FileInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
use OCP\Files\Mount\IMountPoint;
use OCP\IUser;

/**
* @template-implements \ArrayAccess<string,mixed>
*/
class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
private array|ICacheEntry $data;
/**
Expand Down
3 changes: 3 additions & 0 deletions lib/private/Memcache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
*/
namespace OC\Memcache;

/**
* @template-implements \ArrayAccess<string,mixed>
*/
abstract class Cache implements \ArrayAccess, \OCP\ICache {
/**
* @var string $prefix
Expand Down
1 change: 1 addition & 0 deletions lib/private/Memcache/ProfilerWrapperCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

/**
* Cache wrapper that logs profiling information
* @template-implements \ArrayAccess<string,mixed>
*/
class ProfilerWrapperCache extends AbstractDataCollector implements IMemcacheTTL, \ArrayAccess {
/** @var Redis $wrappedCache*/
Expand Down
1 change: 1 addition & 0 deletions lib/private/Session/CryptoSessionData.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
* Class CryptoSessionData
*
* @package OC\Session
* @template-implements \ArrayAccess<string,mixed>
*/
class CryptoSessionData implements \ArrayAccess, ISession {
/** @var ISession */
Expand Down
3 changes: 3 additions & 0 deletions lib/private/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

use OCP\ISession;

/**
* @template-implements \ArrayAccess<string,mixed>
*/
abstract class Session implements \ArrayAccess, ISession {
/**
* @var bool
Expand Down
1 change: 1 addition & 0 deletions lib/public/Cache/CappedMemoryCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*
* @since 25.0.0
* @template T
* @template-implements \ArrayAccess<string,T>
*/
class CappedMemoryCache implements ICache, \ArrayAccess {
private int $capacity;
Expand Down
1 change: 1 addition & 0 deletions lib/public/Files/Cache/ICacheEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* meta data for a file or folder
*
* @since 9.0.0
* @template-extends ArrayAccess<string,mixed>
*
* This interface extends \ArrayAccess since v21.0.0, previous versions only
* implemented it in the private implementation. Hence php would allow using the
Expand Down

0 comments on commit 414a4ca

Please sign in to comment.