YetiForceCompany/YetiForceCRM

View on GitHub
app/Cli/System.php

Summary

Maintainability
B
4 hrs
Test Coverage
F
21%

Function updateBySelect has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    private function updateBySelect(): void
    {
        $options = [];
        $toInstall = \App\YetiForce\Updater::getToInstall();
        foreach ($toInstall as $package) {
Severity: Minor
Found in app/Cli/System.php - About 1 hr 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

Method updateBySelect has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function updateBySelect(): void
    {
        $options = [];
        $toInstall = \App\YetiForce\Updater::getToInstall();
        foreach ($toInstall as $package) {
Severity: Minor
Found in app/Cli/System.php - About 1 hr to fix

    Function updateByType has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        private function updateByType(string $type): void
        {
            $types = ['patches', 'version'];
            if (!\in_array($this->climate->arguments->get('type'), $types)) {
                $this->climate->white('Type not found. Allowed types:')->columns($types);
    Severity: Minor
    Found in app/Cli/System.php - About 1 hr 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 update has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        public function update(): void
        {
            $maxExecutionTime = \ini_get('max_execution_time');
            if ($maxExecutionTime < 1 || $maxExecutionTime > 600) {
                $this->climate->lightGreen('Max execution time = ' . $maxExecutionTime);
    Severity: Minor
    Found in app/Cli/System.php - About 25 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

    The class System has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13.
    Open

    class System extends Base
    {
        /** {@inheritdoc} */
        public $moduleName = 'System';
    
    
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    CouplingBetweenObjects

    Since: 1.1.0

    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

    Example

    class Foo {
        /**
         * @var \foo\bar\X
         */
        private $x = null;
    
        /**
         * @var \foo\bar\Y
         */
        private $y = null;
    
        /**
         * @var \foo\bar\Z
         */
        private $z = null;
    
        public function setFoo(\Foo $foo) {}
        public function setBar(\Bar $bar) {}
        public function setBaz(\Baz $baz) {}
    
        /**
         * @return \SplObjectStorage
         * @throws \OutOfRangeException
         * @throws \InvalidArgumentException
         * @throws \ErrorException
         */
        public function process(\Iterator $it) {}
    
        // ...
    }

    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

    Missing class import via use statement (line '277', column '27').
    Open

                $packageInstance = new \vtlib\Package();
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '190', column '26').
    Open

            $menuRecordModel = new \Settings_Menu_Record_Model();
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '94', column '23').
    Open

            $registration = new \App\YetiForce\Register();
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    The method update uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $this->updateBySelect();
            }
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class '\App\YetiForce\Register' in method 'checkRegStatus'.
    Open

            $this->climate->bold('CRM ID: ' . \App\YetiForce\Register::getCrmKey());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Company' in method 'checkRegStatus'.
    Open

            foreach (\App\Company::getCompany() as $key => $value) {
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid assigning values to variables in if clauses and the like (line '96', column '7').
    Open

        public function checkRegStatus(): void
        {
            $registration = new \App\YetiForce\Register();
            $this->climate->bold('Status: ' . \App\Language::translate(\App\YetiForce\Register::STATUS_MESSAGES[$registration->getStatus(true)], 'Settings::Companies'));
            if ($error = $registration->getError()) {
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

    Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

    Avoid using static access to class '\App\YetiForce\Updater' in method 'updateByType'.
    Open

            foreach (\App\YetiForce\Updater::getToInstall() as $package) {
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\YetiForce\Updater' in method 'updateByType'.
    Open

                if (!\App\YetiForce\Updater::isDownloaded($package)) {
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\YetiForce\Updater' in method 'updateBySelect'.
    Open

                        \App\YetiForce\Updater::download($package);
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Language' in method 'checkRegStatus'.
    Open

            $this->climate->bold('Status: ' . \App\Language::translate(\App\YetiForce\Register::STATUS_MESSAGES[$registration->getStatus(true)], 'Settings::Companies'));
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\UserPrivilegesFile' in method 'reloadUserPrivileges'.
    Open

            $this->climate->bold('Users: ' . \App\UserPrivilegesFile::recalculateAll());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Db\Fixer' in method 'reloadModule'.
    Open

            $this->climate->bold('Actions: ' . \App\Db\Fixer::baseModuleActions());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\Settings_Updates_Module_Model' in method 'history'.
    Open

            }, \Settings_Updates_Module_Model::getUpdates());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Colors' in method 'reloadModule'.
    Open

            \App\Colors::generate();
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\YetiForce\Register' in method 'checkRegStatus'.
    Open

            $this->climate->bold('APP ID: ' . \App\YetiForce\Register::getInstanceKey());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Language' in method 'checkRegStatus'.
    Open

                $this->climate->lightRed('Status error: ' . \App\Language::translateSingleMod($error, 'Other.Exceptions'));
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Db\Fixer' in method 'reloadModule'.
    Open

            $this->climate->bold('Profile field: ' . \App\Db\Fixer::profileField());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\YetiForce\Updater' in method 'updateBySelect'.
    Open

            $toInstall = \App\YetiForce\Updater::getToInstall();
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    The method updateBySelect uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                    } else {
                        \App\YetiForce\Updater::download($package);
                        $this->update();
                    }
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class '\App\YetiForce\Register' in method 'checkRegStatus'.
    Open

            $this->climate->bold('Provider: ' . \App\YetiForce\Register::getProvider());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Db\Fixer' in method 'reloadModule'.
    Open

            $this->climate->bold('Tools: ' . \App\Db\Fixer::baseModuleTools());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\YetiForce\Updater' in method 'updateBySelect'.
    Open

                if (\App\YetiForce\Updater::isDownloaded($package)) {
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    The method updateByPackage uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                } else {
                    echo $response . PHP_EOL;
                    unlink($path);
                }
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method history uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $this->climate->lightGreen('No updates');
            }
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class '\App\YetiForce\Register' in method 'showProducts'.
    Open

            $table = \App\YetiForce\Register::getProducts();
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Module' in method 'reloadModule'.
    Open

            \App\Module::createModuleMetaFile();
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\YetiForce\Updater' in method 'updateByType'.
    Open

                    \App\YetiForce\Updater::download($package);
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    The method update uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $this->climate->lightRed('Max execution time = ' . $maxExecutionTime);
            }
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    The method updateBySelect uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                } else {
                    $option .= ' - To download';
                }
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class '\App\YetiForce\Updater' in method 'updateBySelect'.
    Open

                    if (\App\YetiForce\Updater::isDownloaded($package)) {
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\Settings_ModuleManager_Module_Model' in method 'updateByPackage'.
    Open

                $path = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . \Settings_ModuleManager_Module_Model::getUploadDirectory() . \DIRECTORY_SEPARATOR . $package['hash'] . '.zip';
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Db\Fixer' in method 'reloadModule'.
    Open

            $this->climate->bold('Share: ' . \App\Db\Fixer::share());
    Severity: Minor
    Found in app/Cli/System.php by phpmd

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Define a constant instead of duplicating this literal "toVersion" 3 times.
    Open

                $versionCompare = $package['fromVersion'] !== $package['toVersion'];
    Severity: Critical
    Found in app/Cli/System.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "System" 7 times.
    Open

        public $moduleName = 'System';
    Severity: Critical
    Found in app/Cli/System.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "action" 6 times.
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Critical
    Found in app/Cli/System.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "fromVersion" 3 times.
    Open

                $versionCompare = $package['fromVersion'] !== $package['toVersion'];
    Severity: Critical
    Found in app/Cli/System.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "label" 3 times.
    Open

                    $this->climate->inline($package['label'] . ' - Downloading a package ...');
    Severity: Critical
    Found in app/Cli/System.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->arguments->parse();
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Colors');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method table from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->table($table);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method getStatus from undeclared class \App\YetiForce\Register
    Open

            $this->climate->bold('Status: ' . \App\Language::translate(\App\YetiForce\Register::STATUS_MESSAGES[$registration->getStatus(true)], 'Settings::Companies'));
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Create module meta file');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to undeclared method \App\Db::createCommand
    Open

            \App\Db::getInstance('admin')->createCommand()->update('s_#__companies', [
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method out from undeclared class \League\CLImate\CLImate
    Open

                    $this->climate->out('- downloaded');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method border from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->border('─', 200);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            if (!\in_array($this->climate->arguments->get('type'), $types)) {
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method border from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->border('─', 200);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method border from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->border('─', 200);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method white from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->white('Type not found. Allowed types:')->columns($types);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightRed from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->lightRed($th->__toString());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightGreen from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->lightGreen('Max execution time = ' . $maxExecutionTime);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method getProducts from undeclared class \App\YetiForce\Register
    Open

            $table = \App\YetiForce\Register::getProducts();
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method table from undeclared class \League\CLImate\CLImate
    Open

            $table ? $this->climate->table($table) : $this->climate->bold('None');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method lightRed from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->lightRed('Max execution time = ' . $maxExecutionTime);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to constant STATUS_MESSAGES from undeclared class \App\YetiForce\Register
    Open

            $this->climate->bold('Status: ' . \App\Language::translate(\App\YetiForce\Register::STATUS_MESSAGES[$registration->getStatus(true)], 'Settings::Companies'));
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method border from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->border('─', 200);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Profile field: ' . \App\Db\Fixer::profileField());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method radio from undeclared class \League\CLImate\CLImate
    Open

            $input = $this->climate->radio('Updates available:', $options);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->arguments->add([
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method border from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->border('─', 200);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Status: ' . \App\Language::translate(\App\YetiForce\Register::STATUS_MESSAGES[$registration->getStatus(true)], 'Settings::Companies'));
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Actions: ' . \App\Db\Fixer::baseModuleActions());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method inline from undeclared class \League\CLImate\CLImate
    Open

                    $this->climate->inline($package['label'] . ' - Downloading a package ...');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightRed from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->lightRed('Status error: ' . \App\Language::translateSingleMod($error, 'Other.Exceptions'));
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('CRM ID: ' . \App\YetiForce\Register::getCrmKey());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method getCrmKey from undeclared class \App\YetiForce\Register
    Open

            $this->climate->bold('CRM ID: ' . \App\YetiForce\Register::getCrmKey());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Provider: ' . \App\YetiForce\Register::getProvider());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightGreen from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->lightGreen('No updates');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            if ($this->climate->arguments->defined('type')) {
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method __construct from undeclared class \App\YetiForce\Register
    Open

            $registration = new \App\YetiForce\Register();
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method border from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->border('─', 200);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('APP ID: ' . \App\YetiForce\Register::getInstanceKey());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method table from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->table([$table]);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightYellow from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->lightYellow()->border('─', 200);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Users: ' . \App\UserPrivilegesFile::recalculateAll());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightYellow from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->lightYellow()->border('─', 200);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Tools: ' . \App\Db\Fixer::baseModuleTools());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightBlue from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->lightBlue('Total time: ' . round(microtime(true) - $startTime, 2));
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

                $this->updateByType($this->climate->arguments->get('type'));
    Severity: Minor
    Found in app/Cli/System.php by phan

    Call to method getError from undeclared class \App\YetiForce\Register
    Open

            if ($error = $registration->getError()) {
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method white from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->white($package['label'] . ' - Installing the package');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method getProvider from undeclared class \App\YetiForce\Register
    Open

            $this->climate->bold('Provider: ' . \App\YetiForce\Register::getProvider());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $table ? $this->climate->table($table) : $this->climate->bold('None');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightBlue from undeclared class \League\CLImate\CLImate
    Open

                $this->climate->lightBlue('No updates available');
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method lightRed from undeclared class \League\CLImate\CLImate
    Open

                    $this->climate->lightRed($packageInstance->_errorText);
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method getInstanceKey from undeclared class \App\YetiForce\Register
    Open

            $this->climate->bold('APP ID: ' . \App\YetiForce\Register::getInstanceKey());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method getCompany from undeclared class \App\Company
    Open

            foreach (\App\Company::getCompany() as $key => $value) {
    Severity: Critical
    Found in app/Cli/System.php by phan

    Call to method bold from undeclared class \League\CLImate\CLImate
    Open

            $this->climate->bold('Share: ' . \App\Db\Fixer::share());
    Severity: Critical
    Found in app/Cli/System.php by phan

    Reference to instance property arguments from undeclared class \League\CLImate\CLImate
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phan

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'update' => 'Update',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            } else {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->border('─', 200);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach (\App\Company::getCompany() as $key => $value) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Share: ' . \App\Db\Fixer::share());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $maxExecutionTime = \ini_get('max_execution_time');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->lightGreen('Max execution time = ' . $maxExecutionTime);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            ]);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            } else {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $registration = new \App\YetiForce\Register();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /** @var string[] Methods list */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'type' => [
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->border('─', 200);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $table ? $this->climate->table($table) : $this->climate->bold('None');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Tools: ' . \App\Db\Fixer::baseModuleTools());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Profile field: ' . \App\Db\Fixer::profileField());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'checkRegStatus' => 'Check registration status',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'showProducts' => 'Show active products',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->lightGreen('No updates');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->lightRed('Max execution time = ' . $maxExecutionTime);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $table = [];
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $table = array_map(function ($item) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                unset($item['id']);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->border('─', 200);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'deleteRegistration' => 'Delete registration data',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        ];
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->table([$table]);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Reload modules.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public $methods = [
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($maxExecutionTime < 1 || $maxExecutionTime > 600) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function checkRegStatus(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($error = $registration->getError()) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->border('─', 200);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'reloadMenus' => 'Reload menus',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * History of uploaded updates.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $item['result'] = $item['result'] ? 'OK' : 'Error';
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->table($table);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->cli->actionsList('System');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Update CRM.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($this->climate->arguments->defined('type')) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->updateByType($this->climate->arguments->get('type'));
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Check registration status.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('CRM ID: ' . \App\YetiForce\Register::getCrmKey());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->arguments->add([
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->updateBySelect();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->lightRed('Status error: ' . \App\Language::translateSingleMod($error, 'Other.Exceptions'));
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Provider: ' . \App\YetiForce\Register::getProvider());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'description' => 'Update type. Values: patches, version',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($this->helpMode) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->arguments->parse();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function showProducts(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $item;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->border('─', 200);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->cli->actionsList('System');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Actions: ' . \App\Db\Fixer::baseModuleActions());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /** {@inheritdoc} */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public $moduleName = 'System';
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'reloadModule' => 'Reload modules',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'reloadUserPrivileges' => 'Reload users privileges',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            } else {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->border('─', 200);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $table = \App\YetiForce\Register::getProducts();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function history(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'prefix' => 't',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Status: ' . \App\Language::translate(\App\YetiForce\Register::STATUS_MESSAGES[$registration->getStatus(true)], 'Settings::Companies'));
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            'history' => 'History of uploaded updates',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }, \Settings_Updates_Module_Model::getUpdates());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($table) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function update(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Line exceeds 120 characters; contains 165 characters
    Open

            $this->climate->bold('Status: ' . \App\Language::translate(\App\YetiForce\Register::STATUS_MESSAGES[$registration->getStatus(true)], 'Settings::Companies'));
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('APP ID: ' . \App\YetiForce\Register::getInstanceKey());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $table[$key] = $value;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Show active products.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->cli->actionsList('System');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function reloadModule(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'post_code' => '', 'country' => '', 'companysize' => '', 'website' => '', 'logo' => '',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            ])->execute();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach (\App\YetiForce\Updater::getToInstall() as $package) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->out('- downloaded');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $toInstall = \App\YetiForce\Updater::getToInstall();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $option .= " ({$package['fromVersion']} >> {$package['toVersion']})";
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$options) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if (\App\YetiForce\Updater::isDownloaded($package)) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            } catch (\Throwable $th) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->lightBlue('Total time: ' . round(microtime(true) - $startTime, 2));
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            \App\Module::createModuleMetaFile();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            \App\Colors::generate();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->updateByPackage($package);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $option .= ' - Downloaded, ready to install';
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $option .= ' - To download';
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            try {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Line exceeds 120 characters; contains 170 characters
    Open

                $path = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . \Settings_ModuleManager_Module_Model::getUploadDirectory() . \DIRECTORY_SEPARATOR . $package['hash'] . '.zip';
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $response = $packageInstance->import($path, true);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->lightRed($th->__toString());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->lightYellow()->border('─', 200);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $options = [];
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                } else {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $input = $this->climate->radio('Updates available:', $options);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $this->updateByPackage($package);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        \App\YetiForce\Updater::download($package);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $this->update();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                } else {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->cli->actionsList('System');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Reload users privileges.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->lightYellow()->border('─', 200);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!\in_array($this->climate->arguments->get('type'), $types)) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->white('Type not found. Allowed types:')->columns($types);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (!\App\YetiForce\Updater::isDownloaded($package)) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (\App\YetiForce\Updater::isDownloaded($package)) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Users: ' . \App\UserPrivilegesFile::recalculateAll());
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Delete registration data.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    } else {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Update by package type.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    continue;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($package['fromVersion'] !== $package['toVersion']) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->white($package['label'] . ' - Installing the package');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'firstname' => '', 'lastname' => '', 'email' => '', 'facebook' => '', 'twitter' => '', 'linkedin' => '',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        private function updateByType(string $type): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $types = ['patches', 'version'];
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->inline($package['label'] . ' - Downloading a package ...');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $option = "{$package['label']}";
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($package['hash'] === $hash) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Colors');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->cli->actionsList('System');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'name' => '', 'industry' => '', 'vat_id' => '', 'city' => '', 'address' => '',
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $versionUpdate = 'version' === $type;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $versionCompare = $package['fromVersion'] !== $package['toVersion'];
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach ($toInstall as $package) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $startTime = microtime(true);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $packageInstance = new \vtlib\Package();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $this->climate->lightRed($packageInstance->_errorText);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    echo $response . PHP_EOL;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Reload menus.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function reloadMenus(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Update by selecting a package.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach ($toInstall as $package) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $hash = $input->prompt();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $menuRecordModel = new \Settings_Menu_Record_Model();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->cli->actionsList('System');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (($versionCompare && !$versionUpdate) || (!$versionCompare && $versionUpdate)) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            \App\Db::getInstance('admin')->createCommand()->update('s_#__companies', [
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param string $type Package type. Values: patches, version
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    \App\YetiForce\Updater::download($package);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        private function updateBySelect(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param array $package
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    unlink($path);
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->climate->bold('Create module meta file');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function reloadUserPrivileges(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                'status' => 0,
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $menuRecordModel->refreshMenuFiles();
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $options[$package['hash']] = $option;
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Update package.
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $path = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . \Settings_ModuleManager_Module_Model::getUploadDirectory() . \DIRECTORY_SEPARATOR . $package['hash'] . '.zip';
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$this->climate->arguments->defined('action')) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function deleteRegistration(): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $this->climate->lightBlue('No updates available');
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        private function updateByPackage(array $package): void
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ($packageInstance->_errorText) {
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**
    Severity: Minor
    Found in app/Cli/System.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status