Skip to content
Snippets Groups Projects
Commit 336fd6c1 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Christian Kuhn
Browse files

[TASK] Simplify ValidatorResolver::buildBaseValidatorConjunction()

Prior to this change, buildBaseValidatorConjunction() was responsible
for initializing $this->baseValidatorConjunctions[$indexKey] and
additionally adding an object validator if the given target type
was a class name.

Now, the initialization takes place in getBaseValidatorConjunction()
already and buildBaseValidatorConjunction() is only called if target
types is a class name.

That way, buildBaseValidatorConjunction() gets rid of an if-statement
and the whole method looses one indentation.

Additionally, buildBaseValidatorConjunction() is guaranteed to get
passed a class-string, so argument name $targetClassName actually
makes sense.

Releases: main
Resolves: #100191
Change-Id: I7003fa1e827274e0a1eed3674e675a6f30a6c07c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78142


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 6a07b918
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment