From b648d12365acc7439c9d83fbf135b4fdbd4b5272 Mon Sep 17 00:00:00 2001
From: Torsten Oppermann <torsten@sgalinski.de>
Date: Mon, 17 Jul 2017 11:50:16 +0200
Subject: [PATCH] [TASK] Code cleanups

---
 Classes/Service/BackendService.php             |  3 +--
 Classes/Service/FormhandlerFinisherService.php | 10 ++--------
 Classes/Service/TypoScriptSettingsService.php  |  4 ++--
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/Classes/Service/BackendService.php b/Classes/Service/BackendService.php
index cf2f388e..4121b998 100644
--- a/Classes/Service/BackendService.php
+++ b/Classes/Service/BackendService.php
@@ -102,10 +102,9 @@ class BackendService {
 	/**
 	 * Retrieves the next site root in the page hierarchy from the current page
 	 *
-	 * @param $currentPid
 	 * @return int
 	 */
-	public static function getSiteRoot($currentPid) {
+	public static function getSiteRoot() {
 		$rootLine = BackendUtility::BEgetRootLine((int) GeneralUtility::_GP('id'));
 		$siteRoot = [];
 
diff --git a/Classes/Service/FormhandlerFinisherService.php b/Classes/Service/FormhandlerFinisherService.php
index 22b7e653..319fc75b 100644
--- a/Classes/Service/FormhandlerFinisherService.php
+++ b/Classes/Service/FormhandlerFinisherService.php
@@ -69,6 +69,8 @@ class FormhandlerFinisherService extends AbstractFinisher {
 	 *  Needed to hook into Formhandler
 	 *
 	 * @return array $gp
+	 * @throws \TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException
+	 * @throws \InvalidArgumentException
 	 */
 	public function process() {
 		if (!isset($this->settings['to_address'])) {
@@ -92,12 +94,4 @@ class FormhandlerFinisherService extends AbstractFinisher {
 
 		return $this->gp;
 	}
-
-	/**
-	 * Needed to hook into Formhandler
-	 * simply returns true
-	 */
-	public function validateConfig() {
-		parent::validateConfig();
-	}
 }
diff --git a/Classes/Service/TypoScriptSettingsService.php b/Classes/Service/TypoScriptSettingsService.php
index b4d5ad1f..9a9f9145 100644
--- a/Classes/Service/TypoScriptSettingsService.php
+++ b/Classes/Service/TypoScriptSettingsService.php
@@ -60,11 +60,11 @@ class TypoScriptSettingsService implements SingletonInterface {
 			$_POST['id'] = $pageId;
 
 			/** @var TypoScriptService $typoScriptService */
-			$class = 'TYPO3\CMS\Extbase\Service\TypoScriptService';
+			$class = TypoScriptService::class;
 			$typoScriptService = $this->objectManager->get($class);
 
 			/** @var BackendConfigurationManager $configurationManager */
-			$class = 'TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager';
+			$class = BackendConfigurationManager::class;
 			$configurationManager = $this->objectManager->get($class);
 
 			self::$typoScriptCache[$extensionKey . $pageId] = $typoScriptService->convertTypoScriptArrayToPlainArray(
-- 
GitLab