Commit 59e42eba authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Susanne Moog
Browse files

[BUGFIX] Update friendsofphp/php-cs-fixer to 2.15.2

This patch updates friendsofphp/php-cs-fixer to version 2.15.2 and
applies fixes to the code.

Executed commands:

  composer require --dev "friendsofphp/php-cs-fixer:^2.15.2"
  ./bin/php-cs-fixer fix --config Build/.php_cs

Resolves: #89031
Releases: master, 9.5
Change-Id: I3761ab56f66b6bd3b0fadc2bfa354cf4010b5e43
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61564

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
parent 663eb245
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "30269039afafb8171b6dbf55bb824ca5",
"content-hash": "52a58d5697be7a21a129b3d4c71129d8",
"packages": [
{
"name": "cogpowered/finediff",
......@@ -3053,13 +3053,13 @@
"authors": [
{
"name": "The TYPO3 Community",
"role": "Contributor",
"homepage": "https://typo3.org/community/"
"homepage": "https://typo3.org/community/",
"role": "Contributor"
},
{
"name": "TYPO3 CMS Core Team",
"role": "Developer",
"homepage": "https://forge.typo3.org/projects/typo3cms-core"
"homepage": "https://forge.typo3.org/projects/typo3cms-core",
"role": "Developer"
}
],
"description": "TYPO3 CMS Installers",
......@@ -3977,16 +3977,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v2.14.1",
"version": "v2.15.2",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "2e82abd1322897eb8aacb861e5ff551af3888349"
"reference": "c9d30fddfa3feb8b82663104864224f2ce7a3675"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/2e82abd1322897eb8aacb861e5ff551af3888349",
"reference": "2e82abd1322897eb8aacb861e5ff551af3888349",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c9d30fddfa3feb8b82663104864224f2ce7a3675",
"reference": "c9d30fddfa3feb8b82663104864224f2ce7a3675",
"shasum": ""
},
"require": {
......@@ -4007,9 +4007,6 @@
"symfony/process": "^3.0 || ^4.0",
"symfony/stopwatch": "^3.0 || ^4.0"
},
"conflict": {
"hhvm": "*"
},
"require-dev": {
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
"justinrainbow/json-schema": "^5.0",
......@@ -4017,11 +4014,11 @@
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.1",
"php-cs-fixer/accessible-object": "^1.0",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.0.1",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.0.1",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1",
"phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1",
"phpunitgoodpractices/traits": "^1.5.1",
"symfony/phpunit-bridge": "^4.0"
"phpunitgoodpractices/traits": "^1.8",
"symfony/phpunit-bridge": "^4.3"
},
"suggest": {
"ext-mbstring": "For handling non-UTF8 characters in cache signature.",
......@@ -4054,17 +4051,17 @@
"MIT"
],
"authors": [
{
"name": "Dariusz Rumiński",
"email": "dariusz.ruminski@gmail.com"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Dariusz Rumiński",
"email": "dariusz.ruminski@gmail.com"
}
],
"description": "A tool to automatically fix PHP code style",
"time": "2019-02-10T22:52:33+00:00"
"time": "2019-08-27T16:03:01+00:00"
},
{
"name": "hoa/consistency",
......@@ -4616,7 +4613,7 @@
"time": "2017-01-16T07:08:25+00:00"
},
{
"name": "mikey179/vfsstream",
"name": "mikey179/vfsStream",
"version": "v1.6.5",
"source": {
"type": "git",
......@@ -4653,8 +4650,8 @@
"authors": [
{
"name": "Frank Kleine",
"role": "Developer",
"homepage": "http://frankkleine.de/"
"homepage": "http://frankkleine.de/",
"role": "Developer"
}
],
"description": "Virtual file system to mock the real file system in unit tests.",
......@@ -4792,18 +4789,18 @@
"authors": [
{
"name": "Arne Blankerts",
"role": "Developer",
"email": "arne@blankerts.de"
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"role": "Developer",
"email": "sebastian@phpeople.de"
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"role": "Developer",
"email": "sebastian@phpunit.de"
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
......@@ -4839,18 +4836,18 @@
"authors": [
{
"name": "Arne Blankerts",
"role": "Developer",
"email": "arne@blankerts.de"
"email": "arne@blankerts.de",
"role": "Developer"
},
{
"name": "Sebastian Heuer",
"role": "Developer",
"email": "sebastian@phpeople.de"
"email": "sebastian@phpeople.de",
"role": "Developer"
},
{
"name": "Sebastian Bergmann",
"role": "Developer",
"email": "sebastian@phpunit.de"
"email": "sebastian@phpunit.de",
"role": "Developer"
}
],
"description": "Library for handling version information and constraints",
......@@ -5071,8 +5068,8 @@
"authors": [
{
"name": "Sebastian Bergmann",
"role": "lead",
"email": "sebastian@phpunit.de"
"email": "sebastian@phpunit.de",
"role": "lead"
}
],
"description": "FilterIterator implementation that filters files based on a list of suffixes.",
......
......@@ -61,6 +61,6 @@ class DebugModule extends AbstractModule implements ShortInfoProviderInterface
});
return sprintf($this->getLanguageService()->sL(
'LLL:EXT:adminpanel/Resources/Private/Language/locallang_debug.xlf:module.shortinfo'
), count($errorsAndWarnings));
), count($errorsAndWarnings));
}
}
......@@ -2318,7 +2318,7 @@ class EditDocumentController
$table,
$reqRecord['uid'],
'uid,pid,t3ver_oid'
);
);
return is_array($versionRec) ? $versionRec : $reqRecord;
}
// This means that editing cannot occur on this record because it was not supporting versioning
......
......@@ -60,19 +60,19 @@ class AdminIsSystemMaintainer extends AbstractNode
// User is a system maintainer
$fieldInformationText = '<strong>' . htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:formEngine.beUser.admin.information.userIsSystemMaintainer'
)) . '</strong>';
)) . '</strong>';
} else {
// User is currently not an admin, but set as system maintainer (in-effective).
// If admin field is set to 1, the user is therefore system maintainer again.
$fieldInformationText = '<strong>' . htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:formEngine.beUser.admin.information.userWillBecomeSystemMaintainer'
)) . '</strong>';
)) . '</strong>';
}
} else {
// User is in system maintainer list, user can not change admin and password
$fieldInformationText = '<strong>' . htmlspecialchars($languageService->sL(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:formEngine.beUser.admin.information.userAdminAndPasswordChangeNotAllowed'
)) . '</strong>';
)) . '</strong>';
}
$resultArray['html'] = $fieldInformationText;
}
......
......@@ -2001,11 +2001,11 @@ class PageLayoutView implements LoggerAwareInterface
$row['uid'],
' ' . $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.referencesToRecord'),
$this->getReferenceCount('tt_content', $row['uid'])
) . BackendUtility::translationCount(
'tt_content',
$row['uid'],
' ' . $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.translationsOfRecord')
);
) . BackendUtility::translationCount(
'tt_content',
$row['uid'],
' ' . $this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.translationsOfRecord')
);
$confirm = $this->getLanguageService()->getLL('deleteWarning')
. $refCountMsg;
$out .= '<a class="btn btn-default t3js-modal-trigger" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction($params)) . '"'
......@@ -2278,7 +2278,7 @@ class PageLayoutView implements LoggerAwareInterface
}
$out .= htmlspecialchars($this->getLanguageService()->sL(
BackendUtility::getLabelFromItemlist('tt_content', 'pages', $row['pages'])
)) . '<br />';
)) . '<br />';
break;
default:
$contentType = $this->CType_labels[$row['CType']];
......@@ -3160,11 +3160,11 @@ class PageLayoutView implements LoggerAwareInterface
foreach ($searchLevelItems as $kv => $label) {
$opt[] = '<option value="' . $kv . '"' . ($kv === $this->searchLevels ? ' selected="selected"' : '') . '>' . htmlspecialchars(
$label
) . '</option>';
) . '</option>';
}
$lMenu = '<select class="form-control" name="search_levels" title="' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.search_levels')
) . '" id="search_levels">' . implode('', $opt) . '</select>';
) . '" id="search_levels">' . implode('', $opt) . '</select>';
// Table with the search box:
$content = '<div class="db_list-searchbox-form db_list-searchbox-toolbar module-docheader-bar module-docheader-bar-search t3js-module-docheader-bar t3js-module-docheader-bar-search" id="db_list-searchbox-toolbar" style="display: ' . ($this->searchString == '' ? 'none' : 'block') . ';">
' . $formElements[0] . '
......@@ -3175,34 +3175,34 @@ class PageLayoutView implements LoggerAwareInterface
<div class="form-group col-xs-12">
<label for="search_field">' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.label.searchString')
) . ': </label>
) . ': </label>
<input class="form-control" type="search" placeholder="' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.enterSearchString')
) . '" title="' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.searchString')
) . '" name="search_field" id="search_field" value="' . htmlspecialchars($this->searchString) . '" />
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.enterSearchString')
) . '" title="' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.searchString')
) . '" name="search_field" id="search_field" value="' . htmlspecialchars($this->searchString) . '" />
</div>
<div class="form-group col-xs-12 col-sm-6">
<label for="search_levels">' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.label.search_levels')
) . ': </label>
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.label.search_levels')
) . ': </label>
' . $lMenu . '
</div>
<div class="form-group col-xs-12 col-sm-6">
<label for="showLimit">' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.label.limit')
) . ': </label>
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.label.limit')
) . ': </label>
<input class="form-control" type="number" min="0" max="10000" placeholder="10" title="' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.limit')
) . '" name="showLimit" id="showLimit" value="' . htmlspecialchars(
($this->showLimit ? $this->showLimit : '')
) . '" />
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.limit')
) . '" name="showLimit" id="showLimit" value="' . htmlspecialchars(
($this->showLimit ? $this->showLimit : '')
) . '" />
</div>
<div class="form-group col-xs-12">
<div class="form-control-wrap">
<button type="submit" class="btn btn-default" name="search" title="' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.search')
) . '">
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.search')
) . '">
' . $this->iconFactory->getIcon('actions-search', Icon::SIZE_SMALL)->render(
) . ' ' . htmlspecialchars(
$lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.search')
......@@ -3639,14 +3639,14 @@ class PageLayoutView implements LoggerAwareInterface
// Check table:
if (is_array($GLOBALS['TCA'][$table]) && isset($GLOBALS['TCA'][$table]['columns']) && is_array(
$GLOBALS['TCA'][$table]['columns']
)) {
)) {
if (isset($GLOBALS['TCA'][$table]['columns']) && is_array($GLOBALS['TCA'][$table]['columns'])) {
// Traverse configured columns and add them to field array, if available for user.
foreach ($GLOBALS['TCA'][$table]['columns'] as $fN => $fieldValue) {
if ($dontCheckUser || (!$fieldValue['exclude'] || $backendUser->check(
'non_exclude_fields',
$table . ':' . $fN
)) && $fieldValue['config']['type'] !== 'passthrough') {
)) && $fieldValue['config']['type'] !== 'passthrough') {
$fieldListArr[] = $fN;
}
}
......@@ -3991,14 +3991,14 @@ class PageLayoutView implements LoggerAwareInterface
$content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
'actions-move-up',
Icon::SIZE_SMALL
)->render() . '</a> <i>[' . (max(0, $pointer - $this->iLimit) + 1) . ' - ' . $pointer . ']</i>';
)->render() . '</a> <i>[' . (max(0, $pointer - $this->iLimit) + 1) . ' - ' . $pointer . ']</i>';
break;
case 'rwd':
$href = $this->listURL() . '&pointer=' . $pointer . $tParam;
$content = '<a href="' . htmlspecialchars($href) . '">' . $this->iconFactory->getIcon(
'actions-move-down',
Icon::SIZE_SMALL
)->render() . '</a> <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i>';
)->render() . '</a> <i>[' . ($pointer + 1) . ' - ' . $this->totalItems . ']</i>';
break;
}
return $content;
......@@ -4138,13 +4138,13 @@ class PageLayoutView implements LoggerAwareInterface
if ($launchViewParameter !== '') {
$htmlCode .= ' onclick="' . htmlspecialchars(
'top.TYPO3.InfoWindow.showItem(' . $launchViewParameter . '); return false;'
) . '"';
) . '"';
}
$htmlCode .= ' title="' . htmlspecialchars(
$this->getLanguageService()->sL(
'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references'
) . ' (' . $references . ')'
) . '">';
) . ' (' . $references . ')'
) . '">';
$htmlCode .= $references;
$htmlCode .= '</a>';
}
......
......@@ -2336,7 +2336,7 @@ This is a dump of the failures:
$email_body .= date(
$GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],
$row['tstamp']
) . ': ' . @sprintf($row['details'], (string)$theData[0], (string)$theData[1], (string)$theData[2]);
) . ': ' . @sprintf($row['details'], (string)$theData[0], (string)$theData[1], (string)$theData[2]);
$email_body .= LF;
}
$mail = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
......
......@@ -298,7 +298,7 @@ class FlexFormTools
$queryBuilder->expr()->eq(
'uid',
$queryBuilder->createNamedParameter($row[$parentFieldName], \PDO::PARAM_INT)
)
)
)
->execute();
$rowCount = $queryBuilder
......
......@@ -3341,7 +3341,7 @@ class DataHandler implements LoggerAwareInterface
$queryBuilder->expr()->eq(
'pid',
$queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT)
)
)
);
if ($isTableWorkspaceEnabled && (int)$this->BE_USER->workspace === 0) {
// Table is workspace enabled, user is in default ws -> add t3ver_wsid=0 restriction
......
......@@ -340,7 +340,7 @@ class SlugHelper
while (!$this->isUniqueInSite(
$newValue,
$state
) && $counter++ < 100
) && $counter++ < 100
) {
$newValue = $this->sanitize($rawValue . '-' . $counter);
}
......@@ -366,7 +366,7 @@ class SlugHelper
while (!$this->isUniqueInPid(
$newValue,
$state
) && $counter++ < 100
) && $counter++ < 100
) {
$newValue = $this->sanitize($rawValue . '-' . $counter);
}
......
......@@ -102,6 +102,6 @@ class PlatformInformation
throw new \RuntimeException(
'Unsupported Databaseplatform "' . get_class($platform) . '" detected in PlatformInformation',
1500958070
);
);
}
}
......@@ -368,7 +368,7 @@ class ExpressionBuilder
)
: $this->literal(
',' . $this->unquoteLiteral($value) . ','
)
)
);
return $comparison;
default:
......
......@@ -122,7 +122,7 @@ class ConnectionMigrator
$this->getUnusedTableUpdateSuggestions($schemaDiff),
$this->getDropTableUpdateSuggestions($schemaDiff),
$this->getDropFieldUpdateSuggestions($schemaDiff)
);
);
}
/**
......
......@@ -1704,7 +1704,7 @@ class PageRepository implements LoggerAwareInterface
// selected with full enable fields and if so, return 1:
$queryBuilder->where(
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
);
);
if ($bypassEnableFieldsCheck || $queryBuilder->execute()->fetchColumn()) {
// Means search was done, but no version found.
return 1;
......
......@@ -406,7 +406,7 @@ STYLESHEET;
$step['type'],
$step['function'],
$this->formatArgs($args)
) . '</div>';
) . '</div>';
}
if (isset($step['file']) && isset($step['line'])) {
......
......@@ -174,7 +174,7 @@ class ErrorHandler implements ErrorHandlerInterface, LoggerAwareInterface
$message,
$errorLevels[$errorLevel],
$flashMessageSeverity
);
);
/** @var \TYPO3\CMS\Core\Messaging\FlashMessageService $flashMessageService */
$flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
/** @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue $defaultFlashMessageQueue */
......
......@@ -823,7 +823,7 @@ class ResourceStorage implements ResourceStorageInterface
throw new Exception\InsufficientFolderAccessPermissionsException(
'You are not allowed to access the given folder: "' . $folder->getName() . '"',
1375955684
);
);
}
}
......
......@@ -147,7 +147,7 @@ class FileSearchQuery
$query->queryBuilder->add(
'select',
'COUNT(DISTINCT ' . $query->queryBuilder->quoteIdentifier(self::FILES_TABLE . '.identifier') . ')'
);
);
return $query;
}
......
......@@ -3020,7 +3020,7 @@ class GeneralUtility
} elseif (!(
static::isFirstPartOfStr($filename, Environment::getProjectPath())
|| static::isFirstPartOfStr($filename, Environment::getPublicPath())
)) {
)) {
// absolute, but set to blank if not allowed
$filename = '';
}
......@@ -3073,7 +3073,7 @@ class GeneralUtility
static::isFirstPartOfStr($path, Environment::getProjectPath())
|| static::isFirstPartOfStr($path, Environment::getPublicPath())
|| $lockRootPath && static::isFirstPartOfStr($path, $lockRootPath)
);
);
}
/**
......
......@@ -121,7 +121,7 @@ class RegistryTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTes
[
'entry_value' => Connection::PARAM_LOB,
]
);
);
(new Registry())->remove('ns1', 'k1');
......
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