Commit 5fce8635 authored by Benni Mack's avatar Benni Mack
Browse files

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

Regular code cleanup about CGL standards.

Executed via
php-cs-fixer fix --config-file Build/.php_cs typo3

Resolves: #72490
Releases: master
Change-Id: I8bfa99339bd337a36a6d475553efa18033047368
Reviewed-on: https://review.typo3.org/45524


Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 9bc5fc32
......@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Backend\Form\FormDataProvider;
*/
use TYPO3\CMS\Backend\Form\FormDataProviderInterface;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......
......@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Backend\Http;
*/
use TYPO3\CMS\Core\Core\ApplicationInterface;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Entry point for the TYPO3 Backend (HTTP requests)
......@@ -105,5 +104,4 @@ class Application implements ApplicationInterface
{
define('TYPO3_MODE', 'BE');
}
}
......@@ -18,7 +18,6 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Lang\LanguageService;
/**
......
......@@ -23,7 +23,6 @@ use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Service\MarkerBasedTemplateService;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
/**
* TYPO3 Backend Template Class
......
......@@ -1018,4 +1018,4 @@ abstract class AbstractTreeView
{
return $GLOBALS['TYPO3_DB'];
}
}
\ No newline at end of file
}
......@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Backend\Utility;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider;
use TYPO3\CMS\Backend\Routing\UriBuilder;
use TYPO3\CMS\Backend\Template\DocumentTemplate;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
......@@ -22,7 +21,6 @@ use TYPO3\CMS\Core\Cache\CacheManager;
use TYPO3\CMS\Core\Database\DatabaseConnection;
use TYPO3\CMS\Core\Database\PreparedStatement;
use TYPO3\CMS\Core\Database\RelationHandler;
use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Messaging\FlashMessage;
......
......@@ -53,7 +53,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class CharsetConverter implements SingletonInterface
{
/**
* ASCII Value for chars with no equivalent.
*
......@@ -1729,7 +1728,8 @@ class CharsetConverter implements SingletonInterface
*
* @return array
*/
protected function getAllLanguageCodes() {
protected function getAllLanguageCodes()
{
// Get all languages where TYPO3 code is the same as the ISO code
$typo3LanguageCodes = array_keys($this->charSetArray);
$allLanguageCodes = array_combine($typo3LanguageCodes, $typo3LanguageCodes);
......
......@@ -741,7 +741,8 @@ class Bootstrap
* @throws \RuntimeException if the method was already called during a request
* @return Bootstrap
*/
public function setRequestType($requestType) {
public function setRequestType($requestType)
{
if (defined('TYPO3_REQUESTTYPE')) {
throw new \RuntimeException('TYPO3_REQUESTTYPE has already been set, cannot be called multiple times', 1450561878);
}
......
......@@ -423,4 +423,4 @@ class SystemEnvironmentBuilder
return false;
}
}
\ No newline at end of file
}
......@@ -5077,8 +5077,8 @@ class DataHandler
{
$uid = (int)$uid;
if ($uid === 0) {
$this->newlog2('Deleting all pages starting from the root-page is disabled.', 'pages', 0, 0, 2);
return;
$this->newlog2('Deleting all pages starting from the root-page is disabled.', 'pages', 0, 0, 2);
return;
}
// Getting list of pages to delete:
if ($force) {
......
......@@ -933,7 +933,7 @@ class RelationHandler
if (!empty($updateValues)) {
// Update tstamp if any foreign field value has changed
if (!empty($GLOBALS['TCA'][$table]['ctrl']['tstamp'])) {
$currentRow = BackendUtility::getRecord($table, $uid, implode(',', array_keys($updateValues)) , '', true);
$currentRow = BackendUtility::getRecord($table, $uid, implode(',', array_keys($updateValues)), '', true);
$needTstampUpdate = false;
if (empty($currentRow)) {
$needTstampUpdate = true;
......
......@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Core\Html;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Service\MarkerBasedTemplateService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......
......@@ -2428,7 +2428,6 @@ class IconRegistry implements \TYPO3\CMS\Core\SingletonInterface
)
),
// Sysnote
'sysnote-type-0' => array(
'provider' => FontawesomeIconProvider::class,
......
......@@ -37,7 +37,6 @@ namespace TYPO3\CMS\Core\Mail;
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @category Mail
* @package Mail
* @copyright 2001-2010 Richard Heyes
* @license http://opensource.org/licenses/bsd-license.php New BSD License
* @link http://pear.php.net/package/Mail/
......@@ -60,7 +59,6 @@ namespace TYPO3\CMS\Core\Mail;
* print_r($structure);
* @version $Revision: 294749 $
* @license BSD
* @package Mail
*/
class Rfc822AddressesParser
{
......
......@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Core\Utility;
use TYPO3\CMS\Core\Core\ApplicationContext;
use TYPO3\CMS\Core\Core\ClassLoadingInformation;
use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
use TYPO3\CMS\Core\Service\OpcodeCacheService;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Frontend\Page\PageRepository;
......
......@@ -15,7 +15,6 @@
* License:
* This code is public domain, you are free to do whatever you want with it,
* including adding it to your own project which can be under any license.
* @package RemoveXSS
*/
class RemoveXSS
{
......
......@@ -70,7 +70,7 @@ class FunctionalTestCaseBootstrapUtility
* @param string $testCaseClassName Name of test case class
* @return string
*/
static public function getInstanceIdentifier($testCaseClassName)
public static function getInstanceIdentifier($testCaseClassName)
{
// 7 characters of sha1 should be enough for a unique identification
return substr(sha1($testCaseClassName), 0, 7);
......@@ -82,7 +82,7 @@ class FunctionalTestCaseBootstrapUtility
* @param string $testCaseClassName Name of test case class
* @return string
*/
static public function getInstancePath($testCaseClassName)
public static function getInstancePath($testCaseClassName)
{
return ORIGINAL_ROOT . 'typo3temp/functional-' . static::getInstanceIdentifier($testCaseClassName);
}
......
......@@ -309,5 +309,4 @@ class MessageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
$this->setExpectedException('InvalidArgumentException');
$this->message->withAddedHeader($name, $value);
}
}
......@@ -21,7 +21,6 @@ use TYPO3\CMS\Core\Utility\StringUtility;
*/
class StringUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
{
/**
* Data provider for endsWithReturnsTrueForMatchingFirstPart
*
......
......@@ -14,8 +14,6 @@ namespace TYPO3\CMS\Extbase\DomainObject;
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* A generic Domain Object.
*
......
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