Showing 332 of 2,142 total issues
Method getHost
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getHost()
{
if (!(is_object($this->hostlib) && $this->hostlib instanceof LocalHost)) {
$this->hostlib = new LocalHost();
}
Method setupConnection
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setupConnection()
{
$config = $this->instance->getDatabaseConfig();
if ($config instanceof Database) {
Method setupApplication
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setupApplication(Instance $instance): Instance
{
if ($this->input->getOption('blank')) {
$instance->selection = 'blank : none';
return $instance;
Method prepareArgs
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function prepareArgs($args)
{
$result = [];
if (is_string($args)) {
$args = preg_split('/ */', $args);
Function interact
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function interact(InputInterface $input, OutputInterface $output)
{
$instances = CommandHelper::getInstances('tiki');
if (empty($input->getOption('patch'))) {
- 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 handleInstance
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
protected function handleInstance(Instance $instance, InputInterface $input): Instance\CronJob
{
$this->io->section($instance->name);
$instanceOS = $instance->getDiscovery()->detectOS();
- 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 rotxmm
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function rotxmm($login, $key)
{
$tmp = '';
$login = strtolower($login);
- 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 getAbsolutePath
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function getAbsolutePath($path)
{
$path = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, $path);
$parts = explode(DIRECTORY_SEPARATOR, $path);
$parts = array_filter($parts, 'strlen');
- 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 validate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function validate($version_id, $current_checksums = [])
{
$newFiles = [];
$modifiedFiles = [];
- 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 setIniFilesToExclude
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function setIniFilesToExclude($manifest)
{
$system_config_file_info = $this->readSystemIniConfigFileFromManifest($manifest);
- 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 interpolate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function interpolate(string $message, array $context): string
{
if (false === strpos($message, '{')) {
return $message;
}
- 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 rotx
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function rotx($login, $key)
{
$tmp = '';
$login = strtolower($login);
- 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 rotxpp
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static function rotxpp($login, $key)
{
$tmp = '';
$login = strtolower($login);
- 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 installComposerDependencies
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function installComposerDependencies()
{
$this->io->writeln('Installing composer dependencies... <fg=yellow>[may take a while]</>');
$instance = $this->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 runCommands
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function runCommands($commands, $output = false)
{
if (!is_array($commands)) {
$commands = func_get_args();
}
- 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
Avoid deeply nested control flow statements. Open
if ($i < $num_fields - 1) {
echo ',';
}
Function execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$updater = UpdateManager::getUpdater();
$updater->setLogger($this->logger);
- 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 clearFolderContents
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function clearFolderContents($dirs, LoggerInterface $logger)
{
if (!is_array($dirs)) {
$dirs = [$dirs];
}
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->printManagerInfo();
$this->io->title('New Instance Setup');
- 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 setupApplication
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function setupApplication(Instance $instance): Instance
{
if ($this->input->getOption('blank')) {
$instance->selection = 'blank : none';
return $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"