Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the PhpdocTypesOrderFixer again #4395

Merged
merged 3 commits into from Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion core-bundle/src/DataContainer/PaletteManipulator.php
Expand Up @@ -74,7 +74,7 @@ public function addField($name, $parent, string $position = self::POSITION_AFTER
'fields' => (array) $name,
'parents' => (array) $parent,
'position' => $position,
'fallback' => is_scalar($fallback) ? [$fallback] : $fallback,
'fallback' => \is_scalar($fallback) ? [$fallback] : $fallback,
'fallbackPosition' => $fallbackPosition,
];

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/EventListener/ClearSessionDataListener.php
Expand Up @@ -64,7 +64,7 @@ private function clearLegacyAttributeBags(string $key): void
private function clearLegacyFormData(): void
{
if (isset($_SESSION['FORM_DATA']['SUBMITTED_AT'])) {
$waitingTime = max(30, (int) ini_get('max_execution_time')) * 2;
$waitingTime = max(30, (int) \ini_get('max_execution_time')) * 2;

// Leave the data available for $waitingTime seconds (for redirect confirmation pages)
if ($_SESSION['FORM_DATA']['SUBMITTED_AT'] + $waitingTime > time()) {
Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/library/Contao/Config.php
Expand Up @@ -341,7 +341,7 @@ public function save()
}

// Recompile the APC file (thanks to Trenker)
if (\function_exists('apc_compile_file') && !ini_get('apc.stat'))
if (\function_exists('apc_compile_file') && !\ini_get('apc.stat'))
{
apc_compile_file($strDestination);
}
Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Resources/contao/library/Contao/Dbafs.php
Expand Up @@ -496,7 +496,7 @@ public static function syncFiles()
// Consider the suhosin.memory_limit (see #7035)
if (\extension_loaded('suhosin'))
{
if (($limit = ini_get('suhosin.memory_limit')) !== '')
if (($limit = \ini_get('suhosin.memory_limit')) !== '')
{
@ini_set('memory_limit', $limit);
}
Expand Down
Expand Up @@ -825,7 +825,7 @@ public static function resolveFlaggedUrl(&$url)
*/
public static function convertEncoding($str, $to, $from=null)
{
if ($str !== null && !is_scalar($str) && !(\is_object($str) && method_exists($str, '__toString')))
if ($str !== null && !\is_scalar($str) && !(\is_object($str) && method_exists($str, '__toString')))
{
trigger_deprecation('contao/core-bundle', '4.9', 'Passing a non-stringable argument to StringUtil::convertEncoding() has been deprecated an will no longer work in Contao 5.0.');

Expand Down
Expand Up @@ -423,7 +423,7 @@ protected function readCentralDirectory()
$strMbCharset = null;

// Set the mbstring encoding to ASCII (see #5842)
if (ini_get('mbstring.func_overload') > 0)
if (\ini_get('mbstring.func_overload') > 0)
{
$strMbCharset = mb_internal_encoding();

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Security/Voter/BackendAccessVoter.php
Expand Up @@ -100,7 +100,7 @@ protected function voteOnAttribute($attribute, $subject, TokenInterface $token):
*/
private function hasAccess($subject, string $field, BackendUser $user): bool
{
if (!is_scalar($subject) && !\is_array($subject)) {
if (!\is_scalar($subject) && !\is_array($subject)) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions installation-bundle/src/Controller/InstallationController.php
Expand Up @@ -248,7 +248,7 @@ private function purgeSymfonyCache(): void
opcache_reset();
}

if (\function_exists('apc_clear_cache') && !ini_get('apc.stat')) {
if (\function_exists('apc_clear_cache') && !\ini_get('apc.stat')) {
apc_clear_cache();
}
}
Expand Down Expand Up @@ -277,7 +277,7 @@ private function warmUpSymfonyCache(): void
opcache_reset();
}

if (\function_exists('apc_clear_cache') && !ini_get('apc.stat')) {
if (\function_exists('apc_clear_cache') && !\ini_get('apc.stat')) {
apc_clear_cache();
}
}
Expand Down
2 changes: 1 addition & 1 deletion manager-bundle/src/Command/ContaoSetupCommand.php
Expand Up @@ -67,7 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$php = [
$this->phpPath,
'-dmemory_limit='.ini_get('memory_limit'),
'-dmemory_limit='.\ini_get('memory_limit'),
];

if (OutputInterface::VERBOSITY_DEBUG === $output->getVerbosity()) {
Expand Down
34 changes: 17 additions & 17 deletions tools/ecs/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions tools/ecs/config/default.php
Expand Up @@ -3,7 +3,6 @@
declare(strict_types=1);

use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTypesOrderFixer;
use PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer;
use SlevomatCodingStandard\Sniffs\Variables\UnusedVariableSniff;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
Expand All @@ -23,8 +22,6 @@
'*/DependencyInjection/Configuration.php',
'*/Resources/config/*.php',
],
// TODO: enable this again once https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/6243 has been merged
PhpdocTypesOrderFixer::class => null,
UnusedVariableSniff::class => [
'core-bundle/tests/Session/Attribute/ArrayAttributeBagTest.php',
'manager-bundle/src/Resources/skeleton/*.php',
Expand Down
2 changes: 1 addition & 1 deletion tools/isolated-tests/src/RunTestsIsolatedCommand.php
Expand Up @@ -71,7 +71,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$php = [
$this->phpPath,
'-dmemory_limit='.ini_get('memory_limit'),
'-dmemory_limit='.\ini_get('memory_limit'),
];

if (OutputInterface::VERBOSITY_DEBUG === $output->getVerbosity()) {
Expand Down