diff options
author | provokateurin <kate@provokateurin.de> | 2024-09-06 09:44:04 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-09-09 11:09:37 +0200 |
commit | 007be83a968e6aee649ff8de173163cb5ef93a86 (patch) | |
tree | 18e03c4a5562989bbd6482e9e6a47f3619b71e30 /lib/private/FilesMetadata | |
parent | fc10fa592626d154a91d77d35c93beabdc7605c1 (diff) | |
download | nextcloud-server-fix/oc/inheritdoc.tar.gz nextcloud-server-fix/oc/inheritdoc.zip |
fix(OC): Remove doc blocks for OCP implementationsfix/oc/inheritdoc
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private/FilesMetadata')
-rw-r--r-- | lib/private/FilesMetadata/FilesMetadataManager.php | 82 | ||||
-rw-r--r-- | lib/private/FilesMetadata/Listener/MetadataUpdate.php | 3 | ||||
-rw-r--r-- | lib/private/FilesMetadata/MetadataQuery.php | 39 | ||||
-rw-r--r-- | lib/private/FilesMetadata/Model/FilesMetadata.php | 230 | ||||
-rw-r--r-- | lib/private/FilesMetadata/Model/MetadataValueWrapper.php | 209 |
5 files changed, 0 insertions, 563 deletions
diff --git a/lib/private/FilesMetadata/FilesMetadataManager.php b/lib/private/FilesMetadata/FilesMetadataManager.php index 231fb2ec98f..6fd4f82b7a7 100644 --- a/lib/private/FilesMetadata/FilesMetadataManager.php +++ b/lib/private/FilesMetadata/FilesMetadataManager.php @@ -22,9 +22,7 @@ use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Cache\CacheEntryRemovedEvent; use OCP\Files\Events\Node\NodeWrittenEvent; -use OCP\Files\InvalidPathException; use OCP\Files\Node; -use OCP\Files\NotFoundException; use OCP\FilesMetadata\Event\MetadataBackgroundEvent; use OCP\FilesMetadata\Event\MetadataLiveEvent; use OCP\FilesMetadata\Event\MetadataNamedEvent; @@ -58,20 +56,6 @@ class FilesMetadataManager implements IFilesMetadataManager { ) { } - /** - * @inheritDoc - * - * @param Node $node related node - * @param int $process type of process - * - * @return IFilesMetadata - * @throws FilesMetadataException if metadata are invalid - * @throws InvalidPathException if path to file is not valid - * @throws NotFoundException if file cannot be found - * @see self::PROCESS_BACKGROUND - * @see self::PROCESS_LIVE - * @since 28.0.0 - */ public function refreshMetadata( Node $node, int $process = self::PROCESS_LIVE, @@ -110,15 +94,6 @@ class FilesMetadataManager implements IFilesMetadataManager { return $metadata; } - /** - * @param int $fileId file id - * @param boolean $generate Generate if metadata does not exists - * - * @inheritDoc - * @return IFilesMetadata - * @throws FilesMetadataNotFoundException if not found - * @since 28.0.0 - */ public function getMetadata(int $fileId, bool $generate = false): IFilesMetadata { try { return $this->metadataRequestService->getMetadataFromFileId($fileId); @@ -131,26 +106,10 @@ class FilesMetadataManager implements IFilesMetadataManager { } } - /** - * returns metadata of multiple file ids - * - * @param int[] $fileIds file ids - * - * @return array File ID is the array key, files without metadata are not returned in the array - * @psalm-return array<int, IFilesMetadata> - * @since 28.0.0 - */ public function getMetadataForFiles(array $fileIds): array { return $this->metadataRequestService->getMetadataFromFileIds($fileIds); } - /** - * @param IFilesMetadata $filesMetadata metadata - * - * @inheritDoc - * @throws FilesMetadataException if metadata seems malformed - * @since 28.0.0 - */ public function saveMetadata(IFilesMetadata $filesMetadata): void { if ($filesMetadata->getFileId() === 0 || !$filesMetadata->updated()) { return; @@ -191,12 +150,6 @@ class FilesMetadataManager implements IFilesMetadataManager { $this->appConfig->setValueArray('core', self::CONFIG_KEY, $current->jsonSerialize(), lazy: true); } - /** - * @param int $fileId file id - * - * @inheritDoc - * @since 28.0.0 - */ public function deleteMetadata(int $fileId): void { try { $this->metadataRequestService->dropMetadata($fileId); @@ -211,16 +164,6 @@ class FilesMetadataManager implements IFilesMetadataManager { } } - /** - * @param IQueryBuilder $qb - * @param string $fileTableAlias alias of the table that contains data about files - * @param string $fileIdField alias of the field that contains file ids - * - * @inheritDoc - * @return IMetadataQuery - * @see IMetadataQuery - * @since 28.0.0 - */ public function getMetadataQuery( IQueryBuilder $qb, string $fileTableAlias, @@ -229,11 +172,6 @@ class FilesMetadataManager implements IFilesMetadataManager { return new MetadataQuery($qb, $this, $fileTableAlias, $fileIdField); } - /** - * @inheritDoc - * @return IFilesMetadata - * @since 28.0.0 - */ public function getKnownMetadata(): IFilesMetadata { if ($this->all !== null) { return $this->all; @@ -249,26 +187,6 @@ class FilesMetadataManager implements IFilesMetadataManager { return $this->all; } - /** - * @param string $key metadata key - * @param string $type metadata type - * @param bool $indexed TRUE if metadata can be search - * @param int $editPermission remote edit permission via Webdav PROPPATCH - * - * @inheritDoc - * @since 28.0.0 - * @see IMetadataValueWrapper::TYPE_INT - * @see IMetadataValueWrapper::TYPE_FLOAT - * @see IMetadataValueWrapper::TYPE_BOOL - * @see IMetadataValueWrapper::TYPE_ARRAY - * @see IMetadataValueWrapper::TYPE_STRING_LIST - * @see IMetadataValueWrapper::TYPE_INT_LIST - * @see IMetadataValueWrapper::TYPE_STRING - * @see IMetadataValueWrapper::EDIT_FORBIDDEN - * @see IMetadataValueWrapper::EDIT_REQ_OWNERSHIP - * @see IMetadataValueWrapper::EDIT_REQ_WRITE_PERMISSION - * @see IMetadataValueWrapper::EDIT_REQ_READ_PERMISSION - */ public function initMetadata( string $key, string $type, diff --git a/lib/private/FilesMetadata/Listener/MetadataUpdate.php b/lib/private/FilesMetadata/Listener/MetadataUpdate.php index 05422ba5aba..4262d3f5564 100644 --- a/lib/private/FilesMetadata/Listener/MetadataUpdate.php +++ b/lib/private/FilesMetadata/Listener/MetadataUpdate.php @@ -30,9 +30,6 @@ class MetadataUpdate implements IEventListener { ) { } - /** - * @param Event $event - */ public function handle(Event $event): void { if (!($event instanceof NodeWrittenEvent)) { return; diff --git a/lib/private/FilesMetadata/MetadataQuery.php b/lib/private/FilesMetadata/MetadataQuery.php index aac93a23446..b802743f0ee 100644 --- a/lib/private/FilesMetadata/MetadataQuery.php +++ b/lib/private/FilesMetadata/MetadataQuery.php @@ -47,11 +47,6 @@ class MetadataQuery implements IMetadataQuery { } } - /** - * @inheritDoc - * @see self::extractMetadata() - * @since 28.0.0 - */ public function retrieveMetadata(): void { $this->queryBuilder->selectAlias($this->alias . '.json', 'meta_json'); $this->queryBuilder->selectAlias($this->alias . '.sync_token', 'meta_sync_token'); @@ -61,14 +56,6 @@ class MetadataQuery implements IMetadataQuery { ); } - /** - * @param array $row result row - * - * @inheritDoc - * @return IFilesMetadata metadata - * @see self::retrieveMetadata() - * @since 28.0.0 - */ public function extractMetadata(array $row): IFilesMetadata { $fileId = (array_key_exists($this->fileIdField, $row)) ? $row[$this->fileIdField] : 0; $metadata = new FilesMetadata((int)$fileId); @@ -81,13 +68,6 @@ class MetadataQuery implements IMetadataQuery { return $metadata; } - /** - * @param string $metadataKey metadata key - * @param bool $enforce limit the request only to existing metadata - * - * @inheritDoc - * @since 28.0.0 - */ public function joinIndex(string $metadataKey, bool $enforce = false): string { if (array_key_exists($metadataKey, $this->knownJoinedIndex)) { return $this->knownJoinedIndex[$metadataKey]; @@ -130,29 +110,10 @@ class MetadataQuery implements IMetadataQuery { return $this->knownJoinedIndex[$metadataKey]; } - /** - * @inheritDoc - * - * @param string $metadataKey metadata key - * - * @return string table field - * @throws FilesMetadataNotFoundException - * @since 28.0.0 - */ public function getMetadataKeyField(string $metadataKey): string { return $this->joinedTableAlias($metadataKey) . '.meta_key'; } - /** - * @inheritDoc - * - * @param string $metadataKey metadata key - * - * @return string table field - * @throws FilesMetadataNotFoundException if metadataKey is not known - * @throws FilesMetadataTypeException is metadataKey is not set as indexed - * @since 28.0.0 - */ public function getMetadataValueField(string $metadataKey): string { if ($this->manager instanceof IFilesMetadataManager) { /** diff --git a/lib/private/FilesMetadata/Model/FilesMetadata.php b/lib/private/FilesMetadata/Model/FilesMetadata.php index dfeb429507a..69c27740d83 100644 --- a/lib/private/FilesMetadata/Model/FilesMetadata.php +++ b/lib/private/FilesMetadata/Model/FilesMetadata.php @@ -33,58 +33,26 @@ class FilesMetadata implements IFilesMetadata { ) { } - /** - * @inheritDoc - * @return int related file id - * @since 28.0.0 - */ public function getFileId(): int { return $this->fileId; } - /** - * @inheritDoc - * @return int timestamp - * @since 28.0.0 - */ public function lastUpdateTimestamp(): int { return $this->lastUpdate; } - /** - * @inheritDoc - * @return string token - * @since 28.0.0 - */ public function getSyncToken(): string { return $this->syncToken; } - /** - * @inheritDoc - * @return string[] list of keys - * @since 28.0.0 - */ public function getKeys(): array { return array_keys($this->metadata); } - /** - * @param string $needle metadata key to search - * - * @inheritDoc - * @return bool TRUE if key exist - * @since 28.0.0 - */ public function hasKey(string $needle): bool { return (in_array($needle, $this->getKeys())); } - /** - * @inheritDoc - * @return string[] list of indexes - * @since 28.0.0 - */ public function getIndexes(): array { $indexes = []; foreach ($this->getKeys() as $key) { @@ -96,25 +64,10 @@ class FilesMetadata implements IFilesMetadata { return $indexes; } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return bool TRUE if key exists and is set as indexed - * @since 28.0.0 - */ public function isIndex(string $key): bool { return $this->metadata[$key]?->isIndexed() ?? false; } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return int edit permission - * @throws FilesMetadataNotFoundException - * @since 28.0.0 - */ public function getEditPermission(string $key): int { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -123,14 +76,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getEditPermission(); } - /** - * @param string $key metadata key - * @param int $permission edit permission - * - * @inheritDoc - * @throws FilesMetadataNotFoundException - * @since 28.0.0 - */ public function setEditPermission(string $key, int $permission): void { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -156,15 +101,6 @@ class FilesMetadata implements IFilesMetadata { $this->metadata[$key]->setEtag($etag); } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return string metadata value - * @throws FilesMetadataNotFoundException - * @throws FilesMetadataTypeException - * @since 28.0.0 - */ public function getString(string $key): string { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -173,15 +109,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getValueString(); } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return int metadata value - * @throws FilesMetadataNotFoundException - * @throws FilesMetadataTypeException - * @since 28.0.0 - */ public function getInt(string $key): int { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -190,15 +117,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getValueInt(); } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return float metadata value - * @throws FilesMetadataNotFoundException - * @throws FilesMetadataTypeException - * @since 28.0.0 - */ public function getFloat(string $key): float { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -207,15 +125,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getValueFloat(); } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return bool metadata value - * @throws FilesMetadataNotFoundException - * @throws FilesMetadataTypeException - * @since 28.0.0 - */ public function getBool(string $key): bool { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -224,15 +133,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getValueBool(); } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return array metadata value - * @throws FilesMetadataNotFoundException - * @throws FilesMetadataTypeException - * @since 28.0.0 - */ public function getArray(string $key): array { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -241,15 +141,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getValueArray(); } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return string[] metadata value - * @throws FilesMetadataNotFoundException - * @throws FilesMetadataTypeException - * @since 28.0.0 - */ public function getStringList(string $key): array { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -258,15 +149,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getValueStringList(); } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return int[] metadata value - * @throws FilesMetadataNotFoundException - * @throws FilesMetadataTypeException - * @since 28.0.0 - */ public function getIntList(string $key): array { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -275,21 +157,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getValueIntList(); } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return string value type - * @throws FilesMetadataNotFoundException - * @see IMetadataValueWrapper::TYPE_STRING - * @see IMetadataValueWrapper::TYPE_INT - * @see IMetadataValueWrapper::TYPE_FLOAT - * @see IMetadataValueWrapper::TYPE_BOOL - * @see IMetadataValueWrapper::TYPE_ARRAY - * @see IMetadataValueWrapper::TYPE_STRING_LIST - * @see IMetadataValueWrapper::TYPE_INT_LIST - * @since 28.0.0 - */ public function getType(string $key): string { if (!array_key_exists($key, $this->metadata)) { throw new FilesMetadataNotFoundException(); @@ -298,16 +165,6 @@ class FilesMetadata implements IFilesMetadata { return $this->metadata[$key]->getType(); } - /** - * @param string $key metadata key - * @param string $value metadata value - * @param bool $index set TRUE if value must be indexed - * - * @inheritDoc - * @return self - * @throws FilesMetadataKeyFormatException - * @since 28.0.0 - */ public function setString(string $key, string $value, bool $index = false): IFilesMetadata { $this->confirmKeyFormat($key); try { @@ -325,16 +182,6 @@ class FilesMetadata implements IFilesMetadata { return $this; } - /** - * @param string $key metadata key - * @param int $value metadata value - * @param bool $index set TRUE if value must be indexed - * - * @inheritDoc - * @return self - * @throws FilesMetadataKeyFormatException - * @since 28.0.0 - */ public function setInt(string $key, int $value, bool $index = false): IFilesMetadata { $this->confirmKeyFormat($key); try { @@ -352,15 +199,6 @@ class FilesMetadata implements IFilesMetadata { return $this; } - /** - * @param string $key metadata key - * @param float $value metadata value - * - * @inheritDoc - * @return self - * @throws FilesMetadataKeyFormatException - * @since 28.0.0 - */ public function setFloat(string $key, float $value, bool $index = false): IFilesMetadata { $this->confirmKeyFormat($key); try { @@ -379,16 +217,6 @@ class FilesMetadata implements IFilesMetadata { } - /** - * @param string $key metadata key - * @param bool $value metadata value - * @param bool $index set TRUE if value must be indexed - * - * @inheritDoc - * @return self - * @throws FilesMetadataKeyFormatException - * @since 28.0.0 - */ public function setBool(string $key, bool $value, bool $index = false): IFilesMetadata { $this->confirmKeyFormat($key); try { @@ -407,15 +235,6 @@ class FilesMetadata implements IFilesMetadata { } - /** - * @param string $key metadata key - * @param array $value metadata value - * - * @inheritDoc - * @return self - * @throws FilesMetadataKeyFormatException - * @since 28.0.0 - */ public function setArray(string $key, array $value): IFilesMetadata { $this->confirmKeyFormat($key); try { @@ -433,16 +252,6 @@ class FilesMetadata implements IFilesMetadata { return $this; } - /** - * @param string $key metadata key - * @param string[] $value metadata value - * @param bool $index set TRUE if each values from the list must be indexed - * - * @inheritDoc - * @return self - * @throws FilesMetadataKeyFormatException - * @since 28.0.0 - */ public function setStringList(string $key, array $value, bool $index = false): IFilesMetadata { $this->confirmKeyFormat($key); try { @@ -460,16 +269,6 @@ class FilesMetadata implements IFilesMetadata { return $this; } - /** - * @param string $key metadata key - * @param int[] $value metadata value - * @param bool $index set TRUE if each values from the list must be indexed - * - * @inheritDoc - * @return self - * @throws FilesMetadataKeyFormatException - * @since 28.0.0 - */ public function setIntList(string $key, array $value, bool $index = false): IFilesMetadata { $this->confirmKeyFormat($key); try { @@ -487,13 +286,6 @@ class FilesMetadata implements IFilesMetadata { return $this; } - /** - * @param string $key metadata key - * - * @inheritDoc - * @return self - * @since 28.0.0 - */ public function unset(string $key): IFilesMetadata { if (!array_key_exists($key, $this->metadata)) { return $this; @@ -505,13 +297,6 @@ class FilesMetadata implements IFilesMetadata { return $this; } - /** - * @param string $keyPrefix metadata key prefix - * - * @inheritDoc - * @return self - * @since 28.0.0 - */ public function removeStartsWith(string $keyPrefix): IFilesMetadata { if ($keyPrefix === '') { return $this; @@ -541,11 +326,6 @@ class FilesMetadata implements IFilesMetadata { throw new FilesMetadataKeyFormatException('key can only contains alphanumerical characters, and dash (-, _)'); } - /** - * @inheritDoc - * @return bool TRUE if metadata have been modified - * @since 28.0.0 - */ public function updated(): bool { return $this->updated; } @@ -559,9 +339,6 @@ class FilesMetadata implements IFilesMetadata { return $data; } - /** - * @return array<string, string|int|bool|float|string[]|int[]> - */ public function asArray(): array { $data = []; foreach ($this->metadata as $metaKey => $metaValueWrapper) { @@ -575,13 +352,6 @@ class FilesMetadata implements IFilesMetadata { return $data; } - /** - * @param array $data - * - * @inheritDoc - * @return IFilesMetadata - * @since 28.0.0 - */ public function import(array $data): IFilesMetadata { foreach ($data as $k => $v) { $valueWrapper = new MetadataValueWrapper(); diff --git a/lib/private/FilesMetadata/Model/MetadataValueWrapper.php b/lib/private/FilesMetadata/Model/MetadataValueWrapper.php index 710a8129340..7f57ec57577 100644 --- a/lib/private/FilesMetadata/Model/MetadataValueWrapper.php +++ b/lib/private/FilesMetadata/Model/MetadataValueWrapper.php @@ -25,72 +25,18 @@ class MetadataValueWrapper implements IMetadataValueWrapper { private bool $indexed = false; private int $editPermission = self::EDIT_FORBIDDEN; - /** - * @param string $type value type - * - * @inheritDoc - * @see self::TYPE_INT - * @see self::TYPE_FLOAT - * @see self::TYPE_BOOL - * @see self::TYPE_ARRAY - * @see self::TYPE_STRING_LIST - * @see self::TYPE_INT_LIST - * @see self::TYPE_STRING - * @since 28.0.0 - */ public function __construct(string $type = '') { $this->type = $type; } - /** - * @inheritDoc - * @return string value type - * @see self::TYPE_INT - * @see self::TYPE_FLOAT - * @see self::TYPE_BOOL - * @see self::TYPE_ARRAY - * @see self::TYPE_STRING_LIST - * @see self::TYPE_INT_LIST - * @see self::TYPE_STRING - * @since 28.0.0 - */ public function getType(): string { return $this->type; } - /** - * @param string $type value type - * - * @inheritDoc - * @return bool - * @see self::TYPE_INT - * @see self::TYPE_FLOAT - * @see self::TYPE_BOOL - * @see self::TYPE_ARRAY - * @see self::TYPE_STRING_LIST - * @see self::TYPE_INT_LIST - * @see self::TYPE_STRING - * @since 28.0.0 - */ public function isType(string $type): bool { return (strtolower($type) === strtolower($this->type)); } - /** - * @param string $type value type - * - * @inheritDoc - * @return self - * @throws FilesMetadataTypeException if type cannot be confirmed - * @see self::TYPE_INT - * @see self::TYPE_BOOL - * @see self::TYPE_ARRAY - * @see self::TYPE_STRING_LIST - * @see self::TYPE_INT_LIST - * @see self::TYPE_STRING - * @see self::TYPE_FLOAT - * @since 28.0.0 - */ public function assertType(string $type): self { if (!$this->isType($type)) { throw new FilesMetadataTypeException('type is \'' . $this->getType() . '\', expecting \'' . $type . '\''); @@ -99,14 +45,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return $this; } - /** - * @param string $value string to be set as value - * - * @inheritDoc - * @return self - * @throws FilesMetadataTypeException if wrapper was not set to store a string - * @since 28.0.0 - */ public function setValueString(string $value): self { $this->assertType(self::TYPE_STRING); $this->value = $value; @@ -114,14 +52,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return $this; } - /** - * @param int $value int to be set as value - * - * @inheritDoc - * @return self - * @throws FilesMetadataTypeException if wrapper was not set to store an int - * @since 28.0.0 - */ public function setValueInt(int $value): self { $this->assertType(self::TYPE_INT); $this->value = $value; @@ -129,14 +59,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return $this; } - /** - * @param float $value float to be set as value - * - * @inheritDoc - * @return self - * @throws FilesMetadataTypeException if wrapper was not set to store a float - * @since 28.0.0 - */ public function setValueFloat(float $value): self { $this->assertType(self::TYPE_FLOAT); $this->value = $value; @@ -144,14 +66,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return $this; } - /** - * @param bool $value bool to be set as value - * - * @inheritDoc - * @return self - * @throws FilesMetadataTypeException if wrapper was not set to store a bool - * @since 28.0.0 - */ public function setValueBool(bool $value): self { $this->assertType(self::TYPE_BOOL); $this->value = $value; @@ -160,14 +74,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return $this; } - /** - * @param array $value array to be set as value - * - * @inheritDoc - * @return self - * @throws FilesMetadataTypeException if wrapper was not set to store an array - * @since 28.0.0 - */ public function setValueArray(array $value): self { $this->assertType(self::TYPE_ARRAY); $this->value = $value; @@ -175,14 +81,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return $this; } - /** - * @param string[] $value string list to be set as value - * - * @inheritDoc - * @return self - * @throws FilesMetadataTypeException if wrapper was not set to store a string list - * @since 28.0.0 - */ public function setValueStringList(array $value): self { $this->assertType(self::TYPE_STRING_LIST); // TODO confirm value is an array or string ? @@ -191,14 +89,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return $this; } - /** - * @param int[] $value int list to be set as value - * - * @inheritDoc - * @return self - * @throws FilesMetadataTypeException if wrapper was not set to store an int list - * @since 28.0.0 - */ public function setValueIntList(array $value): self { $this->assertType(self::TYPE_INT_LIST); // TODO confirm value is an array of int ? @@ -208,13 +98,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { } - /** - * @inheritDoc - * @return string set value - * @throws FilesMetadataTypeException if wrapper was not set to store a string - * @throws FilesMetadataNotFoundException if value is not set - * @since 28.0.0 - */ public function getValueString(): string { $this->assertType(self::TYPE_STRING); if ($this->value === null) { @@ -224,13 +107,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return (string)$this->value; } - /** - * @inheritDoc - * @return int set value - * @throws FilesMetadataTypeException if wrapper was not set to store an int - * @throws FilesMetadataNotFoundException if value is not set - * @since 28.0.0 - */ public function getValueInt(): int { $this->assertType(self::TYPE_INT); if ($this->value === null) { @@ -240,13 +116,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return (int)$this->value; } - /** - * @inheritDoc - * @return float set value - * @throws FilesMetadataTypeException if wrapper was not set to store a float - * @throws FilesMetadataNotFoundException if value is not set - * @since 28.0.0 - */ public function getValueFloat(): float { $this->assertType(self::TYPE_FLOAT); if ($this->value === null) { @@ -256,13 +125,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return (float)$this->value; } - /** - * @inheritDoc - * @return bool set value - * @throws FilesMetadataTypeException if wrapper was not set to store a bool - * @throws FilesMetadataNotFoundException if value is not set - * @since 28.0.0 - */ public function getValueBool(): bool { $this->assertType(self::TYPE_BOOL); if ($this->value === null) { @@ -272,13 +134,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return (bool)$this->value; } - /** - * @inheritDoc - * @return array set value - * @throws FilesMetadataTypeException if wrapper was not set to store an array - * @throws FilesMetadataNotFoundException if value is not set - * @since 28.0.0 - */ public function getValueArray(): array { $this->assertType(self::TYPE_ARRAY); if ($this->value === null) { @@ -288,13 +143,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return (array)$this->value; } - /** - * @inheritDoc - * @return string[] set value - * @throws FilesMetadataTypeException if wrapper was not set to store a string list - * @throws FilesMetadataNotFoundException if value is not set - * @since 28.0.0 - */ public function getValueStringList(): array { $this->assertType(self::TYPE_STRING_LIST); if ($this->value === null) { @@ -304,13 +152,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return (array)$this->value; } - /** - * @inheritDoc - * @return int[] set value - * @throws FilesMetadataTypeException if wrapper was not set to store an int list - * @throws FilesMetadataNotFoundException if value is not set - * @since 28.0.0 - */ public function getValueIntList(): array { $this->assertType(self::TYPE_INT_LIST); if ($this->value === null) { @@ -320,12 +161,6 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return (array)$this->value; } - /** - * @inheritDoc - * @return string|int|float|bool|array|string[]|int[] set value - * @throws FilesMetadataNotFoundException if value is not set - * @since 28.0.0 - */ public function getValueAny(): mixed { if ($this->value === null) { throw new FilesMetadataNotFoundException('value is not set'); @@ -334,79 +169,35 @@ class MetadataValueWrapper implements IMetadataValueWrapper { return $this->value; } - /** - * @inheritDoc - * @return string stored etag - * @since 29.0.0 - */ public function getEtag(): string { return $this->etag; } - /** - * @param string $etag etag value - * - * @inheritDoc - * @return self - * @since 29.0.0 - */ public function setEtag(string $etag): self { $this->etag = $etag; return $this; } - /** - * @param bool $indexed TRUE to set the stored value as an indexed value - * - * @inheritDoc - * @return self - * @since 28.0.0 - */ public function setIndexed(bool $indexed): self { $this->indexed = $indexed; return $this; } - /** - * @inheritDoc - * @return bool TRUE if value is an indexed value - * @since 28.0.0 - */ public function isIndexed(): bool { return $this->indexed; } - /** - * @param int $permission edit permission - * - * @inheritDoc - * @return self - * @since 28.0.0 - */ public function setEditPermission(int $permission): self { $this->editPermission = $permission; return $this; } - /** - * @inheritDoc - * @return int edit permission - * @since 28.0.0 - */ public function getEditPermission(): int { return $this->editPermission; } - /** - * @param array $data serialized version of the object - * - * @inheritDoc - * @return self - * @see jsonSerialize - * @since 28.0.0 - */ public function import(array $data): self { $this->value = $data['value'] ?? null; $this->type = $data['type'] ?? ''; |