aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/forms
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2022-07-11 09:52:05 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2022-07-11 09:52:05 +0000
commit8f48ee027f2e4e3ed9e69a6e2910ed577196813e (patch)
tree628c5678de84ad6d3e00df2287798fd50eb1e152 /lib/classes/forms
parent2054b4c0815aa508623165d7fc0b810bafc16cc0 (diff)
fix errors of type 'Unsafe usage of new static', fixes #1245
Closes #1245 Merge request studip/studip!760
Diffstat (limited to 'lib/classes/forms')
-rw-r--r--lib/classes/forms/Form.php9
-rw-r--r--lib/classes/forms/Input.php2
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/classes/forms/Form.php b/lib/classes/forms/Form.php
index 0633190..569eb1f 100644
--- a/lib/classes/forms/Form.php
+++ b/lib/classes/forms/Form.php
@@ -49,6 +49,15 @@ class Form extends Part
return $form;
}
+ /**
+ * Finalized constructor.
+ *
+ * @param mixed[] ...$parts
+ */
+ final public function __construct(...$parts)
+ {
+ parent::__construct($parts);
+ }
/**
* Adds a new Fieldset to the Form object with the SORM object's fields as
diff --git a/lib/classes/forms/Input.php b/lib/classes/forms/Input.php
index 3018a5b..aa3069b 100644
--- a/lib/classes/forms/Input.php
+++ b/lib/classes/forms/Input.php
@@ -88,7 +88,7 @@ abstract class Input
* @param $value
* @param $attributes
*/
- public function __construct($name, $title, $value, array $attributes = [])
+ final public function __construct($name, $title, $value, array $attributes = [])
{
$this->name = $name;
$this->title = $title;