Commit bc0d9ab3 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] Fix Errors/Warnings

parent d3ad23a5
......@@ -66,7 +66,7 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
*
* Note: The extension configuration array consists of the global and typoscript configuration.
*
* @throws \InvalidArgumentException
* @throws \TYPO3\CMS\Core\Http\ImmediateResponseException
*/
public function __construct() {
$this->extensionConfiguration = $this->prepareConfiguration();
......@@ -104,7 +104,7 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
* @return SpanParserService
* @throws \InvalidArgumentException
*/
protected function getSpanParser() {
protected function getSpanParser(): SpanParserService {
$spanParser = GeneralUtility::makeInstance(SpanParserService::class);
$spanParser->setExtensionConfiguration($this->extensionConfiguration);
$spanParser->injectTermRepository($this->termRepository);
......@@ -119,7 +119,7 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
* @return CustomParserService
* @throws \InvalidArgumentException
*/
protected function getCustomParser($specialWrapCharacter) {
protected function getCustomParser(string $specialWrapCharacter): CustomParserService {
$customParser = GeneralUtility::makeInstance(CustomParserService::class);
$customParser->setExtensionConfiguration($this->extensionConfiguration);
$customParser->injectTermRepository($this->termRepository);
......@@ -136,7 +136,7 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
* @param string $content
* @return string
*/
protected function parseAndReplace(AbstractParserService $parser, $content) {
protected function parseAndReplace(AbstractParserService $parser, string $content): string {
$loopCounter = 0;
while (TRUE) {
if ($loopCounter++ > $this->extensionConfiguration['amountOfPasses']) {
......@@ -161,11 +161,9 @@ class ContentReplacerMiddleware implements MiddlewareInterface {
* settings.
*
* @return array
* @throws \TYPO3\CMS\Core\Error\Http\PageNotFoundException
* @throws \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException
* @throws \TYPO3\CMS\Core\Http\ImmediateResponseException
*/
public function prepareConfiguration() {
public function prepareConfiguration(): array {
if (TYPO3_MODE === 'BE') {
/** @var TypoScriptFrontendController $typoScriptFrontendController */
$typoScriptFrontendController = $GLOBALS['TSFE'];
......
Supports Markdown
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