Showing 2,255 of 2,255 total issues
Method detectPHPLinux
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function detectPHPLinux($options = [], $searchOrder = null)
{
if ($searchOrder === null) {
$searchOrder = [
['command', ['-v', 'php']],
Method info
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function info($targetFolder, $raw = false)
{
$cmd = "info $targetFolder";
if (! $raw) {
$cmd .= ' --xml';
Method info
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function info($path, $args = [])
{
if (empty($args)) {
$args = $this->getDefaultArgs('info');
}
Method createArchive
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createArchive($archiveDir = null)
{
$archiveDir = $archiveDir ?: $this->archiveDir;
$bzipStep = false;
Method detectPHPMacOS
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function detectPHPMacOS($options = [], $searchOrder = null)
{
if ($searchOrder === null) {
$searchOrder = [
['command', ['-v', 'php']],
Method update
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function update(string $targetFolder, string $branch, int $lag = 0)
{
$info = $this->info($targetFolder);
$root = $info['repository']['root'];
$url = $info['url'];
Method execute
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$instances = CommandHelper::getInstances('tiki');
$instancesInfo = CommandHelper::getInstancesInfo($instances);
Method execute
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
if (empty($this->instancesInfo)) {
$this->io->info('No instances available');
return Command::SUCCESS;
Method setInstanceSetupError
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setInstanceSetupError($instanceId, \Exception $e = null, $action = 'install')
{
$errors = [];
$io = App::get('io');
Method getAvailableBranches
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAvailableBranches()
{
$versions = [];
$versionsTemp = [];
Method rsync
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rsync($args = [])
{
$return_val = -1;
if (empty($args['src']) || empty($args['dest'])) {
Method getAvailableBranches
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getAvailableBranches()
{
$versions = [];
foreach (explode("\n", `git ls-remote --heads --tags --refs $this->repositoryUrl`) as $line) {
Function execute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$instances = CommandHelper::getInstances();
$instancesInfo = CommandHelper::getInstancesInfo($instances);
if (isset($instancesInfo)) {
- 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 loadEnvironmentVariablesContainingLogic
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function loadEnvironmentVariablesContainingLogic()
{
$_ENV['TRIM_OS'] = strtoupper(substr(PHP_OS, 0, 3));
if ($_ENV['TRIM_OS'] === '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
Method restore
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function restore($srcInstance, $archive, $clone = false, $checksumCheck = false, $direct = false, $onlyData = false, $onlyCode = false, $options = [], $skipSystemConfigurationCheck = false, $allowCommonParents = 0)
Function getHost
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getHost()
{
$host = new SSHHost($this->host, $this->user, $this->port);
// change cwd before executing commands, for instance in CoreOS it may influence what
- 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 getInterpreterPath
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getInterpreterPath(TikiRequirements $requirements = null)
{
$instance = $this->instance;
$detectedBinaries = $instance->phpexec ? [$instance->phpexec] : $instance->getDiscovery()->detectPHP();
- 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 create
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function create($skipArchive = false, $backupDir = null)
{
$backupDir = $backupDir ?: $this->backupDir;
$this->io->writeln('Checking directories...');
- 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 rsync
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function rsync($args = [])
{
$return_val = -1;
if (empty($args['src']) || empty($args['dest'])) {
return $return_val;
- 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 getBranchToUpdate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getBranchToUpdate($branch)
{
if (preg_match('/(\d+)\.(\d+).*/', $branch, $matches1)) {
$major = $matches1[1];
$toUpdate = $matches1[0];
- 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"