Commit ccc3ba5e authored by Benni Mack's avatar Benni Mack Committed by Andreas Fernandez
Browse files

[TASK] PSR-12: Add empty lines at the beginning of PHP files

This change adds two changes
        'blank_line_after_opening_tag' => true,
        'single_trait_insert_per_statement' => true,

to our PHP-CS Fixer configuration, adopting more rules related
to PSR-12.

Resolves: #91020
Releases: master
Change-Id: I180b2cbceb077911bddeb42d9f131e5b32244ed2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64158


Tested-by: default avatarJosef Glatz <josefglatz@gmail.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Reviewed-by: default avatarJosef Glatz <josefglatz@gmail.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent a6a7a5b9
...@@ -56,6 +56,7 @@ return PhpCsFixer\Config::create() ...@@ -56,6 +56,7 @@ return PhpCsFixer\Config::create()
'@DoctrineAnnotation' => true, '@DoctrineAnnotation' => true,
'@PSR2' => true, '@PSR2' => true,
'array_syntax' => ['syntax' => 'short'], 'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'cast_spaces' => ['space' => 'none'], 'cast_spaces' => ['space' => 'none'],
'concat_space' => ['spacing' => 'one'], 'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'none'], 'declare_equal_normalize' => ['space' => 'none'],
...@@ -94,6 +95,7 @@ return PhpCsFixer\Config::create() ...@@ -94,6 +95,7 @@ return PhpCsFixer\Config::create()
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'return_type_declaration' => ['space_before' => 'none'], 'return_type_declaration' => ['space_before' => 'none'],
'single_quote' => true, 'single_quote' => true,
'single_trait_insert_per_statement' => true,
'whitespace_after_comma_in_array' => true, 'whitespace_after_comma_in_array' => true,
]) ])
->setFinder($finder); ->setFinder($finder);
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Composer\Scripts; namespace TYPO3\CMS\Composer\Scripts;
......
<?php <?php
namespace TYPO3\CMS\About\Controller; namespace TYPO3\CMS\About\Controller;
/* /*
......
<?php <?php
$EM_CONF[$_EXTKEY] = [ $EM_CONF[$_EXTKEY] = [
'title' => 'Help>About', 'title' => 'Help>About',
'description' => 'Shows info about TYPO3, installed extensions and a separate module for available modules.', 'description' => 'Shows info about TYPO3, installed extensions and a separate module for available modules.',
......
<?php <?php
defined('TYPO3_MODE') or die(); defined('TYPO3_MODE') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Controller; namespace TYPO3\CMS\Adminpanel\Controller;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Controller; namespace TYPO3\CMS\Adminpanel\Controller;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Exceptions; namespace TYPO3\CMS\Adminpanel\Exceptions;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Log; namespace TYPO3\CMS\Adminpanel\Log;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Log; namespace TYPO3\CMS\Adminpanel\Log;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Middleware; namespace TYPO3\CMS\Adminpanel\Middleware;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Middleware; namespace TYPO3\CMS\Adminpanel\Middleware;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Middleware; namespace TYPO3\CMS\Adminpanel\Middleware;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\Middleware; namespace TYPO3\CMS\Adminpanel\Middleware;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\ModuleApi; namespace TYPO3\CMS\Adminpanel\ModuleApi;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\ModuleApi; namespace TYPO3\CMS\Adminpanel\ModuleApi;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\ModuleApi; namespace TYPO3\CMS\Adminpanel\ModuleApi;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\ModuleApi; namespace TYPO3\CMS\Adminpanel\ModuleApi;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\ModuleApi; namespace TYPO3\CMS\Adminpanel\ModuleApi;
......
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace TYPO3\CMS\Adminpanel\ModuleApi; namespace TYPO3\CMS\Adminpanel\ModuleApi;
......
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