Commit 453a8a2c authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] CGL: Fix a series of minor indentation issues

Apply various minor indentation CGL fixes, as suggested
by scrutinizer-ci, mostly related to places where indentation
is done with 1 or 3 spaces instead of 4.

Change-Id: Ie3345c7391c0735e8074fd633dd9523616a6b82d
Resolves: #83555
Releases: master
Reviewed-on: https://review.typo3.org/55350

Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
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 7b94e2a6
......@@ -1626,8 +1626,8 @@ class EditDocumentController
}
if ($addOption) {
$menuItem = $languageMenu->makeMenuItem()
->setTitle($lang['title'] . $newTranslation)
->setHref($href);
->setTitle($lang['title'] . $newTranslation)
->setHref($href);
if ((int)$lang['uid'] === $currentLanguage) {
$menuItem->setActive(true);
}
......
......@@ -242,9 +242,9 @@ class CreateFolderController
// Back
if ($this->returnUrl) {
$backButton = $buttonBar->makeLinkButton()
->setHref($this->returnUrl)
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.goBack'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-view-go-back', Icon::SIZE_SMALL));
->setHref($this->returnUrl)
->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.goBack'))
->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-view-go-back', Icon::SIZE_SMALL));
$buttonBar->addButton($backButton);
}
......
......@@ -499,7 +499,7 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController
'inlineParentTableName' => $parentData['tableName'],
'inlineParentFieldName' => $parentFieldName,
// values of the top most parent element set on first level and not overridden on following levels
// values of the top most parent element set on first level and not overridden on following levels
'inlineTopMostParentUid' => $inlineTopMostParent['uid'],
'inlineTopMostParentTableName' => $inlineTopMostParent['table'],
'inlineTopMostParentFieldName' => $inlineTopMostParent['field'],
......
......@@ -726,7 +726,7 @@ class PageLayoutController
' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '
function deleteRecord(table,id,url) { //
window.location.href = ' . GeneralUtility::quoteJSvalue((string)$uriBuilder->buildUriFromRoute('tce_db') . '&cmd[')
. ' + table + "][" + id + "][delete]=1&redirect=" + encodeURIComponent(url);
. ' + table + "][" + id + "][delete]=1&redirect=" + encodeURIComponent(url);
return false;
}
');
......
......@@ -55,7 +55,7 @@ class FileUpload extends AbstractNode
// If maxItems = 1 then automatically replace the current item file selector
$resultArray['additionalJavaScriptPost'][] =
'TBE_EDITOR.clearBeforeSettingFormValueFromBrowseWin[' . GeneralUtility::quoteJSvalue($itemName) . '] = {'
. 'itemFormElID_file: ' . GeneralUtility::quoteJSvalue($uploadFieldId)
. 'itemFormElID_file: ' . GeneralUtility::quoteJSvalue($uploadFieldId)
. '}';
}
......
......@@ -927,10 +927,10 @@ function jumpToUrl(URL) {
}
/**
* Retrieves configured favicon for backend (with fallback)
*
* @return string
*/
* Retrieves configured favicon for backend (with fallback)
*
* @return string
*/
protected function getBackendFavicon()
{
$backendFavicon = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('backend', 'backendFavicon');
......
......@@ -740,7 +740,6 @@ abstract class AbstractTreeView
* @param int $uid item id for which to select subitems (parent id)
* @param int $depth Max depth (recursivity limit)
* @param string $depthData HTML-code prefix for recursive calls.
* @return int The count of items on the level
*/
public function getTree($uid, $depth = 999, $depthData = '')
......
......@@ -126,16 +126,16 @@ class PageTreeView extends AbstractTreeView
$lang = $this->getLanguageService();
if ($this->ext_showNavTitle && isset($row['nav_title']) && trim($row['nav_title']) !== '') {
$title = '<span title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:title')) . ' '
. htmlspecialchars(trim($row['title'])) . '">'
. htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['nav_title'], $titleLen))
. '</span>';
. htmlspecialchars(trim($row['title'])) . '">'
. htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['nav_title'], $titleLen))
. '</span>';
} else {
$title = htmlspecialchars(GeneralUtility::fixed_lgd_cs($row['title'], $titleLen));
if (isset($row['nav_title']) && trim($row['nav_title']) !== '') {
$title = '<span title="'
. htmlspecialchars($lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.nav_title'))
. ' ' . htmlspecialchars(trim($row['nav_title'])) . '">' . $title
. '</span>';
. htmlspecialchars($lang->sL('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.nav_title'))
. ' ' . htmlspecialchars(trim($row['nav_title'])) . '">' . $title
. '</span>';
}
$title = trim($row['title']) === ''
? '<em>[' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.no_title')) . ']</em>'
......
......@@ -1942,7 +1942,7 @@ class PageLayoutView implements LoggerAwareInterface
$params = '&cmd[tt_content][' . $row['uid'] . '][delete]=1';
$confirm = $this->getLanguageService()->getLL('deleteWarning')
. BackendUtility::translationCount('tt_content', $row['uid'], (' '
. $this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.translationsOfRecord')));
. $this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.translationsOfRecord')));
$out .= '<a class="btn btn-default t3js-modal-trigger" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction($params)) . '"'
. ' data-severity="warning"'
. ' data-title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title')) . '"'
......
......@@ -199,9 +199,9 @@ class PermissionAjaxController
$options = '<option value="0"></option>' . $options;
$selector = '<select name="new_page_owner" id="new_page_owner">' . $options . '</select>';
$saveButton = '<a class="saveowner btn btn-default" data-page="' . $page . '" data-owner="' . $ownerUid
. '" data-element-id="' . $elementId . '" title="Change owner">'
. $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render()
. '</a>';
. '" data-element-id="' . $elementId . '" title="Change owner">'
. $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render()
. '</a>';
$cancelButton = '<a class="restoreowner btn btn-default" data-page="' . $page . '" data-owner="' . $ownerUid
. '" data-element-id="' . $elementId . '"'
. (!empty($username) ? ' data-username="' . htmlspecialchars($username) . '"' : '')
......@@ -256,9 +256,9 @@ class PermissionAjaxController
$options = '<option value="0"></option>' . $options;
$selector = '<select name="new_page_group" id="new_page_group">' . $options . '</select>';
$saveButton = '<a class="savegroup btn btn-default" data-page="' . $page . '" data-group-id="' . $groupUid
. '" data-element-id="' . $elementId . '" title="Change group">'
. $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render()
. '</a>';
. '" data-element-id="' . $elementId . '" title="Change group">'
. $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render()
. '</a>';
$cancelButton = '<a class="restoregroup btn btn-default" data-page="' . $page . '" data-group-id="' . $groupUid
. '" data-element-id="' . $elementId . '"'
. (!empty($groupname) ? ' data-groupname="' . htmlspecialchars($groupname) . '"' : '')
......@@ -286,12 +286,12 @@ class PermissionAjaxController
$page = (int)$page;
if ($editLockState === 1) {
$ret = '<span id="el_' . $page . '"><a class="editlock btn btn-default" data-page="' . $page
. '" data-lockstate="1" title="The page and all content is locked for editing by all non-Admin users.">'
. $this->iconFactory->getIcon('actions-lock', Icon::SIZE_SMALL)->render() . '</a></span>';
. '" data-lockstate="1" title="The page and all content is locked for editing by all non-Admin users.">'
. $this->iconFactory->getIcon('actions-lock', Icon::SIZE_SMALL)->render() . '</a></span>';
} else {
$ret = '<span id="el_' . $page . '"><a class="editlock btn btn-default" data-page="' . $page .
'" data-lockstate="0" title="Enable the &raquo;Admin-only&laquo; edit lock for this page">'
. $this->iconFactory->getIcon('actions-unlock', Icon::SIZE_SMALL)->render() . '</a></span>';
'" data-lockstate="0" title="Enable the &raquo;Admin-only&laquo; edit lock for this page">'
. $this->iconFactory->getIcon('actions-unlock', Icon::SIZE_SMALL)->render() . '</a></span>';
}
return $ret;
}
......
......@@ -1984,13 +1984,13 @@ class BackendUserAuthentication extends AbstractUserAuthentication
}
/**
* Returns a \TYPO3\CMS\Core\Resource\Folder object that could be used for uploading
* temporary files in user context. The folder _temp_ below the default upload folder
* of the user is used.
*
* @return \TYPO3\CMS\Core\Resource\Folder|null
* @see \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getDefaultUploadFolder();
*/
* Returns a \TYPO3\CMS\Core\Resource\Folder object that could be used for uploading
* temporary files in user context. The folder _temp_ below the default upload folder
* of the user is used.
*
* @return \TYPO3\CMS\Core\Resource\Folder|null
* @see \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getDefaultUploadFolder();
*/
public function getDefaultUploadTemporaryFolder()
{
$defaultTemporaryFolder = null;
......
......@@ -4819,7 +4819,7 @@ class DataHandler implements LoggerAwareInterface
($fCfg['l10n_mode'] === 'exclude')
&& $fN != $GLOBALS['TCA'][$table]['ctrl']['languageField']
&& $fN != $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']
) {
) {
// Otherwise, do not copy field (unless it is the language field or
// pointer to the original language)
$excludeFields[] = $fN;
......
......@@ -1335,8 +1335,8 @@ class ReferenceIndex implements LoggerAwareInterface
} catch (DBALException $e) {
// Table exists in TCA but does not exist in the database
$msg = 'Table "' .
$tableName .
'" exists in TCA but does not exist in the database. You should run the Database Analyzer in the Install Tool to fix this.';
$tableName .
'" exists in TCA but does not exist in the database. You should run the Database Analyzer in the Install Tool to fix this.';
$this->logger->error($msg, ['exception' => $e]);
continue;
}
......
......@@ -2481,10 +2481,10 @@ class GraphicalFunctions
$this->imageMagickExec($mask, $theMask, '-colorspace GRAY +matte');
$parameters = '-compose over +matte '
. CommandUtility::escapeShellArgument($input) . ' '
. CommandUtility::escapeShellArgument($overlay) . ' '
. CommandUtility::escapeShellArgument($theMask) . ' '
. CommandUtility::escapeShellArgument($output);
. CommandUtility::escapeShellArgument($input) . ' '
. CommandUtility::escapeShellArgument($overlay) . ' '
. CommandUtility::escapeShellArgument($theMask) . ' '
. CommandUtility::escapeShellArgument($output);
$cmd = CommandUtility::imageMagickCommand('combine', $parameters);
$this->IM_commands[] = [$output, $cmd];
$ret = CommandUtility::exec($cmd);
......
......@@ -2248,27 +2248,27 @@ class TcaMigration
if ($control === 'browser') {
$fieldConfig['config']['fieldControl']['elementBrowser']['disabled'] = true;
$this->messages[] = 'The \'type\' = \'group\' option \'disable_controls\' = \'browser\''
. ' from TCA ' . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\']'
. ' and has been migrated to'
. $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\'][\'fieldControl\'][\'elementBrowser\'][\'disabled\'] = true';
. ' from TCA ' . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\']'
. ' and has been migrated to'
. $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\'][\'fieldControl\'][\'elementBrowser\'][\'disabled\'] = true';
} elseif ($control === 'delete') {
$this->messages[] = 'The \'type\' = \'group\' option \'disable_controls\' = \'delete\''
. ' from TCA ' . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\']'
. ' and has been migrated to'
. $table . '[\'columns\'][\' . $fieldName . \'][\'config\'][\'hideDeleteIcon\'] = true';
. ' from TCA ' . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\']'
. ' and has been migrated to'
. $table . '[\'columns\'][\' . $fieldName . \'][\'config\'][\'hideDeleteIcon\'] = true';
$fieldConfig['config']['hideDeleteIcon'] = true;
} elseif ($control === 'allowedTables') {
$fieldConfig['config']['fieldWizard']['tableList']['disabled'] = true;
$this->messages[] = 'The \'type\' = \'group\' option \'disable_controls\' = \'allowedTables\''
. ' from TCA ' . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\']'
. ' and has been migrated to'
. $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\'][\'fieldWizard\'][\'tableList\'][\'disabled\'] = true';
. ' from TCA ' . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\']'
. ' and has been migrated to'
. $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\'][\'fieldWizard\'][\'tableList\'][\'disabled\'] = true';
} elseif ($control === 'upload') {
$fieldConfig['config']['fieldWizard']['fileUpload']['disabled'] = true;
$this->messages[] = 'The \'type\' = \'group\' option \'disable_controls\' = \'upload\''
. ' from TCA ' . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\']'
. ' and has been migrated to'
. $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\'][\'fieldWizard\'][\'fileUpload\'][\'disabled\'] = true';
. ' from TCA ' . $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\']'
. ' and has been migrated to'
. $table . '[\'columns\'][\'' . $fieldName . '\'][\'config\'][\'fieldWizard\'][\'fileUpload\'][\'disabled\'] = true';
}
}
unset($fieldConfig['config']['disable_controls']);
......
......@@ -1204,7 +1204,7 @@ class ResourceStorage implements ResourceStorageInterface
/**
* Creates a (cryptographic) hash for a fileIdentifier.
*
* @param string $fileIdentifier
* @param string $hash
*
......
......@@ -171,11 +171,9 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
if (!empty($frameworkConfiguration['persistence']['storagePid'])) {
if (is_array($frameworkConfiguration['persistence']['storagePid'])) {
/**
* We simulate the frontend to enable the use of cObjects in
* stdWrap. Than we convert the configuration to normal TypoScript
* and apply the stdWrap to the storagePid
*/
// We simulate the frontend to enable the use of cObjects in
// stdWrap. Than we convert the configuration to normal TypoScript
// and apply the stdWrap to the storagePid
if (!$this->environmentService->isEnvironmentInFrontendMode()) {
\TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::simulateFrontendEnvironment($this->getContentObject());
}
......
......@@ -22,11 +22,11 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
class FileReference extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder
{
/**
* Uid of the referenced sys_file. Needed for extbase to serialize the
* reference correctly.
*
* @var int
*/
* Uid of the referenced sys_file. Needed for extbase to serialize the
* reference correctly.
*
* @var int
*/
protected $uidLocal;
/**
......
......@@ -474,7 +474,7 @@ class Typo3DbBackend implements BackendInterface, SingletonInterface
$tableName = $source['alias'] ?: $source['table'];
$fieldName = $queryBuilder->quoteIdentifier('uid');
$queryBuilder->resetQueryPart('groupBy')
->selectLiteral(sprintf('COUNT(DISTINCT %s.%s)', $tableName, $fieldName));
->selectLiteral(sprintf('COUNT(DISTINCT %s.%s)', $tableName, $fieldName));
} else {
$queryBuilder->count('*');
}
......
......@@ -241,7 +241,7 @@ class DependencyUtility implements \TYPO3\CMS\Core\SingletonInterface
if (!($dependency->getLowestVersion() === '') && version_compare(PHP_VERSION, $dependency->getLowestVersion()) === -1) {
throw new Exception\UnresolvedPhpDependencyException(
'Your PHP version is lower than necessary. You need at least PHP version ' . $dependency->getLowestVersion(),
1377977857
1377977857
);
}
if (!($dependency->getHighestVersion() === '') && version_compare($dependency->getHighestVersion(), PHP_VERSION) === -1) {
......
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