#72212getIncludeScriptByCommandLineKey() PHPdoc wrong - returns Array not string
Description
The PHPdoc is wrong – in class TYPO3\CMS\Backend\Console\CliRequestHandler
I searched for a category “CLI”, but there isn’t any.
/**
* Define cli-related parameters and return the include script as well as the command line name. Used for
* authentication against the backend user in the "laodCommandLineBackendUser()" action.
*
* @param string $cliKey the CLI key
* @return string the absolute path to the include script
*/
protected function getIncludeScriptByCommandLineKey($cliKey)
{
list($commandLineScript, $commandLineName) = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$cliKey];
if (!is_callable($commandLineScript)) {
$commandLineScript = GeneralUtility::getFileAbsFileName($commandLineScript);
// Note: These constants are not in use anymore, and marked for deprecation and will be removed in TYPO3 CMS 8
define('TYPO3_cliKey', $cliKey);
define('TYPO3_cliInclude', $commandLineScript);
}
// This is a compatibility layer: Some cli scripts rely on this, like ext:phpunit cli
// This layer will be removed in TYPO3 CMS 8
$GLOBALS['temp_cliScriptPath'] = array_shift($_SERVER['argv']);
$GLOBALS['temp_cliKey'] = array_shift($_SERVER['argv']);
array_unshift($_SERVER['argv'], $GLOBALS['temp_cliScriptPath']);
return array($commandLineScript, $commandLineName);
}