Skip to content

Commit bb34b08

Browse files
elzodyjuliusknorr
authored andcommitted
fix: Fix static analysis errors
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
1 parent 6aea449 commit bb34b08

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

lib/public/Files/Template/BeforeGetTemplatesEvent.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,29 @@
99

1010
use OCP\EventDispatcher\Event;
1111

12+
/**
13+
* @since 30.0.0
14+
*/
1215
class BeforeGetTemplatesEvent extends Event {
16+
/** @var array<Template> */
1317
private array $templates;
1418

19+
/**
20+
* @param array<Template> $templates
21+
*
22+
* @since 30.0.0
23+
*/
1524
public function __construct(array $templates) {
1625
parent::__construct();
1726

1827
$this->templates = $templates;
1928
}
2029

30+
/**
31+
* @return array<Template>
32+
*
33+
* @since 30.0.0
34+
*/
2135
public function getTemplates(): array {
2236
return $this->templates;
2337
}

lib/public/Files/Template/Field.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace OCP\Files\Template;
99

10+
/**
11+
* @since 30.0.0
12+
*/
1013
class Field implements \JsonSerializable {
1114
private string $index;
1215
private string $content;
@@ -15,6 +18,16 @@ class Field implements \JsonSerializable {
1518
private ?int $id;
1619
private ?string $tag;
1720

21+
/**
22+
* @param string $index
23+
* @param string $content
24+
* @param FieldType $type
25+
* @param ?string $alias
26+
* @param ?int $id
27+
* @param ?string $tag
28+
*
29+
* @since 30.0.0
30+
*/
1831
public function __construct($index, $content, $type, $alias = null, $id = null, $tag = null) {
1932
$this->index = $index;
2033
$this->alias = $alias;
@@ -29,6 +42,11 @@ public function __construct($index, $content, $type, $alias = null, $id = null,
2942
}
3043
}
3144

45+
/**
46+
* @return array
47+
*
48+
* @since 30.0.0
49+
*/
3250
public function jsonSerialize(): array {
3351
return [
3452
"index" => $this->index,

lib/public/Files/Template/FieldType.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace OCP\Files\Template;
99

10+
/**
11+
* @since 30.0.0
12+
*/
1013
enum FieldType: string {
1114
case RichText = "rich-text";
1215
case CheckBox = "checkbox";

0 commit comments

Comments
 (0)