Showing 2,255 of 2,255 total issues
Function execute
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$instances = CommandHelper::getInstances('no-tiki');
$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 isMissingPHPRequirements
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function isMissingPHPRequirements(Instance $instance, LoggerInterface $log): bool
{
return false;
$missingRequirements = [];
$access = $instance->getBestAccess();
- 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 getSVNPath
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
public function getSVNPath()
{
$host = $this->getHost();
$sets = [
- 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 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$helper = $this->getHelper('question');
$status = $input->getArgument('status');
$instancesOption = $input->getOption('instances');
Method execute
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$vcsOption = $input->getOption('vcs');
$vcsOption = $vcsOption ? strtoupper($vcsOption) : '';
if (! in_array($vcsOption, ['SVN', 'GIT', 'SRC'])) {
Backup
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class Backup
{
public const FULL_BACKUP = 'full';
public const PARTIAL_BACKUP = 'partial';
File Password.php
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
namespace TikiManager\Ext;
Method detectWebrootOS
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function detectWebrootOS()
{
$user = $this->detectUser();
$domain = parse_url($this->instance->weburl)['host'];
Function interact
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function interact(InputInterface $input, OutputInterface $output)
{
if (empty($input->getOption('instance'))) {
if (empty($this->instancesInfo)) {
return;
- 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 getHost
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getHost()
{
if (!(is_object($this->hostlib) && $this->hostlib instanceof LocalHost)) {
$this->hostlib = new LocalHost();
}
- 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 getBranch
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getBranch($refresh = false)
{
if ($this->branch && !$refresh) {
return $this->branch;
}
- 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 arrayFlatten
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function arrayFlatten($array, $objectFlat = false)
{
$result = [];
$visited = [];
$queue = [];
- 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 _mysqldump_table_data
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _mysqldump_table_data($table)
{
$sql = "select COUNT(*) from `$table`;";
$result = query($sql);
$num_rows = fetch_row($result);
File FTP.php
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// Copyright (c) 2016, Avan.Tech, et. al.
// Copyright (c) 2008, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
Method execute
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
if (empty($this->instancesInfo)) {
$output->writeln('<comment>No instances available to detect.</comment>');
return;
Method getBranch
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getBranch($refresh = false)
{
if ($this->branch && !$refresh) {
return $this->branch;
}
Method performUpdate
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function performUpdate(Instance $instance, $version = null, $options = [])
{
$current = $instance->getLatestVersion();
if (is_null($version)) {
Function execute
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$checksumCheck = $input->getOption('check') ?? false;
$instancesOption = $input->getOption('instances');
$instances = CommandHelper::getInstances('update');
- 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 17 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$vcsOption = $input->getOption('vcs');
$vcsOption = $vcsOption ? strtoupper($vcsOption) : '';
if (! in_array($vcsOption, ['SVN', 'GIT', 'SRC'])) {
- 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 interact
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function interact(InputInterface $input, OutputInterface $output)
{
$instanceId = $input->getOption('instance');
if (empty($instanceId)) {
$instances = CommandHelper::getInstances('tiki');