TikiWiki/tiki-manager

View on GitHub

Showing 2,255 of 2,255 total issues

The property $wrapped_properties is not named in camelCase.
Open

class Wrapper
{
    private $wrapped_object;
    private $wrapped_properties;
    private $wrapped_methods;
Severity: Minor
Found in src/Libs/Helpers/Wrapper.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $manifest_file is not named in camelCase.
Open

    public function readSystemIniConfigFileFromManifest($manifest_file)
    {
        $result = [];
        $access = $this->getAccess();
        $manifest = $access->fileGetContents($manifest_file);
Severity: Minor
Found in src/Application/Restore.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The property $date_revision is not named in camelCase.
Open

class Version
{
    const SQL_INSERT_VERSION = <<<SQL
        INSERT OR REPLACE INTO
            version
Severity: Minor
Found in src/Application/Version.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $vcs_instance is not named in camelCase.
Open

class Tiki extends Application
{
    private $installType = null;
    private $branch = null;
    private $installed = null;
Severity: Minor
Found in src/Application/Tiki.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $vcs_instance is not named in camelCase.
Open

class BisectHelper
{
    private $instance;
    private $vcs_instance;
    private $io;
Severity: Minor
Found in src/Command/Helper/BisectHelper.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $all_infos is not named in camelCase.
Open

    public static function getInstancesInfo(array $instances, bool $all_infos = false): ?array
    {
        $instancesInfo = null;

        foreach ($instances as $instance) {
Severity: Minor
Found in src/Command/Helper/CommandHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $all_infos is not named in camelCase.
Open

    public static function renderInstancesTable($output, $rows, bool $all_infos = false)
    {
        if (empty($rows)) {
            return false;
        }
Severity: Minor
Found in src/Command/Helper/CommandHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The property $copy_id_port_in_host is not named in camelCase.
Open

class SSH
{
    private static $sshKeyCheck = [];

    private $adapter;
Severity: Minor
Found in src/Libs/Host/SSH.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $adapter_class is not named in camelCase.
Open

    public function __construct($host, $user, $port, $adapter_class = null)
    {
        $this->host = $host ?: '';
        $this->user = $user ?: '';
        $this->port = $port ?: 22;
Severity: Minor
Found in src/Libs/Host/SSH.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The property $last_command_exit_code is not named in camelCase.
Open

class Local
{
    private $env;
    private $last_command_exit_code = 0;
    private $location;
Severity: Minor
Found in src/Libs/Host/Local.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $svn_global_args is not named in camelCase.
Open

class SVN
{
    private $access;
    private $repository;
    private $svn_command = 'svn';
Severity: Minor
Found in src/Repository/SVN.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $svn_default_args is not named in camelCase.
Open

class SVN
{
    private $access;
    private $repository;
    private $svn_command = 'svn';
Severity: Minor
Found in src/Repository/SVN.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $svn_command is not named in camelCase.
Open

class SVN
{
    private $access;
    private $repository;
    private $svn_command = 'svn';
Severity: Minor
Found in src/Repository/SVN.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

Avoid deeply nested control flow statements.
Open

                    if ($i < $num_fields - 1) {
                        echo ',';
                    }
Severity: Major
Found in scripts/tiki/mysqldump.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            switch ($field_type[$i]) {
                                case 'int':
                                    $out = $row[$i];
                                    break;
                                case 'string':
    Severity: Major
    Found in scripts/tiki/mysqldump.php - About 45 mins to fix

      Function execute has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function execute(InputInterface $input, OutputInterface $output)
          {
              $command_name = 'manager:instance:clone';
              if (!$this->getApplication()->has($command_name)) {
                  $command_name = 'instance:clone';
      Severity: Minor
      Found in src/Command/CloneAndUpgradeInstanceCommand.php - About 45 mins to fix

      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;
      Severity: Minor
      Found in src/Command/Traits/InstanceConfigure.php - About 45 mins to fix

      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');
      Severity: Minor
      Found in src/Command/CreateInstanceCommand.php - About 45 mins to fix

      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];
              }
      Severity: Minor
      Found in src/Command/Helper/CommandHelper.php - About 45 mins to fix

      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)
          {
              $updater = UpdateManager::getUpdater();
              $updater->setLogger($this->logger);
      
      
      Severity: Minor
      Found in src/Command/ManagerUpdateCommand.php - About 45 mins to fix

      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

      Severity
      Category
      Status
      Source
      Language