[TASK] Use short version ?: in ternary operator (PHP 5.3+)

Shorten some constructs, make them easier to read
and less error-prone.

Resolves: #46400
Releases: 6.2
Change-Id: I7b0126ccfeaefdfdb89321d7287c6347d8aee050
Reviewed-on: https://review.typo3.org/19007
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn