Showing 5 of 5 total issues
Function execute
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$container = $this->getContainer();
$locales = $container->getParameter('sleepness_uber_translation.supported_locales'); // prepare locales from parameters
$bundle = $container->get('kernel')->getBundle($input->getArgument('bundle')); // get bundle props
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function execute
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$container = $this->getContainer();
$bundleName = $input->getArgument('bundle');
$bundlePath = $container->get('kernel')->getBundle($bundleName)->getPath();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method execute
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$container = $this->getContainer();
$locales = $container->getParameter('sleepness_uber_translation.supported_locales'); // prepare locales from parameters
$bundle = $container->get('kernel')->getBundle($input->getArgument('bundle')); // get bundle props
Method execute
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$container = $this->getContainer();
$bundleName = $input->getArgument('bundle');
$bundlePath = $container->get('kernel')->getBundle($bundleName)->getPath();
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$uberMemcached = $this->getContainer()->get('uber.memcached'); // get uber memcached
$memcachedKeys = $uberMemcached->getAllKeys();
$output->writeln("\033[37;43m Translations from memcache: \033[0m");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"