apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -11,13 +11,9 @@ declare(strict_types=1);
namespace Chill\MainBundle\DependencyInjection;
use LogicException;
use RuntimeException;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use function count;
/**
* Description of ConfigConsistencyCompilerPass.
*/
@@ -42,17 +38,14 @@ class ConfigConsistencyCompilerPass implements CompilerPassInterface
}
}
if (count($fallbackLocales) === 0) {
throw new LogicException('the fallback locale are not defined. '
. 'The framework config should not allow this.');
if (0 === \count($fallbackLocales)) {
throw new \LogicException('the fallback locale are not defined. The framework config should not allow this.');
}
$diff = array_diff($fallbackLocales, $availableLanguages);
if (count($diff) > 0) {
throw new RuntimeException(sprintf('The chill_main.available_languages'
. ' parameter does not contains fallback locales. The languages %s'
. ' are missing.', implode(', ', $diff)));
if (\count($diff) > 0) {
throw new \RuntimeException(sprintf('The chill_main.available_languages parameter does not contains fallback locales. The languages %s are missing.', implode(', ', $diff)));
}
}
}