mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 20:13:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user