Showing 332 of 2,142 total issues
Method configure
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function configure()
{
parent::configure();
$this
Method execute
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$instances = CommandHelper::getInstances();
$instancesInfo = CommandHelper::getInstancesInfo($instances);
Method execute
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$instances = CommandHelper::getInstances('upgrade');
$instancesInfo = CommandHelper::getInstancesInfo($instances);
$tiki_namespace = true;
File Svn.php
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @copyright (c) Copyright by authors of the Tiki Manager Project. All Rights Reserved.
* See copyright.txt for details and a complete list of authors.
* @licence Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See LICENSE for details.
Method execute
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$helper = $this->getHelper('question');
$instances = CommandHelper::getInstances('all', true);
Function execute
has a Cognitive Complexity of 26 (exceeds 5 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;
- 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 26 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$currentCwd = getcwd();
$instancesOpt = $input->getOption('instances');
$excludesOpt = $input->getOption('exclude');
- 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 applyPatch
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function applyPatch(Patch $patch, $options)
{
$access = $this->instance->getBestAccess('scripting');
$vcsType = $this->vcs_instance->getIdentifier();
$can_patch = $access->hasExecutable('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
Restore
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Restore extends Backup
{
const CLONE_PROCESS = 'clone';
const RESTORE_PROCESS = 'restore';
Method setupDatabase
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setupDatabase(Instance $instance, $reconfigure = false): Instance
{
try {
if (!$reconfigure && $this->testExistingDbConnection($instance)) {
return $instance;
Application
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Application
{
protected $instance;
/** @var TikiManagerStyle $io */
Method restore
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function restore($srcInstance, $archive, $clone = false, $checksumCheck = false, $direct = false, $onlyData = false, $onlyCode = false, $options = [], $skipSystemConfigurationCheck = false, $allowCommonParents = 0)
{
$restore = new Restore($this, $direct, $onlyData, $skipSystemConfigurationCheck, $allowCommonParents);
$restore->lock();
Function getSVNPath
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function getSVNPath()
{
$host = $this->getHost();
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
- 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
File Database.php
has 307 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.
Function copyDirectories
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function copyDirectories($targets, $backupDir)
{
$access = $this->getAccess();
$backupDir = $backupDir ?: $this->backupDir;
$result = [];
- 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 restore
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function restore($srcInstance, $archive, $clone = false, $checksumCheck = false, $direct = false, $onlyData = false, $onlyCode = false, $options = [], $skipSystemConfigurationCheck = false, $allowCommonParents = 0)
{
$restore = new Restore($this, $direct, $onlyData, $skipSystemConfigurationCheck, $allowCommonParents);
$restore->lock();
- 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 getAvailableBranches
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function getAvailableBranches()
{
$versions = [];
foreach (explode("\n", `git ls-remote --heads --tags --refs $this->repositoryUrl`) as $line) {
- 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 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$checksumCheck = $input->getOption('check') ?? false;
$instancesOption = $input->getOption('instances');
$instances = CommandHelper::getInstances('update');
SSH
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class SSH extends Access implements ShellPrompt
{
private $location;
private $env = [];
private $changeLocation = null;
Local
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Local extends Access implements ShellPrompt
{
private $location;
private $env = [];
private $hostlib = null;