Showing 2,255 of 2,255 total issues
Method createUnpronounceable
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function createUnpronounceable($length, $chars)
{
global $_Text_Password_NumberOfPossibleCharacters;
$password = '';
Method interact
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function interact(InputInterface $input, OutputInterface $output)
{
$helper = $this->getHelper('question');
$email = $input->getOption('email');
if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
Method interact
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function interact(InputInterface $input, OutputInterface $output)
{
if (empty($input->getOption('time'))) {
$answer = $this->io->ask('What time should it run at?', '00:00', function ($answer) {
return CommandHelper::validateTimeInput($answer);
Method interact
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function interact(InputInterface $input, OutputInterface $output)
{
if (empty($input->getOption('instances'))) {
$instances = CommandHelper::getInstances('tiki');
$instancesInfo = CommandHelper::getInstancesInfo($instances);
Method execute
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln('<comment>WARNING!</comment>');
$output->writeln('<comment>You are about to delete all state, backup, cache, and log files!</comment>');
Method remove
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function remove($helper, $input, $output)
{
$report = new ReportManager;
$instances = $report->getReportInstances();
$instancesInfo = CommandHelper::getInstancesInfo($instances);
Method execute
has 28 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 install
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function install(Instance $instance): Instance
{
$checksumCheck = $this->input->getOption('check') ?? false;
$revision = $this->input->getOption('revision');
$discovery = $instance->getDiscovery();
Method secure_trim_data
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function secure_trim_data($should_set = false)
{
$modes = ['---', '--x', '-w-', '-wx', 'r--', 'r-x', 'rw-', 'rwx'];
$stat = stat($_ENV['TRIM_DATA']);
Method runCommand
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function runCommand($command, $options = [])
{
$handle = self::getExtHandle();
$cwd = !empty($options['cwd']) ? $options['cwd'] : $this->location;
$env = !empty($options['env']) ? $options['env'] : $this->env;
Function interact
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function interact(InputInterface $input, OutputInterface $output)
{
if (empty($input->getOption('instance'))) {
if (empty($this->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 getUpgradeVersion
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function getUpgradeVersion($instance)
{
$found_incompatibilities = false;
$instance->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 setInstanceSetupError
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function setInstanceSetupError($instanceId, \Exception $e = null, $action = 'install')
{
$errors = [];
$io = App::get('io');
- 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 extractTo
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function extractTo(Version $version, $folder, $revision = null): void
{
$dirExists = file_exists($folder);
if ($dirExists && preg_match('/tags\\//', $version->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 log
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function log($level, $message, array $context = []): void
{
if (!is_string($message) && !$message instanceof \Stringable) {
throw new \InvalidArgumentException('Message must be a string or an instance of Stringable.');
}
- 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 performActualUpdate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function performActualUpdate(Version $version, $options = [])
{
$access = $this->instance->getBestAccess('scripting');
$vcsType = $this->vcs_instance->getIdentifier();
$can_svn = $access->hasExecutable('svn') && $vcsType == 'SVN';
- 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 promptUser
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function promptUser($prompt, $default = false, $values = [])
{
if (!$_ENV['INTERACTIVE']) {
return $default;
}
- 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 info
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function info($targetFolder, $raw = false)
{
$cmd = "info $targetFolder";
if (! $raw) {
$cmd .= ' --xml';
- 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 27 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 execute
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$email = $input->getOption('email');
if (empty($email) || ! filter_var($email, FILTER_VALIDATE_EMAIL)) {