diff --git a/core/pagecontroller/Document.php b/core/pagecontroller/Document.php
index 3a5e6c4fc..97eb5131b 100644
--- a/core/pagecontroller/Document.php
+++ b/core/pagecontroller/Document.php
@@ -110,7 +110,7 @@ class Document extends APFObject implements DomNode {
protected $parent = null;
/**
- * @var string[][] $attributes XML attributes of the current node.
+ * @var string[] $attributes XML attributes of the current node.
*/
protected $attributes = [];
diff --git a/extensions/form/client/taglib/AddFormControlClientValidatorTag.php b/extensions/form/client/taglib/AddFormControlClientValidatorTag.php
index b418f0277..c4ed0952f 100644
--- a/extensions/form/client/taglib/AddFormControlClientValidatorTag.php
+++ b/extensions/form/client/taglib/AddFormControlClientValidatorTag.php
@@ -112,6 +112,7 @@ public function onAfterAppend() {
public function reset() {
// nothing to do as client listeners cannot be reset
+ return $this;
}
}
diff --git a/extensions/form/client/taglib/ClientValidationListenerTag.php b/extensions/form/client/taglib/ClientValidationListenerTag.php
index 91d61e1f1..47e3012d0 100644
--- a/extensions/form/client/taglib/ClientValidationListenerTag.php
+++ b/extensions/form/client/taglib/ClientValidationListenerTag.php
@@ -113,6 +113,7 @@ public function transform() {
public function reset() {
// nothing to do as client listeners cannot be reset
+ return $this;
}
}
diff --git a/extensions/form/client/taglib/FormClientErrorDisplayTag.php b/extensions/form/client/taglib/FormClientErrorDisplayTag.php
index 94f1800a7..4493eb4c6 100644
--- a/extensions/form/client/taglib/FormClientErrorDisplayTag.php
+++ b/extensions/form/client/taglib/FormClientErrorDisplayTag.php
@@ -84,6 +84,7 @@ public function transform() {
public function reset() {
// nothing to do as client errors cannot be reset
+ return $this;
}
}
diff --git a/extensions/form/client/taglib/GetClientFormValidationTag.php b/extensions/form/client/taglib/GetClientFormValidationTag.php
index fb0c8e18c..172118c38 100644
--- a/extensions/form/client/taglib/GetClientFormValidationTag.php
+++ b/extensions/form/client/taglib/GetClientFormValidationTag.php
@@ -219,6 +219,7 @@ public function onAfterAppend() {
public function reset() {
// nothing to do as client validation rule generation takes no user input
+ return $this;
}
}
diff --git a/tools/form/FormControl.php b/tools/form/FormControl.php
index 9f283c2eb..b06c35d78 100644
--- a/tools/form/FormControl.php
+++ b/tools/form/FormControl.php
@@ -366,7 +366,7 @@ public function isFilled();
* @version
* Version 0.1, 03.02.2010
*/
- public function appendCssClass($class);
+ public function appendCssClass(string $class);
/**
* Adds an additional attribute to the white list of the control.
@@ -380,7 +380,7 @@ public function appendCssClass($class);
* @version
* Version 0.1, 21.07.2010
*/
- public function addAttributeToWhiteList($name);
+ public function addAttributeToWhiteList(string $name);
/**
* Adds a set of additional attributes to the white list of the control.
diff --git a/tools/form/FormControlFinder.php b/tools/form/FormControlFinder.php
index 8c92452b2..722a387a8 100644
--- a/tools/form/FormControlFinder.php
+++ b/tools/form/FormControlFinder.php
@@ -44,7 +44,7 @@ interface FormControlFinder {
* @version
* Version 0.1, 21.01.2007
*/
- public function getFormElementByID($id);
+ public function getFormElementByID(string $id);
/**
* Returns a list of form controls with the given name.
@@ -57,7 +57,7 @@ public function getFormElementByID($id);
* @version
* Version 0.1, 16.08.2010
*/
- public function getFormElementsByName($name);
+ public function getFormElementsByName(string $name);
/**
* Returns a list of form elements addressed by their tag name.
@@ -72,7 +72,7 @@ public function getFormElementsByName($name);
* Version 0.1, 14.06.2008 (API change: do use this function instead of getFormElementsByType()!)
* Version 0.2, 12.12.2012 (Refactoring due to tag renaming)
*/
- public function getFormElementsByTagName($tagName);
+ public function getFormElementsByTagName(string $tagName);
/**
* Returns a list of form elements addressed by their implementation class name.
@@ -100,7 +100,7 @@ public function getFormElementsByType(string $class): array;
* @version
* Version 0.1, 03.09.2008
*/
- public function getMarker($markerName);
+ public function getMarker(string $markerName);
/**
* Returns a reference on the form element identified by the given name.
@@ -115,7 +115,7 @@ public function getMarker($markerName);
* Version 0.1, 07.01.2007
* Version 0.2, 12.09.2009 (Corrected debug message)
*/
- public function getFormElementByName($name);
+ public function getFormElementByName(string $name);
/**
* Let's you retrieve an <form:getstring /> tag instance with the specified name.
@@ -129,6 +129,6 @@ public function getFormElementByName($name);
* @version
* Version 0.1, 17.01.2012
*/
- public function getLabel($name);
+ public function getLabel(string $name);
}
diff --git a/tools/form/FormElement.php b/tools/form/FormElement.php
index b9bc8d557..0d309af92 100644
--- a/tools/form/FormElement.php
+++ b/tools/form/FormElement.php
@@ -63,6 +63,8 @@ public function isValid();
*
* What happens when resetting a form control is up to the dedicated implementation.
*
+ * @return $this This instance for further usage.
+ *
* @author Christian Achatz
* @version
* Version 0.1, 06.09.2014 (ID#206: Added interface enhancement to allow resetting)
diff --git a/tools/form/FormMarker.php b/tools/form/FormMarker.php
index 8083441ea..6a184180c 100644
--- a/tools/form/FormMarker.php
+++ b/tools/form/FormMarker.php
@@ -41,7 +41,7 @@ interface FormMarker {
* @version
* Version 0.1, 23.08.2014
*/
- public function addContentAfter($content);
+ public function addContentAfter(string $content);
/**
* Allows you to add content (e.g. HTML, text) BEFORE the form marker.
@@ -54,5 +54,5 @@ public function addContentAfter($content);
* @version
* Version 0.1, 23.08.2014
*/
- public function addContentBefore($content);
+ public function addContentBefore(string $content);
}
diff --git a/tools/form/HtmlForm.php b/tools/form/HtmlForm.php
index 7cbdf4742..d47f768d8 100644
--- a/tools/form/HtmlForm.php
+++ b/tools/form/HtmlForm.php
@@ -110,6 +110,8 @@ public static function clearModelToFormControlMapper();
*
* @param string $action The action URL of the form.
*
+ * @return $this This instance for further usage.
+ *
* @author Christian Schäfer
* @version
* Version 0.1, 07.01.2007
diff --git a/tools/form/mixin/FormControlFinder.php b/tools/form/mixin/FormControlFinder.php
index 1711f8189..c01eb5b84 100644
--- a/tools/form/mixin/FormControlFinder.php
+++ b/tools/form/mixin/FormControlFinder.php
@@ -46,7 +46,7 @@ trait FormControlFinder {
* @return FormControl A reference on the form element.
* @throws FormException In case the form element cannot be found.
*/
- public function getFormElementByID($id) {
+ public function getFormElementByID(string $id) {
if (count($this->children) > 0) {
foreach ($this->children as &$child) {
@@ -89,7 +89,7 @@ public function getFormElementByID($id) {
* @return DynamicFormElementMarkerTag|DomNode The marker.
* @throws FormException In case the marker cannot be found.
*/
- public function getMarker($markerName) {
+ public function getMarker(string $markerName) {
return $this->getFormElementByName($markerName);
}
@@ -99,7 +99,7 @@ public function getMarker($markerName) {
* @return FormControl A reference on the form element.
* @throws FormException In case the form element cannot be found.
*/
- public function getFormElementByName($name) {
+ public function getFormElementByName(string $name) {
if (count($this->children) > 0) {
foreach ($this->children as &$child) {
@@ -142,7 +142,7 @@ public function getFormElementByName($name) {
* @return LanguageLabelTag The instance of the desired label.
* @throws FormException In case no label can be found.
*/
- public function getLabel($name) {
+ public function getLabel(string $name) {
if (count($this->children) > 0) {
foreach ($this->children as &$child) {
@@ -183,7 +183,7 @@ public function getLabel($name) {
*
* @return FormControl[] The list of form controls with the given name.
*/
- public function getFormElementsByName($name) {
+ public function getFormElementsByName(string $name) {
$elements = [];
if (count($this->children) > 0) {
foreach ($this->children as &$child) {
@@ -209,7 +209,7 @@ public function getFormElementsByName($name) {
* @return FormControl[] A list of references on the form elements.
* @throws FormException In case the form element cannot be found or desired tag is not registered.
*/
- public function getFormElementsByTagName($tagName) {
+ public function getFormElementsByTagName(string $tagName) {
/* @var $form HtmlFormTag */
if ($this instanceof HtmlForm) {
diff --git a/tools/form/multifileupload/biz/MultiFileUploadManager.php b/tools/form/multifileupload/biz/MultiFileUploadManager.php
index e37539c34..f508912a6 100644
--- a/tools/form/multifileupload/biz/MultiFileUploadManager.php
+++ b/tools/form/multifileupload/biz/MultiFileUploadManager.php
@@ -168,7 +168,7 @@ private function checkSessionFiles() {
* @param array $file
* @param boolean $js True, in case of java script upload, false otherwise.
*
- * @return boolean
+ * @return boolean|array
* @throws FormException
*
* @author Werner Liemberger
@@ -311,7 +311,7 @@ private function getFileLink($uploadname) {
* @param string $dir - Zielverzeichnis
* @param string $name - Zieldateiname
*
- * @return File::moveTo
+ * @return bool
*
* @author Werner Liemberger
* @version 1.0, 14.03.2011
@@ -381,7 +381,7 @@ public function getFiles() {
*
* @param string $uploadname - Dateiname
*
- * @return array
+ * @return mixed
*
* @author Werner Liemberger
* @version 1.0, 14.3.2011
diff --git a/tools/form/multifileupload/pres/taglib/MultiFileUploadTag.php b/tools/form/multifileupload/pres/taglib/MultiFileUploadTag.php
index a986cf4a2..c47536ce1 100644
--- a/tools/form/multifileupload/pres/taglib/MultiFileUploadTag.php
+++ b/tools/form/multifileupload/pres/taglib/MultiFileUploadTag.php
@@ -174,8 +174,8 @@ public function transform() {
*/
private function createUploadButton() {
return '