TASK: Adjust for CGL

This commit is contained in:
Daniel Siepmann 2017-03-30 11:16:45 +02:00
parent 93c0cff635
commit 1c4fce2315
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 10 additions and 3 deletions

View file

@ -24,6 +24,9 @@ use PHP_CodeSniffer_Sniff as PhpCsSniff;
use PHP_CodeSniffer_Tokens as PhpCsTokens; 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 class Typo3Update_Sniffs_Deprecated_AjaxRegistrationSniff implements PhpCsSniff
{ {

View file

@ -48,7 +48,8 @@ class Typo3Update_Sniffs_Removed_GenericFunctionCallSniff implements PhpCsSniff
private $removedFunction = []; 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() public function __construct()
{ {
@ -65,7 +66,7 @@ class Typo3Update_Sniffs_Removed_GenericFunctionCallSniff implements PhpCsSniff
/** /**
* Prepares structure from config for later usage. * Prepares structure from config for later usage.
* *
* @param array $removedFunctions * @param array $oldStructure
* @return array * @return array
*/ */
protected function prepareStructure(array $oldStructure) 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 split contains two parts, it's a class with method
if (isset($split[1])) { if (isset($split[1])) {
$newStructure[$function]['fqcn'] = $split[0]; $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]; $newStructure[$function]['function'] = $split[1];
} }
}; };