aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorElizabeth Danzberger <lizzy7128@tutanota.de>2024-07-24 19:41:52 -0400
committerJulius Härtl <jus@bitgrid.net>2024-07-25 11:11:41 +0200
commitbb34b0809c22bba1e83b99444e1007824221974b (patch)
tree0917e44bdccb1f087515cb4742f2d163e1f4e294 /lib
parent6aea44920d9753cbb0c0a38e752cf2eceada7d03 (diff)
downloadnextcloud-server-bb34b0809c22bba1e83b99444e1007824221974b.tar.gz
nextcloud-server-bb34b0809c22bba1e83b99444e1007824221974b.zip
fix: Fix static analysis errors
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/public/Files/Template/BeforeGetTemplatesEvent.php14
-rw-r--r--lib/public/Files/Template/Field.php18
-rw-r--r--lib/public/Files/Template/FieldType.php3
3 files changed, 35 insertions, 0 deletions
diff --git a/lib/public/Files/Template/BeforeGetTemplatesEvent.php b/lib/public/Files/Template/BeforeGetTemplatesEvent.php
index dee4154b98d..c4e23c17c7c 100644
--- a/lib/public/Files/Template/BeforeGetTemplatesEvent.php
+++ b/lib/public/Files/Template/BeforeGetTemplatesEvent.php
@@ -9,15 +9,29 @@ namespace OCP\Files\Template;
use OCP\EventDispatcher\Event;
+/**
+ * @since 30.0.0
+ */
class BeforeGetTemplatesEvent extends Event {
+ /** @var array<Template> */
private array $templates;
+ /**
+ * @param array<Template> $templates
+ *
+ * @since 30.0.0
+ */
public function __construct(array $templates) {
parent::__construct();
$this->templates = $templates;
}
+ /**
+ * @return array<Template>
+ *
+ * @since 30.0.0
+ */
public function getTemplates(): array {
return $this->templates;
}
diff --git a/lib/public/Files/Template/Field.php b/lib/public/Files/Template/Field.php
index ea200b74a00..49c6a033e5c 100644
--- a/lib/public/Files/Template/Field.php
+++ b/lib/public/Files/Template/Field.php
@@ -7,6 +7,9 @@
namespace OCP\Files\Template;
+/**
+ * @since 30.0.0
+ */
class Field implements \JsonSerializable {
private string $index;
private string $content;
@@ -15,6 +18,16 @@ class Field implements \JsonSerializable {
private ?int $id;
private ?string $tag;
+ /**
+ * @param string $index
+ * @param string $content
+ * @param FieldType $type
+ * @param ?string $alias
+ * @param ?int $id
+ * @param ?string $tag
+ *
+ * @since 30.0.0
+ */
public function __construct($index, $content, $type, $alias = null, $id = null, $tag = null) {
$this->index = $index;
$this->alias = $alias;
@@ -29,6 +42,11 @@ class Field implements \JsonSerializable {
}
}
+ /**
+ * @return array
+ *
+ * @since 30.0.0
+ */
public function jsonSerialize(): array {
return [
"index" => $this->index,
diff --git a/lib/public/Files/Template/FieldType.php b/lib/public/Files/Template/FieldType.php
index 12ca7039da3..ff3080406a7 100644
--- a/lib/public/Files/Template/FieldType.php
+++ b/lib/public/Files/Template/FieldType.php
@@ -7,6 +7,9 @@
namespace OCP\Files\Template;
+/**
+ * @since 30.0.0
+ */
enum FieldType: string {
case RichText = "rich-text";
case CheckBox = "checkbox";