diff --git a/include/errors/class_SimplePluginCheckError.inc b/include/errors/class_SimplePluginCheckError.inc index dff0535ef99f4cebaf06ecc8f02b567641d04c8b..ee906dad927bcade11d44da6cb839f2b78189c0d 100644 --- a/include/errors/class_SimplePluginCheckError.inc +++ b/include/errors/class_SimplePluginCheckError.inc @@ -30,7 +30,7 @@ class SimplePluginCheckError extends SimplePluginError * * \return HTML string */ - static public function invalidValue(string $error): string + static public function invalidValue (string $error): string { return sprintf( '<b>%s</b> %s', diff --git a/include/simpleplugin/attributes/class_IntAttribute.inc b/include/simpleplugin/attributes/class_IntAttribute.inc index b5218747a7434534ad7d851085c9da2cf8a43e87..e3252a8ccdb3166f3fb961935cc8102e69820074 100644 --- a/include/simpleplugin/attributes/class_IntAttribute.inc +++ b/include/simpleplugin/attributes/class_IntAttribute.inc @@ -45,7 +45,7 @@ class IntAttribute extends Attribute $this->max = ($max === FALSE ? FALSE : $this->inputValue($max)); } - public function getExample (): ?string + public function getExample () { if (($this->min !== FALSE) && ($this->max !== FALSE)) { return sprintf(_('An integer between %d and %d'), $this->min, $this->max); @@ -170,7 +170,7 @@ class FloatAttribute extends IntAttribute $this->step = 0.01; } - public function getExample (): ?string + public function getExample () { if (($this->min !== FALSE) && ($this->max !== FALSE)) { return sprintf(_('A float between %f and %f'), $this->min, $this->max); diff --git a/include/simpleplugin/attributes/class_StringAttribute.inc b/include/simpleplugin/attributes/class_StringAttribute.inc index 74a73ee93939e489fdad6c4e7de4d4f0a6020954..4a3aec48e70d9a524a10b0ad8ac6726405597046 100644 --- a/include/simpleplugin/attributes/class_StringAttribute.inc +++ b/include/simpleplugin/attributes/class_StringAttribute.inc @@ -53,7 +53,7 @@ class StringAttribute extends Attribute $this->example = $example; } - public function getExample (): ?string + public function getExample () { return $this->example; } diff --git a/include/simpleplugin/class_Attribute.inc b/include/simpleplugin/class_Attribute.inc index ebf5815a6b0a13a26de1ac02dd4dd4b4723b383c..e03f20ef6a1bfe25ac8ee4eaf5681a8a9ce235fd 100644 --- a/include/simpleplugin/class_Attribute.inc +++ b/include/simpleplugin/class_Attribute.inc @@ -121,7 +121,11 @@ class Attribute $this->manageAttributes($this->getValue()); } - function getParent(): ?simplePlugin + /*! \brief Get parent plugin instance, if any + * + * \return simplePlugin|null + */ + function getParent () { return $this->plugin; } @@ -172,7 +176,11 @@ class Attribute return $this->inLdap; } - public function getExample (): ?string + /*! \brief Get an example value + * + * \return string|null + */ + public function getExample () { return NULL; } diff --git a/include/simpleplugin/class_simplePlugin.inc b/include/simpleplugin/class_simplePlugin.inc index b05acf8e0e42c2a54e7e46cebe8208cab22074f8..0baa4b3098a2d14ab3066a0fab07e3e3df82f9e6 100644 --- a/include/simpleplugin/class_simplePlugin.inc +++ b/include/simpleplugin/class_simplePlugin.inc @@ -1468,7 +1468,6 @@ class simplePlugin implements SimpleTab default: trigger_error(sprintf('Invalid %s event type given: "%s"! Valid types are: add, modify, remove.', strtolower($when), $mode)); return []; - break; } }