aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2024-04-30 17:01:41 +0200
committerMarcel Klehr <mklehr@gmx.net>2024-05-14 11:38:39 +0200
commitee7592ffdd67d8ac24b8f3d3b3f87b8b28932d5b (patch)
treecee511abdd7dc0d14571e1aa661b1e76ba5ae475 /lib/public
parent17486ad15ba1575d7e31d8d4195a86cd9ef450b0 (diff)
downloadnextcloud-server-ee7592ffdd67d8ac24b8f3d3b3f87b8b28932d5b.tar.gz
nextcloud-server-ee7592ffdd67d8ac24b8f3d3b3f87b8b28932d5b.zip
fix: Run cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/TaskProcessing/ShapeDescriptor.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/public/TaskProcessing/ShapeDescriptor.php b/lib/public/TaskProcessing/ShapeDescriptor.php
index 58d4b5d8e7f..c84a638862d 100644
--- a/lib/public/TaskProcessing/ShapeDescriptor.php
+++ b/lib/public/TaskProcessing/ShapeDescriptor.php
@@ -6,7 +6,7 @@ namespace OCP\TaskProcessing;
* Data object for input output shape entries
* @since 30.0.0
*/
-class ShapeDescriptor {
+class ShapeDescriptor implements \JsonSerializable {
/**
* @param string $name
* @param string $description
@@ -43,4 +43,15 @@ class ShapeDescriptor {
public function getShapeType(): EShapeType {
return $this->shapeType;
}
+
+ /**
+ * @return array{name: string, description: string, type: int}
+ */
+ public function jsonSerialize(): array {
+ return [
+ 'name' => $this->getName(),
+ 'description' => $this->getDescription(),
+ 'type' => $this->getShapeType()->value,
+ ];
+ }
}