From 4e134826adb86325caf0f96ef24e881af12dc465 Mon Sep 17 00:00:00 2001 From: Alexander Schnitzler <git@alexanderschnitzler.de> Date: Sat, 15 Feb 2020 19:21:14 +0100 Subject: [PATCH] [TASK] Add missing methods in AbstractRenderable class This patch adds two methods setDefaultValue and setProperty which are called from within class AbstractRenderable via $this->setDefaultValue() and $this->setProperty() but are meant to be called on a child class. The implementation of said methods with an empty method body only serve the purpose to please phpstan. As mentioned in those method bodies, someone with a deeper understanding of the form extension architecture needs to decide whether the abstract class AbstractRenderable should only declare those methods as abstract methods, i.e. child classes have to implement them or if the abstract class can provide a meaningful default behavior which can but doesn't need to be overridden by child classes. Releases: master Resolves: #90385 Change-Id: I1ac3b319746d8eca12b32394cd9da2073431b582 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63262 Tested-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Benni Mack <benni@typo3.org> --- .../Domain/Model/Renderable/AbstractRenderable.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/typo3/sysext/form/Classes/Domain/Model/Renderable/AbstractRenderable.php b/typo3/sysext/form/Classes/Domain/Model/Renderable/AbstractRenderable.php index 61d4dd53bb79..7df0df61e216 100644 --- a/typo3/sysext/form/Classes/Domain/Model/Renderable/AbstractRenderable.php +++ b/typo3/sysext/form/Classes/Domain/Model/Renderable/AbstractRenderable.php @@ -412,6 +412,16 @@ abstract class AbstractRenderable implements RenderableInterface, VariableRender $this->label = $label; } + public function setDefaultValue($defaultValue) + { + // todo: this method must either be abstract and implemented in sub classes or get a proper method body. + } + + public function setProperty(string $key, $value) + { + // todo: this method must either be abstract and implemented in sub classes or get a proper method body. + } + /** * Get the templateName name of the renderable * -- GitLab