Showing 332 of 2,142 total issues
Avoid too many return
statements within this method. Open
return CommandHelper::validateInstanceSelection($answer, $instances);
Avoid too many return
statements within this method. Open
return Password::asciiRotxpp($login, $key);
Avoid too many return
statements within this method. Open
return $this->branch = $branch;
Avoid too many return
statements within this method. Open
return $supported[0];
Avoid too many return
statements within this method. Open
return $files;
Avoid too many return
statements within this method. Open
return $this->branch = $entry;
Avoid too many return
statements within this method. Open
return Password::asciiRotxmm($login, $key);
Avoid too many return
statements within this method. Open
return '';
Avoid too many return
statements within this method. Open
return Password::rotx($login, $key);
Avoid too many return
statements within this method. Open
return Password::rotxmm($login, $key);
Avoid too many return
statements within this method. Open
return Password::rotxpp($login, $key);
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return Password::asciiRotx($login, $key);
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$instances = CommandHelper::getInstances('upgrade');
$instancesInfo = CommandHelper::getInstancesInfo($instances);
$tiki_namespace = true;
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$command_name = 'manager:instance:clone';
if (!$this->getApplication()->has($command_name)) {
$command_name = 'instance:clone';
- 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 getInstancesInfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getInstancesInfo(array $instances, bool $all_infos = false): ?array
{
$instancesInfo = null;
foreach ($instances as $instance) {
- 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 interact
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function interact(InputInterface $input, OutputInterface $output)
{
$instances = CommandHelper::getInstances('all', true);
$instancesInfo = CommandHelper::getInstancesInfo($instances);
- 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 getInstances
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getInstances($type = 'all', $excludeBlank = false)
{
$result = [];
switch ($type) {
- 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 removeFiles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function removeFiles($files, LoggerInterface $logger)
{
if (!is_array($files)) {
$files = [$files];
}
- 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 setArchiveSymlink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function setArchiveSymlink($symlinkPath = null, $archiveDir = null, $instance = null)
{
if (file_exists($symlinkPath)) { // if destination path exists, skip
return true;
}
- 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"