Commit 3e66cdd4 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Andreas Fernandez
Browse files

[TASK] Apply rector set php56

    php bin/rector process

Releases: master
Resolves: #89807
Change-Id: I667199693dc519d0353d8e10b40d86faf1cf946a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62448

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarJan Stockfisch <typo3@jan-stockfisch.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarJan Stockfisch <typo3@jan-stockfisch.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent b959c51a
......@@ -9,8 +9,7 @@ parameters:
- 'typo3/sysext/*/Configuration/'
- 'typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/Fixtures/ConditionMatcherUserFuncs.php'
- 'typo3/sysext/*/Tests/Unit/Acceptance'
- 'typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/ClassNameMatcherFixture.php'
- 'typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/PropertyExistsStaticMatcherFixture.php'
- 'typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/'
- 'ClassAliasMap.php'
- 'class.ext_update.php'
exclude_rectors:
......@@ -19,3 +18,4 @@ parameters:
- 'php53'
- 'php54'
- 'php55'
- 'php56'
......@@ -65,6 +65,9 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface
*/
public function getDataToStore(ServerRequestInterface $request): ModuleData
{
$data = [
'cacheEnabled' => true
];
if ($this->isNoCacheEnabled()) {
$data = [
'orderedProviders' => [],
......@@ -85,8 +88,6 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface
}
}
}
} else {
$data['cacheEnabled'] = true;
}
return new ModuleData($data);
}
......
......@@ -217,6 +217,7 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface,
*/
protected function parseDate(string $simulateDate): ?int
{
$simTime = null;
$date = false;
try {
$date = new \DateTime($simulateDate);
......
......@@ -601,6 +601,7 @@ class ShortcutRepository
*/
protected function getShortcutIcon(array $row, array $shortcut): string
{
$selectFields = [];
switch ($row['module_name']) {
case 'xMOD_alt_doc.php':
$table = $shortcut['table'];
......
......@@ -220,6 +220,7 @@ class ElementHistoryController
*/
protected function prepareDisplaySettings(ServerRequestInterface $request)
{
$selector = [];
// Get current selection from UC, merge data, write it back to UC
$currentSelection = is_array($this->getBackendUser()->uc['moduleData']['history'])
? $this->getBackendUser()->uc['moduleData']['history']
......
......@@ -467,6 +467,8 @@ class NewContentElementController
*/
protected function removeInvalidWizardItems(array &$wizardItems): void
{
$removeItems = [];
$keepItems = [];
// Get TCEFORM from TSconfig of current page
$row = ['pid' => $this->id];
$TCEFORM_TSconfig = BackendUtility::getTCEFORM_TSconfig('tt_content', $row);
......
......@@ -2403,6 +2403,7 @@ class EditDocumentController
*/
protected function closeDocument($mode, ServerRequestInterface $request): ?ResponseInterface
{
$setupArr = [];
$mode = (int)$mode;
// If current document is found in docHandler,
// then unset it, possibly unset it ALL and finally, write it to the session data
......
......@@ -132,6 +132,7 @@ class LinkBrowserController extends AbstractLinkBrowserController
*/
protected function getBodyTagAttributes()
{
$formEngineParameters = [];
$parameters = parent::getBodyTagAttributes();
$formEngineParameters['fieldChangeFunc'] = $this->parameters['fieldChangeFunc'];
......
......@@ -328,6 +328,7 @@ class NewRecordController
*/
protected function getButtons(): void
{
$buttons = [];
$lang = $this->getLanguageService();
$buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
// Regular new element:
......
......@@ -1026,6 +1026,7 @@ class PageLayoutController
*/
protected function getNumberOfHiddenElements(array $contentConfig = []): int
{
$andWhere = [];
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
$queryBuilder->getRestrictions()
->removeAll()
......
......@@ -596,6 +596,7 @@ class InlineControlContainer extends AbstractContainer
*/
protected function renderPossibleRecordsSelectorTypeSelect(array $config, array $uniqueIds)
{
$onChange = '';
$possibleRecords = $config['selectorOrUniquePossibleRecords'];
$nameObject = $this->inlineStackProcessor->getCurrentStructureDomObjectIdPrefix($this->data['inlineFirstPid']);
// Create option tags:
......
......@@ -328,6 +328,7 @@ class ImageManipulationElement extends AbstractFormElement
*/
protected function getWizardPayload(array $cropVariants, File $image): array
{
$uriArguments = [];
$arguments = [
'cropVariants' => $cropVariants,
'image' => $image->getUid(),
......
......@@ -65,6 +65,7 @@ class InputColorPickerElement extends AbstractFormElement
*/
public function render()
{
$evalData = '';
$languageService = $this->getLanguageService();
$table = $this->data['tableName'];
......@@ -115,6 +116,7 @@ class InputColorPickerElement extends AbstractFormElement
$itemValue = $evalObj->deevaluateFieldValue($_params);
}
if (method_exists($evalObj, 'returnFieldJS')) {
// @todo: variable $evalData must be replaced with $func
$resultArray['additionalJavaScriptPost'][] = 'TBE_EDITOR.customEvalFunctions[' . GeneralUtility::quoteJSvalue($evalData) . '] = function(value) {' . $evalObj->returnFieldJS() . '};';
}
}
......
......@@ -91,6 +91,7 @@ class SelectMultipleSideBySideElement extends AbstractFormElement
*/
public function render()
{
$filterTextfield = [];
$languageService = $this->getLanguageService();
$resultArray = $this->initializeResultArray();
......
......@@ -31,6 +31,7 @@ class SelectIcons extends AbstractNode
*/
public function render(): array
{
$selectIcons = [];
$result = $this->initializeResultArray();
$parameterArray = $this->data['parameterArray'];
......
......@@ -466,6 +466,8 @@ abstract class AbstractItemProvider
*/
protected function addItemsFromForeignTable(array $result, $fieldName, array $items)
{
$databaseError = null;
$queryResult = null;
// Guard
if (empty($result['processedTca']['columns'][$fieldName]['config']['foreign_table'])
|| !is_string($result['processedTca']['columns'][$fieldName]['config']['foreign_table'])
......@@ -1303,9 +1305,6 @@ abstract class AbstractItemProvider
$languageService = $this->getLanguageService();
foreach ($itemArray as $key => $item) {
if (!isset($dynamicItems[$key])) {
$staticValues[$item[1]] = $item;
}
if (isset($result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.']['altLabels.'][$item[1]])
&& !empty($result['pageTsConfig']['TCEFORM.'][$table . '.'][$fieldName . '.']['altLabels.'][$item[1]])
) {
......
......@@ -288,7 +288,7 @@ class TcaRecordTitle implements FormDataProviderInterface
} else {
$labelParts = [];
foreach ($fieldConfig['items'] as $key => $val) {
if ($value & pow(2, $key)) {
if ($value & 2 ** $key) {
$labelParts[] = $val[0];
}
}
......
......@@ -190,8 +190,8 @@ class TcaTypesShowitem implements FormDataProviderInterface
$bitKey = (int)$bitKey;
$isNegative = (bool)($bitKey < 0);
$bit = abs($bitKey);
if (!$isNegative && ($bitmaskValue & pow(2, $bit))
|| $isNegative && !($bitmaskValue & pow(2, $bit))
if (!$isNegative && ($bitmaskValue & 2 ** $bit)
|| $isNegative && !($bitmaskValue & 2 ** $bit)
) {
$removeListArray = array_merge($removeListArray, GeneralUtility::trimExplode(',', $excludeList, true));
}
......
......@@ -493,6 +493,7 @@ class RecordHistory
*/
protected function hasPageAccess($table, $uid): bool
{
$pageRecord = null;
$uid = (int)$uid;
if ($table === 'pages') {
......
......@@ -170,6 +170,7 @@ class PageTsBackendLayoutDataProvider implements DataProviderInterface
*/
protected function generateBackendLayoutFromTsConfig($identifier, $data)
{
$backendLayout = [];
if (!empty($data['config.']['backend_layout.']) && is_array($data['config.']['backend_layout.'])) {
$backendLayout['uid'] = substr($identifier, 0, -1);
$backendLayout['title'] = $data['title'] ?: $backendLayout['uid'];
......
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