From 1c4fce23157263425dcb9e9c2a489f1c7ea7bd09 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 30 Mar 2017 11:16:45 +0200 Subject: [PATCH] TASK: Adjust for CGL --- .../Sniffs/Deprecated/AjaxRegistrationSniff.php | 3 +++ .../Sniffs/Removed/GenericFunctionCallSniff.php | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php b/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php index 603ea88..355e408 100644 --- a/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Deprecated/AjaxRegistrationSniff.php @@ -24,6 +24,9 @@ use PHP_CodeSniffer_Sniff as PhpCsSniff; use PHP_CodeSniffer_Tokens as PhpCsTokens; /** + * Analyses feature 6991. + * + * @see https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.6/Feature-69916-PSR-7-basedRoutingForBackendAJAXRequests.html */ class Typo3Update_Sniffs_Deprecated_AjaxRegistrationSniff implements PhpCsSniff { diff --git a/src/Standards/Typo3Update/Sniffs/Removed/GenericFunctionCallSniff.php b/src/Standards/Typo3Update/Sniffs/Removed/GenericFunctionCallSniff.php index 2a106de..7420a63 100644 --- a/src/Standards/Typo3Update/Sniffs/Removed/GenericFunctionCallSniff.php +++ b/src/Standards/Typo3Update/Sniffs/Removed/GenericFunctionCallSniff.php @@ -48,7 +48,8 @@ class Typo3Update_Sniffs_Removed_GenericFunctionCallSniff implements PhpCsSniff private $removedFunction = []; /** - * TODO: Multiple files allowed, using glob ... to allow splitting per ext (extbase, fluid, ...) and TYPO3 Version 7.1, 7.0, ... + * TODO: Multiple files allowed, using glob ... + * to allow splitting per ext (extbase, fluid, ...) and TYPO3 Version 7.1, 7.0, ... */ public function __construct() { @@ -65,7 +66,7 @@ class Typo3Update_Sniffs_Removed_GenericFunctionCallSniff implements PhpCsSniff /** * Prepares structure from config for later usage. * - * @param array $removedFunctions + * @param array $oldStructure * @return array */ protected function prepareStructure(array $oldStructure) @@ -89,7 +90,10 @@ class Typo3Update_Sniffs_Removed_GenericFunctionCallSniff implements PhpCsSniff // If split contains two parts, it's a class with method if (isset($split[1])) { $newStructure[$function]['fqcn'] = $split[0]; - $newStructure[$function]['class'] = array_slice(explode('\\', $newStructure[$function]['fqcn']), -1)[0]; + $newStructure[$function]['class'] = array_slice( + explode('\\', $newStructure[$function]['fqcn']), + -1 + )[0]; $newStructure[$function]['function'] = $split[1]; } };