Commit 1ad185f3 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] CGL: Whitespace fixes

Apply a series of CGL whitespace fixes, mostly:
* No whitespace after type cast
* One space around '='

Change-Id: I6279e083a4bd867bfb70c9567c35b6bab1412043
Resolves: #83557
Releases: master
Reviewed-on: https://review.typo3.org/55352

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 453a8a2c
......@@ -693,7 +693,7 @@ class Clipboard
{
if ($this->getBackendUser()->jsConfirmation(JsConfirmation::COPY_MOVE_PASTE)) {
$labelKey = 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:mess.' . ($this->currentMode() === 'copy' ? 'copy' : 'move') . ($this->current === 'normal' ? '' : 'cb') . '_' . $type;
$msg = $this->getLanguageService()->sL($labelKey . ($columnLabel ? '_colPos': ''));
$msg = $this->getLanguageService()->sL($labelKey . ($columnLabel ? '_colPos' : ''));
if ($table === '_FILE') {
$thisRecTitle = basename($rec);
if ($this->current === 'normal') {
......
......@@ -39,7 +39,7 @@ class ContextMenu
* @param string $context
* @return array
*/
public function getItems(string $table, string $identifier, string $context=''): array
public function getItems(string $table, string $identifier, string $context = ''): array
{
$items = [];
$itemsProviders = $this->getAvailableProviders($table, $identifier, $context);
......
......@@ -86,7 +86,7 @@ class AbstractProvider implements ProviderInterface
* @param string $identifier
* @param string $context
*/
public function __construct(string $table, string $identifier, string $context='')
public function __construct(string $table, string $identifier, string $context = '')
{
$this->table = $table;
$this->identifier = $identifier;
......@@ -143,7 +143,7 @@ class AbstractProvider implements ProviderInterface
*/
protected function initDisabledItems()
{
$TSkey = $this->table . ($this->context ? '.' . $this->context : '');
$TSkey = $this->table . ($this->context ? '.' . $this->context : '');
$this->disabledItems = GeneralUtility::trimExplode(',', $this->backendUser->getTSConfigVal('options.contextMenu.table.' . $TSkey . '.disableItems'), true);
}
......
......@@ -493,7 +493,7 @@ class RecordProvider extends AbstractProvider
protected function isDeletionDisabledInTS(): bool
{
$disableDeleteTS = $this->backendUser->getTSConfig('options.disableDelete');
$disableDelete = (bool) trim($disableDeleteTS['properties'][$this->table] ?? (string)$disableDeleteTS['value']);
$disableDelete = (bool)trim($disableDeleteTS['properties'][$this->table] ?? (string)$disableDeleteTS['value']);
return $disableDelete;
}
......
......@@ -236,10 +236,10 @@ class ElementInformationController
$view->assignMultiple($this->getReferences());
$view->assignMultiple($this->getBackButton());
$view->assign('maxTitleLength', $this->getBackendUser()->uc['titleLen'] ?? 20);
$content .= $view->render();
$content .= $view->render();
}
} else {
$content .= $view->render();
$content .= $view->render();
}
$this->moduleTemplate->setContent($content);
......@@ -284,7 +284,7 @@ class ElementInformationController
// check if file is marked as missing
if ($this->fileObject->isMissing()) {
$preview['missingFile'] =$this->fileObject->getName();
$preview['missingFile'] = $this->fileObject->getName();
} else {
/** @var \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry $rendererRegistry */
$rendererRegistry = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::class);
......
......@@ -237,7 +237,7 @@ class MoveElementController
'EXT:backend/Resources/Private/Templates/ContentElement/MoveElement.html'
));
$view->assignMultiple($assigns);
$this->content .= $view->render();
$this->content .= $view->render();
}
// Setting up the buttons and markers for docheader
$this->getButtons();
......
......@@ -273,7 +273,7 @@ class NewContentElementController
// Onclick action for icon/title:
$aOnClick = 'document.getElementsByName(\'tempB\')[' . $cc . '].checked=1;' . $wizardOnClick . 'return false;';
} else {
$aOnClick = "document.editForm.defValues.value=unescape('" . rawurlencode($wInfo['params']) . "');goToalt_doc();" . (!$this->onClickEvent?"window.location.hash='#sel2';":'');
$aOnClick = "document.editForm.defValues.value=unescape('" . rawurlencode($wInfo['params']) . "');goToalt_doc();" . (!$this->onClickEvent ? "window.location.hash='#sel2';" : '');
}
$icon = $this->moduleTemplate->getIconFactory()->getIcon($wInfo['iconIdentifier'])->render();
......
......@@ -41,7 +41,7 @@ class FormSelectTreeAjaxController
// Prepare processedTca: Remove all column definitions except the one that contains
// our tree definition. This way only this field is calculated, everything else is ignored.
if (!isset($GLOBALS['TCA'][$tableName]) || !is_array($GLOBALS['TCA'][$tableName])) {
if (!isset($GLOBALS['TCA'][$tableName]) || !is_array($GLOBALS['TCA'][$tableName])) {
throw new \RuntimeException(
'TCA for table ' . $tableName . ' not found',
1479386729
......
......@@ -129,7 +129,7 @@ class SuggestWizardController
$replacement['###PAGE_TSCONFIG_ID###'] = (int)$fieldTSconfig['PAGE_TSCONFIG_ID'];
}
if (isset($fieldTSconfig['PAGE_TSCONFIG_IDLIST'])) {
$replacement['###PAGE_TSCONFIG_IDLIST###'] = implode(',', GeneralUtility::intExplode(',', $fieldTSconfig['PAGE_TSCONFIG_IDLIST']));
$replacement['###PAGE_TSCONFIG_IDLIST###'] = implode(',', GeneralUtility::intExplode(',', $fieldTSconfig['PAGE_TSCONFIG_IDLIST']));
}
if (isset($fieldTSconfig['PAGE_TSCONFIG_STR'])) {
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($fieldConfig['foreign_table']);
......
......@@ -72,7 +72,7 @@ class FlexFormContainerContainer extends AbstractContainer
$options = $this->data;
// Append container specific stuff to field prefix
$options['flexFormFormPrefix'] = $flexFormFormPrefix . '[' . $flexFormContainerIdentifier . '][' . $this->data['flexFormContainerName'] . '][el]';
$options['flexFormFormPrefix'] = $flexFormFormPrefix . '[' . $flexFormContainerIdentifier . '][' . $this->data['flexFormContainerName'] . '][el]';
$options['flexFormDataStructureArray'] = $flexFormDataStructureArray['el'];
$options['renderType'] = 'flexFormElementContainer';
$containerContentResult = $this->nodeFactory->create($options)->render();
......
......@@ -55,7 +55,7 @@ class FlexFormTabsContainer extends AbstractContainer
continue;
}
$tabCounter ++;
$tabCounter++;
// Assemble key for loading the correct CSH file
// @todo: what is that good for? That is for the title of single elements ... see FlexFormElementContainer!
......
......@@ -236,10 +236,10 @@ class InlineControlContainer extends AbstractContainer
$numberOfNotYetLocalizedChildren = 0;
foreach ($this->data['parameterArray']['fieldConf']['children'] as $child) {
if (!$child['isInlineDefaultLanguageRecordInLocalizedParentContext']) {
$numberOfFullLocalizedChildren ++;
$numberOfFullLocalizedChildren++;
}
if ($isLocalizedParent && $child['isInlineDefaultLanguageRecordInLocalizedParentContext']) {
$numberOfNotYetLocalizedChildren ++;
$numberOfNotYetLocalizedChildren++;
}
}
......@@ -316,7 +316,7 @@ class InlineControlContainer extends AbstractContainer
$html .= $fieldWizardHtml;
// Add the level links after all child records:
if ($config['appearance']['levelLinksPosition'] === 'both' || $config['appearance']['levelLinksPosition'] === 'bottom') {
if ($config['appearance']['levelLinksPosition'] === 'both' || $config['appearance']['levelLinksPosition'] === 'bottom') {
$html .= $levelLinks . $localizationLinks;
}
if (is_array($config['customControls'])) {
......
......@@ -117,7 +117,7 @@ class PaletteAndSingleContainer extends AbstractContainer
if ($fieldName === '--palette--') {
$paletteElementArray = $this->createPaletteContentArray($fieldConfiguration['paletteName']);
if (!empty($paletteElementArray)) {
$mainStructureCounter ++;
$mainStructureCounter++;
$paletteLabel = $fieldConfiguration['fieldLabel'];
if ($paletteLabel === null
&& !empty($this->data['processedTca']['palettes'][$fieldConfiguration['paletteName']]['label'])
......@@ -145,7 +145,7 @@ class PaletteAndSingleContainer extends AbstractContainer
$childResultArray = $this->nodeFactory->create($options)->render();
if (!empty($childResultArray['html'])) {
$mainStructureCounter ++;
$mainStructureCounter++;
$fieldLabel = '';
if (!empty($this->data['processedTca']['columns'][$fieldName]['label'])) {
$fieldLabel = $this->data['processedTca']['columns'][$fieldName]['label'];
......
......@@ -68,7 +68,7 @@ class TabsContainer extends AbstractContainer
$tabCounter = 0;
$tabElements = [];
foreach ($tabsArray as $tabWithLabelAndElements) {
$tabCounter ++;
$tabCounter++;
$elements = $tabWithLabelAndElements['elements'];
// Merge elements of this tab into a single list again and hand over to
......
......@@ -119,7 +119,7 @@ class CheckboxElement extends AbstractFormElement
$counter = 0;
foreach ($items as $itemKey => $itemDefinition) {
$label = $itemDefinition[0];
$elementHtml .= $this->renderSingleCheckboxElement($label, $counter, $formElementValue, $numberOfItems, $this->data['parameterArray'], $disabled);
$elementHtml .= $this->renderSingleCheckboxElement($label, $counter, $formElementValue, $numberOfItems, $this->data['parameterArray'], $disabled);
$counter = $counter + 1;
}
}
......
......@@ -58,7 +58,7 @@ class RadioElement extends AbstractFormElement
$html = [];
foreach ($this->data['parameterArray']['fieldConf']['config']['items'] as $itemNumber => $itemLabelAndValue) {
$label = $itemLabelAndValue[0];
$label = $itemLabelAndValue[0];
$value = $itemLabelAndValue[1];
$radioId = htmlspecialchars($this->data['parameterArray']['itemFormElID'] . '_' . $itemNumber);
$radioChecked = (string)$value === (string)$this->data['parameterArray']['itemFormElValue'] ? ' checked="checked"' : '';
......
......@@ -81,7 +81,7 @@ class AddRecord extends AbstractNode
$flexFormPath = str_replace('][', '/', substr($itemName, strlen($prefixOfFormElName) + 1, -1));
}
$urlParameters = [
$urlParameters = [
'P' => [
'params' => [
'table' => $table,
......
......@@ -41,7 +41,7 @@ class EditPopup extends AbstractNode
$itemName = $parameterArray['itemFormElName'];
$windowOpenParameters = $options['windowOpenParameters'] ?? 'height=800,width=600,status=0,menubar=0,scrollbars=1';
$urlParameters = [
$urlParameters = [
'P' => [
'table' => $this->data['tableName'],
'field' => $this->data['fieldName'],
......
......@@ -70,7 +70,7 @@ class ListModule extends AbstractNode
$pid = 0;
}
$urlParameters = [
$urlParameters = [
'P' => [
'params' => [
'table' => $table,
......
......@@ -52,7 +52,7 @@ class TableWizard extends AbstractNode
$flexFormPath = str_replace('][', '/', substr($itemName, strlen($prefixOfFormElName) + 1, -1));
}
$urlParameters = [
$urlParameters = [
'P' => [
'params' => [
'xmlOutput' => $xmlOutput,
......
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