Commit 4dc2a5ce authored by Helmut Hummel's avatar Helmut Hummel Committed by Helmut Hummel
Browse files

[TASK] Apply CGL compatibility (PSR-1 and PSR-2)

Resolves: #76449
Releases: master
Change-Id: Ie0a7302d8a2f2d9aabfb7a351114f7e91e7d7ac8
Reviewed-on: https://review.typo3.org/48442

Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
Tested-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
parent 35ad45c0
......@@ -26,7 +26,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class ReferenceIndexUpdateCommand extends Command
{
/**
* Configure the command by defining the name, options and arguments
*/
......
<?php
declare(strict_types = 1);
declare (strict_types = 1);
namespace TYPO3\CMS\Backend\Controller;
/*
......@@ -818,7 +818,8 @@ class FormInlineAjaxController
* @param BackendUserAuthentication $backendUser
* @return bool
*/
protected function backendUserHasUcInlineView(BackendUserAuthentication $backendUser) {
protected function backendUserHasUcInlineView(BackendUserAuthentication $backendUser)
{
return !empty($backendUser->uc['inlineView']);
}
......@@ -993,11 +994,9 @@ class FormInlineAjaxController
*/
if (preg_match($pattern, $domObjectId, $match)) {
return array($match['flexformPath'], $match['tableName']);
}
return [];
}
}
......@@ -502,7 +502,7 @@ class InlineRecordContainer extends AbstractContainer
$hiddenField = $tcaTableCtrl['enablecolumns']['disabled'];
if ($enabledControls['hide'] && $permsEdit && $hiddenField && $tcaTableCols[$hiddenField] && (!$tcaTableCols[$hiddenField]['exclude'] || $backendUser->check('non_exclude_fields', $foreignTable . ':' . $hiddenField))) {
$onClick = 'return inline.enableDisableRecord(' . GeneralUtility::quoteJSvalue($nameObjectFtId) . ',' .
GeneralUtility::quoteJSvalue($hiddenField) .')';
GeneralUtility::quoteJSvalue($hiddenField) . ')';
$className = 't3js-' . $nameObjectFtId . '_disabled';
if ($rec[$hiddenField]) {
$title = htmlspecialchars($languageService->sL(('LLL:EXT:lang/locallang_mod_web_list.xlf:unHide' . ($isPagesTable ? 'Page' : ''))));
......
......@@ -14,9 +14,7 @@ namespace TYPO3\CMS\Backend\Form\Element;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Form\Element\AbstractFormElement;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Core\Utility\StringUtility;
......@@ -26,7 +24,6 @@ use TYPO3\CMS\Core\Utility\StringUtility;
*/
class InputColorPickerElement extends AbstractFormElement
{
/**
* This will render a single-line input form field, possibly with various control/validation features
*
......
......@@ -23,7 +23,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class BackendLayoutWizardElement extends AbstractFormElement
{
/**
* @var array
*/
......
......@@ -64,7 +64,6 @@ class FormInlineAjaxControllerTest extends UnitTestCase
$this->assertTrue($mayUploadFile);
}
/**
* @dataProvider splitDomObjectIdDataProviderForTableName
* @param string $dataStructure
......@@ -193,7 +192,6 @@ class FormInlineAjaxControllerTest extends UnitTestCase
$this->assertEmpty($result);
}
/**
* Unserialize uc inline view string for IRRE item
* @issue https://forge.typo3.org/issues/76561
......
......@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Belog\ViewHelpers;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Template\DocumentTemplate;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......
......@@ -14,8 +14,8 @@ namespace TYPO3\CMS\Beuser\Domain\Repository;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Repository for \TYPO3\CMS\Beuser\Domain\Model\BackendUser
......
......@@ -21,7 +21,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class VariableFrontend extends AbstractFrontend
{
/**
* Saves the value of a PHP variable in the cache. Note that the variable
* will be serialized if necessary.
......
......@@ -279,7 +279,8 @@ class PackageManager implements \TYPO3\CMS\Core\SingletonInterface
/**
* @param PackageInterface $package
*/
protected function registerActivePackage(PackageInterface $package) {
protected function registerActivePackage(PackageInterface $package)
{
// reset the active packages so they are rebuilt.
$this->activePackages = [];
$this->packageStatesConfiguration['packages'][$package->getPackageKey()] = ['packagePath' => str_replace($this->packagesBasePath, '', $package->getPackagePath())];
......
......@@ -2927,7 +2927,8 @@ class ResourceStorage implements ResourceStorageInterface
$processingFolder = $processingFolder->createFolder($folderName);
}
}
} catch (Exception\FolderDoesNotExistException $e) {}
} catch (Exception\FolderDoesNotExistException $e) {
}
return $processingFolder;
}
......
......@@ -52,7 +52,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
abstract class FunctionalTestCase extends BaseTestCase
{
/**
* An unique identifier for this test case. Location of the test
* instance and database name depend on this. Calculated early in setUp()
......
......@@ -25,7 +25,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class TimeTracker implements SingletonInterface
{
/**
* If set to true (see constructor) then then the timetracking is enabled
* @var bool
......
......@@ -23,12 +23,12 @@ class DebugUtility
/**
* @var bool
*/
static protected $plainTextOutput = true;
protected static $plainTextOutput = true;
/**
* @var bool
*/
static protected $ansiColorUsage = true;
protected static $ansiColorUsage = true;
/**
* Debug
......
......@@ -3207,7 +3207,6 @@ class GeneralUtility
return $bInfo;
}
/**
* Get the fully-qualified domain name of the host.
*
......@@ -3415,7 +3414,7 @@ class GeneralUtility
} elseif (strpos($testAbsoluteUrl, self::getIndpEnv('TYPO3_SITE_PATH')) === 0 && $decodedUrl[0] === '/') {
$sanitizedUrl = $url;
} elseif (empty($parsedUrl['scheme']) && strpos($testRelativeUrl, self::getIndpEnv('TYPO3_SITE_PATH')) === 0
&& $decodedUrl[0] !== '/' && strpbrk($decodedUrl, "*:|\"<>") === FALSE && strpos($decodedUrl, '\\\\') === false
&& $decodedUrl[0] !== '/' && strpbrk($decodedUrl, '*:|"<>') === false && strpos($decodedUrl, '\\\\') === false
) {
$sanitizedUrl = $url;
}
......
......@@ -1132,7 +1132,7 @@ return array(
'transport_sendmail_command' => '', // String: <em>only with transport=sendmail</em>: The command to call to send a mail locally.
'transport_mbox_file' => '', // String: <em>only with transport=mbox</em>: The file where to write the mails into. This file will be conforming the mbox format described in RFC 4155. It is a simple text file with a concatenation of all mails. Path must be absolute.
'defaultMailFromAddress' => '', // String: This default email address is used when no other "from" address is set for a TYPO3-generated email. You can specify an email address only (ex. info@example.org).
'defaultMailFromName' => '', // String: This default name is used when no other "from" name is set for a TYPO3-generated email.
'defaultMailFromName' => ''// String: This default name is used when no other "from" name is set for a TYPO3-generated email.
),
'HTTP' => array( // HTTP configuration to tune how TYPO3 behaves on HTTP requests made by TYPO3. Have a look at http://docs.guzzlephp.org/en/latest/request-options.html for some background information on those settings.
'allow_redirects' => array( // Mixed, set to false if you want to allow redirects, or use it as an array to add more values, see http://docs.guzzlephp.org/en/latest/request-options.html#allow-redirects for syntax
......
......@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\Extensionmanager;
* The TYPO3 project - inspiring people to share!
*/
use Facebook\WebDriver\Remote\DriverCommand;
use TYPO3\CMS\Core\Tests\Acceptance\Step\Backend\Admin;
/**
......@@ -77,7 +76,8 @@ class InstalledExtensionsCest
* @param Admin $I
* @return Admin
*/
public function checkIfInstallingAnExtensionWithBackendModuleAddsTheModuleToTheModuleMenu(Admin $I) {
public function checkIfInstallingAnExtensionWithBackendModuleAddsTheModuleToTheModuleMenu(Admin $I)
{
$I->switchToIFrame();
$I->canSeeElement('.typo3-module-menu-item');
$I->cantSeeElement('#system_BeuserTxBeuser');
......@@ -93,7 +93,6 @@ class InstalledExtensionsCest
$I->switchToIFrame();
$I->canSeeElement('#system_BeuserTxBeuser');
return $I;
}
......
......@@ -39,7 +39,7 @@ class CategoryTreeCest
$I->click('#web_list');
$I->switchToIFrame('content');
$I->waitForElement('#recordlist-sys_category');
$I->seeNumberOfElements('#recordlist-sys_category table > tbody > tr', [5,100]);
$I->seeNumberOfElements('#recordlist-sys_category table > tbody > tr', [5, 100]);
}
/**
......@@ -54,7 +54,7 @@ class CategoryTreeCest
// Select category with id 7
$I->click('#recordlist-sys_category tr[data-uid="7"] a[data-original-title="Edit record"]');
// Change title and level to root
$I->fillField('input[data-formengine-input-name="data[sys_category][7][title]"]','level-1-4');
$I->fillField('input[data-formengine-input-name="data[sys_category][7][title]"]', 'level-1-4');
$I->click('div[ext\:tree-node-id="7"]');
$I->click('div[ext\:tree-node-id="3"]');
$I->click('button[name="_savedok"]');
......@@ -62,7 +62,4 @@ class CategoryTreeCest
$I->waitForElement('.x-panel.x-tree');
$I->see('level-1-4', '.x-panel.x-tree');
}
}
......@@ -61,7 +61,7 @@ class ModuleMenuCest
*/
public function selectingAModuleDoesHighlightIt(Admin $I)
{
$I->seeNumberOfElements('#web .typo3-module-menu-item-link', [2,20]);
$I->seeNumberOfElements('#web .typo3-module-menu-item-link', [2, 20]);
$I->wantTo('check that the second element has no "active" class\'');
$I->cantSeeElement('#web #web_list.active');
......
......@@ -160,4 +160,4 @@ class BackendLoginCest
$I->click('Logout');
$I->waitForElement('#t3-username');
}
}
\ No newline at end of file
}
Markdown is supported
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