YetiForceCompany/YetiForceCRM

View on GitHub
app/Controller/View/Page.php

Summary

Maintainability
D
1 day
Test Coverage
B
84%

The class Page has an overall complexity of 54 which is very high. The configured complexity threshold is 50.
Open

abstract class Page extends Base
{
    /** {@inheritdoc} */
    public function preProcess(\App\Request $request, $display = true)
    {
Severity: Minor
Found in app/Controller/View/Page.php by phpmd

Method getUserQuickMenuLinks has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function getUserQuickMenuLinks(\App\Request $request): array
    {
        $userModel = \Users_Record_Model::getCurrentUserModel();
        $headerLinks[] = [
            'linktype' => 'GROUPNAME',
Severity: Major
Found in app/Controller/View/Page.php - About 2 hrs to fix

    File Page.php has 263 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Abstract page view controller file.
     *
     * @package   Controller
    Severity: Minor
    Found in app/Controller/View/Page.php - About 2 hrs to fix

      Function getMenuHeaderLinks has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function getMenuHeaderLinks(\App\Request $request): array
          {
              $userModel = \App\User::getCurrentUserModel();
              $headerLinks = $headerLinkInstances = [];
      
      
      Severity: Minor
      Found in app/Controller/View/Page.php - About 2 hrs 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 getFooterScripts has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getFooterScripts(\App\Request $request)
          {
              $moduleName = $request->getModule();
              $jsFileNames = [
                  'modules.Vtiger.resources.Menu',
      Severity: Minor
      Found in app/Controller/View/Page.php - About 2 hrs 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 getMenuHeaderLinks has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function getMenuHeaderLinks(\App\Request $request): array
          {
              $userModel = \App\User::getCurrentUserModel();
              $headerLinks = $headerLinkInstances = [];
      
      
      Severity: Minor
      Found in app/Controller/View/Page.php - About 2 hrs to fix

        Method getFooterScripts has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getFooterScripts(\App\Request $request)
            {
                $moduleName = $request->getModule();
                $jsFileNames = [
                    'modules.Vtiger.resources.Menu',
        Severity: Minor
        Found in app/Controller/View/Page.php - About 1 hr to fix

          Method preProcess has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function preProcess(\App\Request $request, $display = true)
              {
                  parent::preProcess($request, false);
                  $view = $this->getViewer($request);
                  if (\App\Config::performance('BROWSING_HISTORY_WORKING')) {
          Severity: Minor
          Found in app/Controller/View/Page.php - About 1 hr to fix

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

                protected function getUserQuickMenuLinks(\App\Request $request): array
                {
                    $userModel = \Users_Record_Model::getCurrentUserModel();
                    $headerLinks[] = [
                        'linktype' => 'GROUPNAME',
            Severity: Minor
            Found in app/Controller/View/Page.php - About 45 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function preProcess has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                public function preProcess(\App\Request $request, $display = true)
                {
                    parent::preProcess($request, false);
                    $view = $this->getViewer($request);
                    if (\App\Config::performance('BROWSING_HISTORY_WORKING')) {
            Severity: Minor
            Found in app/Controller/View/Page.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 method getFooterScripts() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
            Open

                public function getFooterScripts(\App\Request $request)
                {
                    $moduleName = $request->getModule();
                    $jsFileNames = [
                        'modules.Vtiger.resources.Menu',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpmd

            CyclomaticComplexity

            Since: 0.1

            Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

            Example

            // Cyclomatic Complexity = 11
            class Foo {
            1   public function example() {
            2       if ($a == $b) {
            3           if ($a1 == $b1) {
                            fiddle();
            4           } elseif ($a2 == $b2) {
                            fiddle();
                        } else {
                            fiddle();
                        }
            5       } elseif ($c == $d) {
            6           while ($c == $d) {
                            fiddle();
                        }
            7        } elseif ($e == $f) {
            8           for ($n = 0; $n < $h; $n++) {
                            fiddle();
                        }
                    } else {
                        switch ($z) {
            9               case 1:
                                fiddle();
                                break;
            10              case 2:
                                fiddle();
                                break;
            11              case 3:
                                fiddle();
                                break;
                            default:
                                fiddle();
                                break;
                        }
                    }
                }
            }

            Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

            The method getUserQuickMenuLinks() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
            Open

                protected function getUserQuickMenuLinks(\App\Request $request): array
                {
                    $userModel = \Users_Record_Model::getCurrentUserModel();
                    $headerLinks[] = [
                        'linktype' => 'GROUPNAME',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpmd

            CyclomaticComplexity

            Since: 0.1

            Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

            Example

            // Cyclomatic Complexity = 11
            class Foo {
            1   public function example() {
            2       if ($a == $b) {
            3           if ($a1 == $b1) {
                            fiddle();
            4           } elseif ($a2 == $b2) {
                            fiddle();
                        } else {
                            fiddle();
                        }
            5       } elseif ($c == $d) {
            6           while ($c == $d) {
                            fiddle();
                        }
            7        } elseif ($e == $f) {
            8           for ($n = 0; $n < $h; $n++) {
                            fiddle();
                        }
                    } else {
                        switch ($z) {
            9               case 1:
                                fiddle();
                                break;
            10              case 2:
                                fiddle();
                                break;
            11              case 3:
                                fiddle();
                                break;
                            default:
                                fiddle();
                                break;
                        }
                    }
                }
            }

            Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

            The method getMenuHeaderLinks() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
            Open

                protected function getMenuHeaderLinks(\App\Request $request): array
                {
                    $userModel = \App\User::getCurrentUserModel();
                    $headerLinks = $headerLinkInstances = [];
            
            
            Severity: Minor
            Found in app/Controller/View/Page.php by phpmd

            CyclomaticComplexity

            Since: 0.1

            Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

            Example

            // Cyclomatic Complexity = 11
            class Foo {
            1   public function example() {
            2       if ($a == $b) {
            3           if ($a1 == $b1) {
                            fiddle();
            4           } elseif ($a2 == $b2) {
                            fiddle();
                        } else {
                            fiddle();
                        }
            5       } elseif ($c == $d) {
            6           while ($c == $d) {
                            fiddle();
                        }
            7        } elseif ($e == $f) {
            8           for ($n = 0; $n < $h; $n++) {
                            fiddle();
                        }
                    } else {
                        switch ($z) {
            9               case 1:
                                fiddle();
                                break;
            10              case 2:
                                fiddle();
                                break;
            11              case 3:
                                fiddle();
                                break;
                            default:
                                fiddle();
                                break;
                        }
                    }
                }
            }

            Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

            Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
            Open

                protected function getMenuHeaderLinks(\App\Request $request): array
            Severity: Critical
            Found in app/Controller/View/Page.php by sonar-php

            Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

            See

            Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed.
            Open

                public function getFooterScripts(\App\Request $request)
            Severity: Critical
            Found in app/Controller/View/Page.php by sonar-php

            Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

            See

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

            abstract class Page extends Base
            {
                /** {@inheritdoc} */
                public function preProcess(\App\Request $request, $display = true)
                {
            Severity: Minor
            Found in app/Controller/View/Page.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

            The method postProcess has a boolean flag argument $display, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function postProcess(\App\Request $request, $display = true)
            Severity: Minor
            Found in app/Controller/View/Page.php by phpmd

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

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

            Missing class import via use statement (line '37', column '70').
            Open

                    $view->assign('SHOW_FOOTER_BAR', $this->showFooter() && 8 !== (new \App\YetiForce\Register())->getStatus());
            Severity: Minor
            Found in app/Controller/View/Page.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 preProcess has a boolean flag argument $display, which is a certain sign of a Single Responsibility Principle violation.
            Open

                public function preProcess(\App\Request $request, $display = true)
            Severity: Minor
            Found in app/Controller/View/Page.php by phpmd

            BooleanArgumentFlag

            Since: 1.4.0

            A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

            Example

            class Foo {
                public function bar($flag = true) {
                }
            }

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

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

                            $cssScriptModel = new \Vtiger_CssScript_Model();
            Severity: Minor
            Found in app/Controller/View/Page.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

            Avoid using static access to class '\App\Config' in method 'preProcess'.
            Open

                    if (\App\Config::search('GLOBAL_SEARCH_SELECT_MODULE')) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getMenuHeaderLinks'.
            Open

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADERLINK']) as $links) {
            Severity: Minor
            Found in app/Controller/View/Page.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\Config' in method 'preProcess'.
            Open

                    if (\App\Config::performance('GLOBAL_SEARCH')) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getHeaderCss'.
            Open

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADERCSS']) as $cssLinks) {
            Severity: Minor
            Found in app/Controller/View/Page.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\User' in method 'getFooterScripts'.
            Open

                            if (\App\User::getCurrentUserRealId() === \App\User::getCurrentUserId() && \App\Privilege::isPermitted('Chat')) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '30', column '7').
            Open

                public function preProcess(\App\Request $request, $display = true)
                {
                    parent::preProcess($request, false);
                    $view = $this->getViewer($request);
                    if (\App\Config::performance('BROWSING_HISTORY_WORKING')) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getMenuHeaderLinks'.
            Open

                            $headerLinkInstances[] = \Vtiger_Link_Model::getInstanceFromLinkObject($headerLink);
            Severity: Minor
            Found in app/Controller/View/Page.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\Config' in method 'preProcess'.
            Open

                    if (\App\Config::performance('BROWSING_HISTORY_WORKING')) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Module_Model' in method 'preProcess'.
            Open

                    $view->assign('HOME_MODULE_MODEL', \Vtiger_Module_Model::getInstance('Home'));
            Severity: Minor
            Found in app/Controller/View/Page.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\Privilege' in method 'getFooterScripts'.
            Open

                            if (\App\User::getCurrentUserRealId() === \App\User::getCurrentUserId() && \App\Privilege::isPermitted('Chat')) {
            Severity: Minor
            Found in app/Controller/View/Page.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\User' in method 'getMenuHeaderLinks'.
            Open

                            'linkdata' => ['url' => 'index.php?module=Users&view=MeetingModal&record=' . \App\User::getCurrentUserRealId()],
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Users_Privileges_Model' in method 'preProcess'.
            Open

                        $userPrivilegesModel = \Users_Privileges_Model::getCurrentUserPrivilegesModel();
            Severity: Minor
            Found in app/Controller/View/Page.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\User' in method 'getMenuHeaderLinks'.
            Open

                    if (\App\MeetingService::getInstance()->isActive() && \App\Privilege::isPermitted('Users', 'MeetingUrl', false, \App\User::getCurrentUserRealId())) {
            Severity: Minor
            Found in app/Controller/View/Page.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\Privilege' in method 'getFooterScripts'.
            Open

                            if (\App\Privilege::isPermitted('KnowledgeBase')) {
            Severity: Minor
            Found in app/Controller/View/Page.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\Config' in method 'loadJsConfig'.
            Open

                            \App\Config::setJsEnv($key, $value);
            Severity: Minor
            Found in app/Controller/View/Page.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\User' in method 'getFooterScripts'.
            Open

                            if (\App\User::getCurrentUserRealId() === \App\User::getCurrentUserId() && \App\Privilege::isPermitted('Chat')) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_BrowsingHistory_Helper' in method 'preProcess'.
            Open

                        \Vtiger_BrowsingHistory_Helper::saveHistory($view->getTemplateVars('PAGETITLE'));
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getMenuHeaderLinks'.
            Open

                                $headerLinkInstance->addChildLink(\Vtiger_Link_Model::getInstanceFromValues($childLink));
            Severity: Minor
            Found in app/Controller/View/Page.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\Config' in method 'getUserQuickMenuLinks'.
            Open

                    if (\App\Config::security('SHOW_MY_PREFERENCES')) {
            Severity: Minor
            Found in app/Controller/View/Page.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\RecordSearch' in method 'preProcess'.
            Open

                        $view->assign('SEARCHABLE_MODULES', \App\RecordSearch::getSearchableModules());
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getFooterScripts'.
            Open

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADERSCRIPT']) as $headerScripts) {
            Severity: Minor
            Found in app/Controller/View/Page.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\Privilege' in method 'getMenuHeaderLinks'.
            Open

                    if (\App\MeetingService::getInstance()->isActive() && \App\Privilege::isPermitted('Users', 'MeetingUrl', false, \App\User::getCurrentUserRealId())) {
            Severity: Minor
            Found in app/Controller/View/Page.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 'preProcess'.
            Open

                    if ($activeReminder = \App\Module::isModuleActive('Calendar')) {
            Severity: Minor
            Found in app/Controller/View/Page.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\User' in method 'getMenuHeaderLinks'.
            Open

                    $userModel = \App\User::getCurrentUserModel();
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getMenuHeaderLinks'.
            Open

                        $headerLinkInstance = \Vtiger_Link_Model::getInstanceFromValues($headerLink);
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Users_Record_Model' in method 'getUserQuickMenuLinks'.
            Open

                    $userModel = \Users_Record_Model::getCurrentUserModel();
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Module_Model' in method 'loadJsConfig'.
            Open

                        $moduleModel = \Vtiger_Module_Model::getInstance($request->getModule());
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_BrowsingHistory_Helper' in method 'preProcess'.
            Open

                    $view->assign('BROWSING_HISTORY', \Vtiger_BrowsingHistory_Helper::getHistory());
            Severity: Minor
            Found in app/Controller/View/Page.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\Session' in method 'getFooterScripts'.
            Open

                    if (\App\Session::has('authenticated_user_id')) {
            Severity: Minor
            Found in app/Controller/View/Page.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\Mail' in method 'getFooterScripts'.
            Open

                        if (\App\Mail::checkMailClient()) {
            Severity: Minor
            Found in app/Controller/View/Page.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 getMenuHeaderLinks uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
            Open

                        } else {
                            $headerLinks[] = [
                                'linktype' => 'HEADERLINK',
                                'linklabel' => 'LBL_USER_PANEL',
                                'linkurl' => 'index.php',
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Menu_Model' in method 'getMenu'.
            Open

                    return \Vtiger_Menu_Model::getAll();
            Severity: Minor
            Found in app/Controller/View/Page.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\User' in method 'getUserQuickMenuLinks'.
            Open

                    if (\App\Config::security('CHANGE_LOGIN_PASSWORD') && \App\User::getCurrentUserId() === \App\User::getCurrentUserRealId()) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Users_Module_Model' in method 'getUserQuickMenuLinks'.
            Open

                    if (\Users_Module_Model::getSwitchUsers()) {
            Severity: Minor
            Found in app/Controller/View/Page.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\User' in method 'getUserQuickMenuLinks'.
            Open

                    if (\App\Config::security('CHANGE_LOGIN_PASSWORD') && \App\User::getCurrentUserId() === \App\User::getCurrentUserRealId()) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getUserQuickMenuLinks'.
            Open

                        $headerLinkInstances[] = \Vtiger_Link_Model::getInstanceFromValues($headerLink);
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getHeaderAdditionalTpl'.
            Open

                            $additionalTpl[] = \Vtiger_Link_Model::getInstanceFromLinkObject($headerLink);
            Severity: Minor
            Found in app/Controller/View/Page.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\Config' in method 'getUserQuickMenuLinks'.
            Open

                    if (\App\Config::security('CHANGE_LOGIN_PASSWORD') && \App\User::getCurrentUserId() === \App\User::getCurrentUserRealId()) {
            Severity: Minor
            Found in app/Controller/View/Page.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 '\Vtiger_Link_Model' in method 'getHeaderAdditionalTpl'.
            Open

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADER_ADDITIONAL_TPL']) as $links) {
            Severity: Minor
            Found in app/Controller/View/Page.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\User' in method 'getUserQuickMenuLinks'.
            Open

                     && $userModel->getId() === \App\User::getCurrentUserRealId() && 'TOTP_OFF' !== \App\Config::security('USER_AUTHY_MODE')
            Severity: Minor
            Found in app/Controller/View/Page.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\Config' in method 'getUserQuickMenuLinks'.
            Open

                     && $userModel->getId() === \App\User::getCurrentUserRealId() && 'TOTP_OFF' !== \App\Config::security('USER_AUTHY_MODE')
            Severity: Minor
            Found in app/Controller/View/Page.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 "linkurl" 6 times.
            Open

                                'linkurl' => 'index.php?module=YetiForce&parent=Settings&view=Shop',
            Severity: Critical
            Found in app/Controller/View/Page.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 "linktype" 12 times.
            Open

                            'linktype' => 'HEADERLINK',
            Severity: Critical
            Found in app/Controller/View/Page.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 "linkclass" 9 times.
            Open

                            'linkclass' => 'js-show-modal',
            Severity: Critical
            Found in app/Controller/View/Page.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 "showModal d-block" 4 times.
            Open

                            'linkclass' => 'showModal d-block',
            Severity: Critical
            Found in app/Controller/View/Page.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 "HEADERLINK" 11 times.
            Open

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADERLINK']) as $links) {
            Severity: Critical
            Found in app/Controller/View/Page.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 "linklabel" 11 times.
            Open

                            'linklabel' => 'LBL_VIDEO_CONFERENCE',
            Severity: Critical
            Found in app/Controller/View/Page.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 "linkdata" 5 times.
            Open

                            'linkdata' => ['url' => 'index.php?module=Users&view=MeetingModal&record=' . \App\User::getCurrentUserRealId()],
            Severity: Critical
            Found in app/Controller/View/Page.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.

            Avoid unused parameters such as '$request'.
            Open

                protected function getUserQuickMenuLinks(\App\Request $request): array
            Severity: Minor
            Found in app/Controller/View/Page.php by phpmd

            UnusedFormalParameter

            Since: 0.2

            Avoid passing parameters to methods or constructors and then not using those parameters.

            Example

            class Foo
            {
                private function bar($howdy)
                {
                    // $howdy is not used
                }
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

            Avoid unused parameters such as '$request'.
            Open

                protected function getHeaderAdditionalTpl(\App\Request $request): array
            Severity: Minor
            Found in app/Controller/View/Page.php by phpmd

            UnusedFormalParameter

            Since: 0.2

            Avoid passing parameters to methods or constructors and then not using those parameters.

            Example

            class Foo
            {
                private function bar($howdy)
                {
                    // $howdy is not used
                }
            }

            Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('MENUS', $this->getMenu());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                        $view->assign('SEARCHED_MODULE', $request->getModule());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('BROWSING_HISTORY', \Vtiger_BrowsingHistory_Helper::getHistory());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                        $view->assign('SEARCHABLE_MODULES', \App\RecordSearch::getSearchableModules());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Return type of getUserQuickMenuLinks() is undeclared type \App\Controller\View\Vtiger_Link_Model[]
            Open

                protected function getUserQuickMenuLinks(\App\Request $request): array
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Class \Vtiger_Link_Model was passed to foreach, but it does not extend Traversable. This may be intentional, because some of that class's declared properties are accessible from this context. (This check excludes dynamic properties)
            Open

                        foreach ($links as $headerLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('USER_QUICK_MENU_LINKS', $this->getUserQuickMenuLinks($request));
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

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

                    $view->assign('SHOW_FOOTER_BAR', $this->showFooter() && 8 !== (new \App\YetiForce\Register())->getStatus());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to method getCurrentUserRealId from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                            if (\App\User::getCurrentUserRealId() === \App\User::getCurrentUserId() && \App\Privilege::isPermitted('Chat')) {
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Class \Vtiger_Link_Model was passed to foreach, but it does not extend Traversable. This may be intentional, because some of that class's declared properties are accessible from this context. (This check excludes dynamic properties)
            Open

                        foreach ($headerScripts as $headerScript) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Variable $headerLinks was undeclared, but array fields are being added to it.
            Open

                    $headerLinks[] = [
            Severity: Info
            Found in app/Controller/View/Page.php by phan

            Call to method getCurrentUserId from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                    if (\App\Config::security('CHANGE_LOGIN_PASSWORD') && \App\User::getCurrentUserId() === \App\User::getCurrentUserRealId()) {
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Return type of getHeaderAdditionalTpl() is undeclared type \App\Controller\View\Vtiger_Link_Model[]
            Open

                protected function getHeaderAdditionalTpl(\App\Request $request): array
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Call to method getCurrentUserId from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                            if (\App\User::getCurrentUserRealId() === \App\User::getCurrentUserId() && \App\Privilege::isPermitted('Chat')) {
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Return type of getMenuHeaderLinks() is undeclared type \App\Controller\View\Vtiger_Link_Model[]
            Open

                protected function getMenuHeaderLinks(\App\Request $request): array
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Call to method getCurrentUserModel from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                    $userModel = \App\User::getCurrentUserModel();
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('SHOW_BREAD_CRUMBS', $this->showBreadCrumbLine());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

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

                    $view->assign('SHOW_FOOTER_BAR', $this->showFooter() && 8 !== (new \App\YetiForce\Register())->getStatus());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('ACTIVITY_REMINDER', \Users_Record_Model::getCurrentUserModel()->getCurrentUserActivityReminderInSeconds());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('SHOW_FOOTER', true);
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Argument 1 (mixed) is 'Calendar' but \Users_Privileges_Model::hasModulePermission() takes int defined at /code/modules/Users/models/Privileges.php:101
            Open

                        $activeReminder = $userPrivilegesModel->hasModulePermission('Calendar');
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('HEADER_ADDITIONAL_TPL', $this->getHeaderAdditionalTpl($request));
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Return type of getHeaderCss() is undeclared type \App\Controller\View\Vtiger_CssScript_Model[]
            Open

                public function getHeaderCss(\App\Request $request)
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Call to method getCurrentUserRealId from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                    if (\App\MeetingService::getInstance()->isActive() && \App\Privilege::isPermitted('Users', 'MeetingUrl', false, \App\User::getCurrentUserRealId())) {
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to method getCurrentUserRealId from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                     && $userModel->getId() === \App\User::getCurrentUserRealId() && 'TOTP_OFF' !== \App\Config::security('USER_AUTHY_MODE')
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                        $view->assign('MID', $request->getInteger('mid'));
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('HOME_MODULE_MODEL', \Vtiger_Module_Model::getInstance('Home'));
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Return type of getFooterScripts() is undeclared type \App\Controller\View\Vtiger_JsScript_Model[]
            Open

                public function getFooterScripts(\App\Request $request)
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('MENU_HEADER_LINKS', $this->getMenuHeaderLinks($request));
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('SHOW_FOOTER_BAR', $this->showFooter() && 8 !== (new \App\YetiForce\Register())->getStatus());
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Class \Vtiger_Link_Model was passed to foreach, but it does not extend Traversable. This may be intentional, because some of that class's declared properties are accessible from this context. (This check excludes dynamic properties)
            Open

                        foreach ($links as $headerLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Call to method getCurrentUserRealId from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                            'linkdata' => ['url' => 'index.php?module=Users&view=MeetingModal&record=' . \App\User::getCurrentUserRealId()],
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('REMINDER_ACTIVE', $activeReminder);
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('BREADCRUMB_TITLE', $this->getBreadcrumbTitle($request));
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::assign
            Open

                    $view->assign('QUALIFIED_MODULE', $request->getModule(false));
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Class \Vtiger_Link_Model was passed to foreach, but it does not extend Traversable. This may be intentional, because some of that class's declared properties are accessible from this context. (This check excludes dynamic properties)
            Open

                        foreach ($cssLinks as $cssLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phan

            Call to method getCurrentUserRealId from undeclared class \App\User (Did you mean class \Tests\App\User)
            Open

                    if (\App\Config::security('CHANGE_LOGIN_PASSWORD') && \App\User::getCurrentUserId() === \App\User::getCurrentUserRealId()) {
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

            Call to undeclared method \Vtiger_Viewer::getTemplateVars (Did you mean expr->getTemplatePath())
            Open

                        \Vtiger_BrowsingHistory_Helper::saveHistory($view->getTemplateVars('PAGETITLE'));
            Severity: Critical
            Found in app/Controller/View/Page.php by phan

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

                        $view->assign('MID', $request->getInteger('mid'));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (\App\Config::performance('GLOBAL_SEARCH')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('SHOW_FOOTER', true);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view = $this->getViewer($request);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('QUALIFIED_MODULE', $request->getModule(false));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (!$request->isEmpty('mid')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 130 characters
            Open

                    $view->assign('ACTIVITY_REMINDER', \Users_Record_Model::getCurrentUserModel()->getCurrentUserActivityReminderInSeconds());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if ($display) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $activeReminder = $userPrivilegesModel->hasModulePermission('Calendar');
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('BROWSING_HISTORY', \Vtiger_BrowsingHistory_Helper::getHistory());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (\App\Config::search('GLOBAL_SEARCH_SELECT_MODULE')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('SHOW_BREAD_CRUMBS', $this->showBreadCrumbLine());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if ($display) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    parent::postProcess($request, false);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('ACTIVITY_REMINDER', \Users_Record_Model::getCurrentUserModel()->getCurrentUserActivityReminderInSeconds());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('SHOW_FOOTER_BAR', $this->showFooter() && 8 !== (new \App\YetiForce\Register())->getStatus());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /** {@inheritdoc} */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $jsFileNames[] = "modules.$moduleName.resources.Edit";
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            \App\Config::setJsEnv($key, $value);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * Function to get the list of Header Links.
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        } else {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                'linkurl' => 'index.php',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                'icon' => 'fas fa-house-user fa-fw',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $jsFileNames[] = "modules.$moduleName.resources.AdvanceFilter";
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            $cssScriptModel = new \Vtiger_CssScript_Model();
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $moduleModel = \Vtiger_Module_Model::getInstance($request->getModule());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * Function to get the list of User Quick Menu Links.
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if ($activeReminder = \App\Module::isModuleActive('Calendar')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $userPrivilegesModel = \Users_Privileges_Model::getCurrentUserPrivilegesModel();
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('HOME_MODULE_MODEL', \Vtiger_Module_Model::getInstance('Home'));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'modules.Vtiger.resources.Menu',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if ('AppComponents' !== $moduleName) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * @param \App\Request $request
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linklabel' => 'LBL_SIGN_OUT',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    return $headerLinkInstances;
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (\App\Config::performance('BROWSING_HISTORY_WORKING')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        \Vtiger_BrowsingHistory_Helper::saveHistory($view->getTemplateVars('PAGETITLE'));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('BREADCRUMB_TITLE', $this->getBreadcrumbTitle($request));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        '~layouts/resources/validator/BaseValidator.js',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'modules.Vtiger.resources.AdvanceSearch',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        foreach ([
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (\App\MeetingService::getInstance()->isActive() && \App\Privilege::isPermitted('Users', 'MeetingUrl', false, \App\User::getCurrentUserRealId())) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                'linklabel' => 'LBL_SYSTEM_SETTINGS',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $headerLinkInstances[] = $headerLinkInstance;
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            if (\App\User::getCurrentUserRealId() === \App\User::getCurrentUserId() && \App\Privilege::isPermitted('Chat')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            if (\App\Privilege::isPermitted('KnowledgeBase')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    return true;
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * @return Vtiger_Link_Model[] - List of Vtiger_Link_Model instances
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            $headerLinkInstances[] = \Vtiger_Link_Model::getInstanceFromLinkObject($headerLink);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                'linkurl' => 'index.php?module=YetiForce&parent=Settings&view=Shop',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linkclass' => 'btn-danger d-md-none js-post-action',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 *
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $view->view('PageFooter.tpl');
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'modules.Vtiger.resources.Edit',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            $jsFileNames[] = $headerScript->linkurl;
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $headerCssInstances = parent::getHeaderCss($request);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        foreach ($cssLinks as $cssLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $this->preProcessDisplay($request);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                protected function getMenuHeaderLinks(\App\Request $request): array
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                public function getFooterScripts(\App\Request $request)
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linklabel' => 'LBL_VIDEO_CONFERENCE',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        '~layouts/resources/validator/FieldValidator.js',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 128 characters
            Open

                            'linkdata' => ['url' => 'index.php?module=Users&view=MeetingModal&record=' . \App\User::getCurrentUserRealId()],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'modules.Vtiger.resources.ConditionBuilder',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (\App\Session::has('authenticated_user_id')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    return array_merge(parent::getFooterScripts($request), $this->checkAndConvertJsScripts($jsFileNames));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 *
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                public function preProcess(\App\Request $request, $display = true)
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $view->assign('SEARCHED_MODULE', $request->getModule());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            $jsFileNames[] = '~layouts/basic/modules/OSSMail/resources/checkmails.js';
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $prefix = '';
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $prefix = 'public_html/';
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    parent::loadJsConfig($request);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 *
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $headerLinks = $headerLinkInstances = [];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('MENUS', $this->getMenu());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('MENU_HEADER_LINKS', $this->getMenuHeaderLinks($request));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('USER_QUICK_MENU_LINKS', $this->getUserQuickMenuLinks($request));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $moduleName = $request->getModule();
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'isEntityModule' => $moduleModel->isEntityModule(),
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                protected function showFooter()
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $userModel = \App\User::getCurrentUserModel();
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        if ('Settings' !== $request->getByType('parent', 2)) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linklabel' => 'SwitchUsers',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view = $this->getViewer($request);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        '~layouts/resources/Field.js',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /** {@inheritdoc} */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        ] as $key => $value) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                $headerLinkInstance->addChildLink(\Vtiger_Link_Model::getInstanceFromValues($childLink));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (\App\Config::security('SHOW_MY_PREFERENCES')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        ('PLL_PASSWORD_2FA' === $userModel->get('login_method') || 'PLL_LDAP_2FA' === $userModel->get('login_method'))
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 122 characters
            Open

                        ('PLL_PASSWORD_2FA' === $userModel->get('login_method') || 'PLL_LDAP_2FA' === $userModel->get('login_method'))
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    ) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linklabel' => 'BTN_YOUR_ACCOUNT_ACCESS_HISTORY',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linkdata' => ['url' => 'index.php?module=Users&view=LoginHistoryModal&mode=change&record=' . $userModel->get('id')],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linkurl' => 'index.php?module=Users&parent=Settings&action=Logout',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                protected function getMenu()
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('HEADER_ADDITIONAL_TPL', $this->getHeaderAdditionalTpl($request));
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $view->assign('SEARCHABLE_MODULES', \App\RecordSearch::getSearchableModules());
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                public function postProcess(\App\Request $request, $display = true)
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $jsFileNames = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (!IS_PUBLIC_DIR) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADERCSS']) as $cssLinks) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    return $headerCssInstances;
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                protected function showBodyHeader()
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        foreach ($links as $headerLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'icon' => 'mdi mdi-card-account-phone c-mdi',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linkurl' => 'index.php?module=Users&parent=Settings&action=Logout',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * @param \App\Request $request
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkclass' => 'showModal d-block',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linkclass' => 'showModal d-block',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $headerLinkInstances = [];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    return \Vtiger_Menu_Model::getAll();
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * Get the list of additional TPL files to show in the header.
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            $additionalTpl[] = \Vtiger_Link_Model::getInstanceFromLinkObject($headerLink);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /** {@inheritdoc} */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    parent::preProcess($request, false);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $view->assign('REMINDER_ACTIVE', $activeReminder);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        if (!\App\RequestUtil::getBrowserInfo()->ie) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                $jsFileNames[] = '~layouts/resources/views/KnowledgeBase/KnowledgeBase.vue.js';
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                public function loadJsConfig(\App\Request $request)
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'isQuickCreateSupported' => $moduleModel->isQuickCreateSupported(),
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    foreach ($headerLinks as $headerLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 129 characters
            Open

                        'linkdata' => ['url' => 'index.php?module=Users&view=LoginHistoryModal&mode=change&record=' . $userModel->get('id')],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    foreach ($headerLinks as $headerLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * @param \App\Request $request
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 *
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'modules.Vtiger.resources.BasicSearch',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        if (\App\Mail::checkMailClient()) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 129 characters
            Open

                            if (\App\User::getCurrentUserRealId() === \App\User::getCurrentUserId() && \App\Privilege::isPermitted('Chat')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                $jsFileNames[] = '~layouts/basic/modules/Chat/Chat.vue.js';
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                public function getHeaderCss(\App\Request $request)
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /** {@inheritdoc} */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /**
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 157 characters
            Open

                    if (\App\MeetingService::getInstance()->isActive() && \App\Privilege::isPermitted('Users', 'MeetingUrl', false, \App\User::getCurrentUserRealId())) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 127 characters
            Open

                            'linkdata' => ['url' => 'index.php?module=Users&view=PasswordModal&mode=change&record=' . $userModel->getId()],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                     && $userModel->getId() === \App\User::getCurrentUserRealId() && 'TOTP_OFF' !== \App\Config::security('USER_AUTHY_MODE')
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 128 characters
            Open

                     && $userModel->getId() === \App\User::getCurrentUserRealId() && 'TOTP_OFF' !== \App\Config::security('USER_AUTHY_MODE')
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /**
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 132 characters
            Open

                    if (\App\Config::security('CHANGE_LOGIN_PASSWORD') && \App\User::getCurrentUserId() === \App\User::getCurrentUserRealId()) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkdata' => ['url' => 'index.php?module=Users&view=PasswordModal&mode=change&record=' . $userModel->getId()],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 *
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /** {@inheritdoc} */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'modules.Vtiger.resources.Header',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        foreach ($headerScripts as $headerScript) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /** {@inheritdoc} */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if ('Settings' !== $request->getRaw('parent')) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    return true;
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADERLINK']) as $links) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkclass' => 'js-show-modal',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                'linklabel' => 'LBL_USER_PANEL',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $headerLinkInstance = \Vtiger_Link_Model::getInstanceFromValues($headerLink);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /**
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linklabel' => 'LBL_MY_PREFERENCES',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'icon' => 'yfi yfi-change-passowrd',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $additionalTpl = [];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            $headerCssInstances[] = $cssScriptModel->set('href', $prefix . $cssLink->linkurl);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /** {@inheritdoc} */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if ($userModel->isAdmin() || $userModel->isSuperUser()) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                                'icon' => 'fas fa-cog fa-fw',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkclass' => 'd-block',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linklabel' => 'LBL_2FA_TOTP_QR_CODE',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'icon' => 'yfi yfi-login-history',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'icon' => 'fas fa-power-off fa-fw',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                /**
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * @return array
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'modules.Vtiger.resources.AdvanceFilter',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADERSCRIPT']) as $headerScripts) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkdata' => ['url' => 'index.php?module=Users&view=MeetingModal&record=' . \App\User::getCurrentUserRealId()],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'icon' => 'fas fa-power-off fa-fw',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        if (isset($headerLink['childlinks'])) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            foreach ($headerLink['childlinks'] as $childLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linklabel' => 'LBL_ACCOUNT_SETTINGS',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'icon' => 'fas fa-key',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkdata' => ['url' => $userModel->getSwitchUsersUrl()],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 *
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linktype' => 'GROUPNAME',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkclass' => 'showModal d-block',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linktype' => 'HEADERLINK',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linklabel' => 'LBL_SIGN_OUT',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * @return Vtiger_Link_Model[] - List of Vtiger_Link_Model instances
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkclass' => 'showModal d-block',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linkclass' => 'd-none d-sm-none d-md-block',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                protected function getHeaderAdditionalTpl(\App\Request $request): array
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (\App\Config::security('CHANGE_LOGIN_PASSWORD') && \App\User::getCurrentUserId() === \App\User::getCurrentUserRealId()) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'icon' => 'fas fa-exchange-alt fa-fw',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * @return Vtiger_Link_Model[] - List of Vtiger_Link_Model instances
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    return $additionalTpl;
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                protected function getUserQuickMenuLinks(\App\Request $request): array
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    if (\Users_Module_Model::getSwitchUsers()) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linktype' => 'SEPARATOR',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    return $headerLinkInstances;
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $userModel = \Users_Record_Model::getCurrentUserModel();
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkurl' => $userModel->getPreferenceDetailViewUrl(),
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'icon' => 'fas fa-user-cog fa-fw',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkurl' => '',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    ];
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 * Function to get the list of menu.
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                    foreach (\Vtiger_Link_Model::getAllByType(\vtlib\Link::IGNORE_MODULE, ['HEADER_ADDITIONAL_TPL']) as $links) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $headerLinks[] = [
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        'linkclass' => 'd-none d-sm-none d-md-block js-post-action',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        $headerLinkInstances[] = \Vtiger_Link_Model::getInstanceFromValues($headerLink);
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 */
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                        foreach ($links as $headerLink) {
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                 *
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linklabel' => 'LBL_CHANGE_PASSWORD',
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                            'linkdata' => ['url' => 'index.php?module=Users&view=TwoFactorAuthenticationModal&record=' . $userModel->getId()],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Line exceeds 120 characters; contains 130 characters
            Open

                            'linkdata' => ['url' => 'index.php?module=Users&view=TwoFactorAuthenticationModal&record=' . $userModel->getId()],
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

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

                }
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            Expected 0 spaces after opening bracket; newline found
            Open

                    if (
            Severity: Minor
            Found in app/Controller/View/Page.php by phpcodesniffer

            There are no issues that match your filters.

            Category
            Status