Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update metadata stub
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge authored and backportbot-nextcloud[bot] committed Apr 12, 2023
commit 6b153326f55baa7be63e1b6e34960d96f26e1bcc
11 changes: 9 additions & 2 deletions tests/stub.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -657,11 +657,18 @@ use OCP\DB\Types;
/**
* @method string getGroupName()
* @method void setGroupName(string $groupName)
* @method array getMetadata()
* @method void setMetadata(array $metadata)
* @method string getValue()
* @method void setValue(string $value)
* @see \OC\Core\Migrations\Version240000Date20220404230027
*/
class FileMetadata extends Entity {
public function getDecodedValue(): array {
return json_decode($this->getValue(), true) ?? [];
}

public function setArrayAsValue(array $value): void {
$this->setValue(json_encode($value, JSON_THROW_ON_ERROR));
}
}

}
Expand Down