YetiForceCompany/YetiForceCRM

View on GitHub
vtlib/Vtiger/Functions.php

Summary

Maintainability
F
4 days
Test Coverage
D
60%

File Functions.php has 464 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

 /* +**********************************************************************************
 * The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
Severity: Minor
Found in vtlib/Vtiger/Functions.php - About 7 hrs to fix

    Function throwNewException has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
        {
            if (!headers_sent() && \App\Config::security('cspHeaderActive')) {
                header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
            }
    Severity: Minor
    Found in vtlib/Vtiger/Functions.php - About 3 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

    The class Functions has 12 public methods. Consider refactoring Functions to keep number of public methods under 10.
    Open

    class Functions
    {
        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
        {
            if (\App\Cache::has('moduleTabs', 'all')) {
    Severity: Minor
    Found in vtlib/Vtiger/Functions.php by phpmd

    TooManyPublicMethods

    Since: 0.1

    A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

    By default it ignores methods starting with 'get' or 'set'.

    Example

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

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

    class Functions
    {
        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
        {
            if (\App\Cache::has('moduleTabs', 'all')) {
    Severity: Minor
    Found in vtlib/Vtiger/Functions.php by phpmd

    Function getAllModules has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
        {
            if (\App\Cache::has('moduleTabs', 'all')) {
                $moduleList = \App\Cache::get('moduleTabs', 'all');
            } else {
    Severity: Minor
    Found in vtlib/Vtiger/Functions.php - About 3 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

    Functions has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Functions
    {
        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
        {
            if (\App\Cache::has('moduleTabs', 'all')) {
    Severity: Minor
    Found in vtlib/Vtiger/Functions.php - About 2 hrs to fix

      Method throwNewException has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
          {
              if (!headers_sent() && \App\Config::security('cspHeaderActive')) {
                  header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
              }
      Severity: Major
      Found in vtlib/Vtiger/Functions.php - About 2 hrs to fix

        Method getAllModules has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
            {
                if (\App\Cache::has('moduleTabs', 'all')) {
                    $moduleList = \App\Cache::get('moduleTabs', 'all');
                } else {
        Severity: Minor
        Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

          Function arrayDiffAssocRecursive has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function arrayDiffAssocRecursive($array1, $array2)
              {
                  $difference = [];
                  foreach ($array1 as $key => $value) {
                      if (\is_array($value)) {
          Severity: Minor
          Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

          Cognitive Complexity

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

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

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

          Further reading

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

              public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
              {
                  $field = $table_name . ':' . $column_name;
                  //Add the field details in this array if you want to change the advance filter field details
          
          
          Severity: Minor
          Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

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

                public static function getCRMRecordMetadata($mixedid)
                {
                    $multimode = \is_array($mixedid);
            
                    $ids = $multimode ? $mixedid : [$mixedid];
            Severity: Minor
            Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

              Function getCRMRecordMetadata has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static function getCRMRecordMetadata($mixedid)
                  {
                      $multimode = \is_array($mixedid);
              
                      $ids = $multimode ? $mixedid : [$mixedid];
              Severity: Minor
              Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

              Cognitive Complexity

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

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

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

              Further reading

              Method getModuleData has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function getModuleData($mixed)
                  {
                      if (empty($mixed)) {
                          \App\Log::error(__METHOD__ . ' - Required parameter missing');
              
              
              Severity: Minor
              Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

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

                    public static function getModuleData($mixed)
                    {
                        if (empty($mixed)) {
                            \App\Log::error(__METHOD__ . ' - Required parameter missing');
                
                
                Severity: Minor
                Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

                Cognitive Complexity

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

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

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

                Further reading

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

                    public static function recurseDelete($src, $outsideRoot = false): int
                    {
                        $rootDir = ($outsideRoot || 0 === strpos($src, ROOT_DIRECTORY)) ? '' : ROOT_DIRECTORY . \DIRECTORY_SEPARATOR;
                        if (!file_exists($rootDir . $src)) {
                            return 0;
                Severity: Minor
                Found in vtlib/Vtiger/Functions.php - About 1 hr to fix

                Cognitive Complexity

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

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

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

                Further reading

                Method getAllModules has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                Severity: Minor
                Found in vtlib/Vtiger/Functions.php - About 35 mins to fix

                  Function recurseCopy has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function recurseCopy($src, $dest)
                      {
                          $rootDir = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR;
                          if (!file_exists($rootDir . $src)) {
                              return 0;
                  Severity: Minor
                  Found in vtlib/Vtiger/Functions.php - About 35 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 parseBytes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function parseBytes($str): float
                      {
                          if (is_numeric($str)) {
                              return (float) $str;
                          }
                  Severity: Minor
                  Found in vtlib/Vtiger/Functions.php - About 35 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

                  Avoid too many return statements within this method.
                  Open

                          return $id ? \App\Cache::get('moduleTabById', $id) : null;
                  Severity: Major
                  Found in vtlib/Vtiger/Functions.php - About 30 mins to fix

                    The method getAllModules() has an NPath complexity of 1464. The configured NPath complexity threshold is 200.
                    Open

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                        {
                            if (\App\Cache::has('moduleTabs', 'all')) {
                                $moduleList = \App\Cache::get('moduleTabs', 'all');
                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    NPathComplexity

                    Since: 0.1

                    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                    Example

                    class Foo {
                        function bar() {
                            // lots of complicated code
                        }
                    }

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

                    The method throwNewException() has an NPath complexity of 2340. The configured NPath complexity threshold is 200.
                    Open

                        public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
                        {
                            if (!headers_sent() && \App\Config::security('cspHeaderActive')) {
                                header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    NPathComplexity

                    Since: 0.1

                    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                    Example

                    class Foo {
                        function bar() {
                            // lots of complicated code
                        }
                    }

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

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

                        public static function getCRMRecordMetadata($mixedid)
                        {
                            $multimode = \is_array($mixedid);
                    
                            $ids = $multimode ? $mixedid : [$mixedid];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 throwNewException() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10.
                    Open

                        public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
                        {
                            if (!headers_sent() && \App\Config::security('cspHeaderActive')) {
                                header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getAllModules() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10.
                    Open

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                        {
                            if (\App\Cache::has('moduleTabs', 'all')) {
                                $moduleList = \App\Cache::get('moduleTabs', 'all');
                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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

                    Reduce the number of returns of this function 5, down to the maximum allowed 3.
                    Open

                        public static function getModuleData($mixed)
                    Severity: Major
                    Found in vtlib/Vtiger/Functions.php by sonar-php

                    Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

                    Noncompliant Code Example

                    With the default threshold of 3:

                    function myFunction(){ // Noncompliant as there are 4 return statements
                      if (condition1) {
                        return true;
                      } else {
                        if (condition2) {
                          return false;
                        } else {
                          return true;
                        }
                      }
                      return false;
                    }
                    

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

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 36 to the 15 allowed.
                    Open

                        public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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

                    Class "Functions" has 24 methods, which is greater than 20 authorized. Split it into smaller classes.
                    Open

                    class Functions
                    Severity: Major
                    Found in vtlib/Vtiger/Functions.php by sonar-php

                    A class that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor the class into smaller ones which focus on well defined topics.

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

                    class Functions
                    {
                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                        {
                            if (\App\Cache::has('moduleTabs', 'all')) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CouplingBetweenObjects

                    Since: 1.1.0

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

                    Example

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

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

                    Missing class import via use statement (line '85', column '16').
                    Open

                            $rows = (new \App\Db\Query())->from('vtiger_tab')->all();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getAllModules has a boolean flag argument $colorActive, which is a certain sign of a Single Responsibility Principle violation.
                    Open

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 '417', column '17').
                    Open

                                foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootDir . $src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST) as $filename => $file) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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

                    Duplicated array key , first declared at line 198.
                    Open

                            $popup_toHtml = [
                                '"' => '&quot;',
                                "'" => '&#039;',
                            ];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    DuplicatedArrayKey

                    Defining another value for the same key in an array literal overrides the previous key/value, which makes it effectively an unused code. If it's known from the beginning that the key will have different value, there is usually no point in defining first one.

                    Example

                    function createArray() {
                        return [
                            'non-associative 0element', // not applied
                            0 => 'associative 0-element', // applied
                            false => 'associative 0-element', // applied
                            'foo' => 'bar', // not applied
                            "foo" => 'baz', // applied
                        ];
                    }

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

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

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 '227', column '15').
                    Open

                            return (new \App\Db\Query())->select([$fieldName])->from($tableName)->where([$idName => $id])->scalar();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    MissingImport

                    Since: 2.7.0

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

                    Example

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

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

                    Missing class import via use statement (line '365', column '19').
                    Open

                                    $viewer = new \Vtiger_Viewer();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    MissingImport

                    Since: 2.7.0

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

                    Example

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

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

                    Missing class import via use statement (line '380', column '15').
                    Open

                                    throw new \App\Exceptions\AppException($message['message']);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    MissingImport

                    Since: 2.7.0

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

                    Example

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

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

                    Missing class import via use statement (line '452', column '28').
                    Open

                            foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getAllModules has a boolean flag argument $showRestricted, which is a certain sign of a Single Responsibility Principle violation.
                    Open

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 '132', column '18').
                    Open

                                $query = (new \App\Db\Query())
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    MissingImport

                    Since: 2.7.0

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

                    Example

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

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

                    Missing class import via use statement (line '339', column '14').
                    Open

                                throw new \App\Exceptions\ApiException($message, 401);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getAllModules has a boolean flag argument $presence, which is a certain sign of a Single Responsibility Principle violation.
                    Open

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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

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

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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

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

                        public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 '382', column '14').
                    Open

                                throw new \App\Exceptions\AppException($message);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getModuleFieldId has a boolean flag argument $onlyactive, which is a certain sign of a Single Responsibility Principle violation.
                    Open

                        public static function getModuleFieldId($moduleId, $mixed, $onlyactive = true)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 '23', column '17').
                    Open

                                $rows = (new \App\Db\Query())->from('vtiger_tab')->all();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    MissingImport

                    Since: 2.7.0

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

                    Example

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

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

                    Missing class import via use statement (line '417', column '48').
                    Open

                                foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootDir . $src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST) as $filename => $file) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    MissingImport

                    Since: 2.7.0

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

                    Example

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

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

                    Missing class import via use statement (line '452', column '59').
                    Open

                            foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 fromHtmlPopup has a boolean flag argument $encode, which is a certain sign of a Single Responsibility Principle violation.
                    Open

                        public static function fromHtmlPopup($string, $encode = true)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 '342', column '20').
                    Open

                                $response = new \Vtiger_Response();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 recurseDelete has a boolean flag argument $outsideRoot, which is a certain sign of a Single Responsibility Principle violation.
                    Open

                        public static function recurseDelete($src, $outsideRoot = false): int
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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

                    Avoid using static access to class '\App\Fields\Currency' in method 'getConversionRateInfo'.
                    Open

                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getAllModules'.
                    Open

                                    if (!\App\Cache::has('moduleTabById', $row['tabid'])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getModuleData'.
                    Open

                                return \App\Cache::get('moduleTabByName', $name);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getCRMRecordMetadata uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                } else {
                                    $result[$id] = null;
                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Utils' in method 'getHtmlOrPlainText'.
                    Open

                            if (\App\Utils::isHtml($content)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getAllModules'.
                    Open

                                $moduleList = \App\Cache::get('moduleTabs', 'all');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Log' in method 'getModuleData'.
                    Open

                                \App\Log::error(__METHOD__ . ' - Required parameter missing');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Field' in method 'getModuleFieldId'.
                    Open

                            $field = \App\Field::getFieldInfo($mixed, $moduleId);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getArrayFromValue uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else {
                                $array = explode(',', $values);
                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Cache' in method 'getModuleData'.
                    Open

                                    return \App\Cache::get('moduleTabById', $mixed);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getModuleData'.
                    Open

                                    return \App\Cache::get('moduleTabByName', $name);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 'throwNewException'.
                    Open

                                    if (\App\Config::debug('DISPLAY_EXCEPTION_BACKTRACE') && \is_object($e)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 throwNewException uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else {
                                if (\PHP_SAPI !== 'cli') {
                                    if (\App\Config::debug('DISPLAY_EXCEPTION_BACKTRACE') && \is_object($e)) {
                                        $message = [
                                            'message' => $message,
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Cache' in method 'getAllModules'.
                    Open

                                        \App\Cache::save('moduleTabByName', $row['name'], $row);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getModuleData'.
                    Open

                            \App\Cache::save('moduleTabs', 'all', $moduleList);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    StaticAccess

                    Since: 1.4.0

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

                    Example

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

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

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

                                    echo(\Config\Debug::$EXCEPTION_ERROR_TO_SHOW ? $message : \App\Language::translate('ERR_OCCURRED_ERROR')) . PHP_EOL;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 recurseDelete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                    } else {
                                        rmdir($filename);
                                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

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

                                    $viewer->assign('MESSAGE', \Config\Debug::$EXCEPTION_ERROR_TO_SHOW ? $message : \App\Language::translate('ERR_OCCURRED_ERROR'));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 recurseDelete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else {
                                unlink($rootDir . $src);
                                ++$i;
                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 assigning values to variables in if clauses and the like (line '606', column '23').
                    Open

                        public static function getQueryParams($url): array
                        {
                            $queryParams = [];
                            if (!empty($url) && $queryStr = parse_url(htmlspecialchars_decode($url), PHP_URL_QUERY)) {
                                parse_str($queryStr, $queryParams);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    IfStatementAssignment

                    Since: 2.7.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Cache' in method 'getAllModules'.
                    Open

                                        \App\Cache::save('moduleTabById', $row['tabid'], $row);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getAllModules'.
                    Open

                                \App\Cache::save('moduleTabs', 'all', $moduleList);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Record' in method 'getCRMRecordLabel'.
                    Open

                            $label = \App\Record::getLabel($id);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Request' in method 'throwNewException'.
                    Open

                            if (\App\Request::_isAjax() && \App\Request::_isJSON()) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 throwNewException uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                } else {
                                    $trace = '';
                                    if (\App\Config::debug('DISPLAY_EXCEPTION_BACKTRACE') && \is_object($e)) {
                                        $trace = str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', "->{$e->getFile()}:{$e->getLine()}\n{$e->getTraceAsString()}");
                                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

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

                            } else {
                                $lastWorkingDay = date('Y-m-d', $date);
                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Cache' in method 'getAllModules'.
                    Open

                                    if (!\App\Cache::has('moduleTabByName', $row['name'])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getModuleData'.
                    Open

                                \App\Cache::save('moduleTabByName', $row['name'], $row);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    StaticAccess

                    Since: 1.4.0

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

                    Example

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

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

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

                                    $label = \App\Language::translateSingleMod(array_shift($params), 'Other.Exceptions');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Request' in method 'throwNewException'.
                    Open

                            if (\App\Request::_isAjax() && \App\Request::_isJSON()) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 throwNewException uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                } else {
                                    echo(\Config\Debug::$EXCEPTION_ERROR_TO_SHOW ? $message : \App\Language::translate('ERR_OCCURRED_ERROR')) . PHP_EOL;
                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

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

                            } else {
                                $value = \Settings_CurrencyUpdate_Module_Model::getCleanInstance()->getCRMConversionRate($currencyId, $defaultCurrencyId, $date);
                                $info['value'] = empty($value) ? 1.0 : round($value, 5);
                                $info['conversion'] = empty($value) ? 1.0 : round(1 / $value, 5);
                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Cache' in method 'getModuleData'.
                    Open

                                if (\App\Cache::has('moduleTabByName', $name)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getModuleData'.
                    Open

                            if ($name && \App\Cache::has('moduleTabByName', $name)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 throwNewException uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                } else {
                                    $params = explode('||', $message);
                                    $label = \App\Language::translateSingleMod(array_shift($params), 'Other.Exceptions');
                                    $params = array_pad($params, substr_count($label, '%'), '');
                                    $message = \call_user_func_array('vsprintf', [$label, $params]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

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

                            } else {
                                $unit = 'B';
                                $str = sprintf('%d ', $bytes) . $unit;
                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Cache' in method 'getModuleData'.
                    Open

                                \App\Cache::save('moduleTabById', $row['tabid'], $row);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    StaticAccess

                    Since: 1.4.0

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

                    Example

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

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

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

                                    $message = \App\Language::translateSingleMod($message, 'Other.Exceptions');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 'getMinimizationOptions'.
                    Open

                                    $return = \App\Config::developer('MINIMIZE_JS');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 arrayDiffAssocRecursive uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                    } else {
                                        $newDiff = self::arrayDiffAssocRecursive($value, $array2[$key]);
                                        if (!empty($newDiff)) {
                                            $difference[$key] = $newDiff;
                                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

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

                            } else {
                                $moduleList = [];
                                $rows = (new \App\Db\Query())->from('vtiger_tab')->all();
                                foreach ($rows as $row) {
                                    if (!\App\Cache::has('moduleTabById', $row['tabid'])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Session' in method 'throwNewException'.
                    Open

                                header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 'getMinimizationOptions'.
                    Open

                                    $return = \App\Config::developer('MINIMIZE_CSS');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getModuleData uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else {
                                $name = (string) $mixed;
                                if (\App\Cache::has('moduleTabByName', $name)) {
                                    return \App\Cache::get('moduleTabByName', $name);
                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

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

                                    $viewer->assign('HEADER_MESSAGE', \App\Language::translate($messageHeader));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Purifier' in method 'getHtmlOrPlainText'.
                    Open

                                $content = \App\Purifier::decodeHtml($content);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getModuleData'.
                    Open

                                if (\App\Cache::has('moduleTabById', $mixed)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 'throwNewException'.
                    Open

                                    if (\App\Config::debug('DISPLAY_EXCEPTION_BACKTRACE') && \is_object($e)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 getHtmlOrPlainText uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else {
                                $content = nl2br($content);
                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ElseExpression

                    Since: 1.4.0

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

                    Example

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

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

                    Avoid using static access to class '\App\Cache' in method 'getAllModules'.
                    Open

                            if (\App\Cache::has('moduleTabs', 'all')) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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\Cache' in method 'getModuleData'.
                    Open

                            return $id ? \App\Cache::get('moduleTabById', $id) : null;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 'throwNewException'.
                    Open

                            if (!headers_sent() && \App\Config::security('cspHeaderActive')) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.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 "presence" 5 times.
                    Open

                                    $row['presence'] = (int) $row['presence'];
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "crmid" 5 times.
                    Open

                                    ->select(['crmid', 'setype', 'deleted', 'smcreatorid', 'smownerid', 'createdtime', 'private'])
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "tabid" 7 times.
                    Open

                                    if (!\App\Cache::has('moduleTabById', $row['tabid'])) {
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "isentitytype" 3 times.
                    Open

                                    $row['isentitytype'] = (int) $row['isentitytype'];
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "coloractive" 3 times.
                    Open

                                    $row['coloractive'] = (int) $row['coloractive'];
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "deleted" 3 times.
                    Open

                                    ->select(['crmid', 'setype', 'deleted', 'smcreatorid', 'smownerid', 'createdtime', 'private'])
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "moduleTabByName" 7 times.
                    Open

                                    if (!\App\Cache::has('moduleTabByName', $row['name'])) {
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "Y-m-d" 5 times.
                    Open

                                $date = date('Y-m-d');
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "moduleTabs" 4 times.
                    Open

                            if (\App\Cache::has('moduleTabs', 'all')) {
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "smownerid" 3 times.
                    Open

                                    ->select(['crmid', 'setype', 'deleted', 'smcreatorid', 'smownerid', 'createdtime', 'private'])
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "moduleTabById" 6 times.
                    Open

                                    if (!\App\Cache::has('moduleTabById', $row['tabid'])) {
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "smcreatorid" 3 times.
                    Open

                                    ->select(['crmid', 'setype', 'deleted', 'smcreatorid', 'smownerid', 'createdtime', 'private'])
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "private" 3 times.
                    Open

                                    ->select(['crmid', 'setype', 'deleted', 'smcreatorid', 'smownerid', 'createdtime', 'private'])
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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 "ownedby" 3 times.
                    Open

                                    $row['ownedby'] = (int) $row['ownedby'];
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.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.

                    Call to undeclared method \App\Db\Query::from
                    Open

                            $rows = (new \App\Db\Query())->from('vtiger_tab')->all();
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Expected @param annotation for column_name to be before the @param annotation for type_of_data
                    Open

                         * *     @param string $type_of_data - current type of data of the field. It is to return the same TypeofData
                    Severity: Info
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \RecursiveIteratorIterator::getSubPathName
                    Open

                                    copy($item->getRealPath(), $dest . $iterator->getSubPathName());
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Saw unextractable annotation for comment '* @param <integer> $currencyId - id of currency for which we want to retrieve conversion rate to default currency'</integer>
                    Open

                         * @param <Integer> $currencyId - id of currency for which we want to retrieve conversion rate to default currency
                    Severity: Info
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \App\Db\Query::from
                    Open

                                $rows = (new \App\Db\Query())->from('vtiger_tab')->all();
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \App\Db\Query::select
                    Open

                                $query = (new \App\Db\Query())
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \Vtiger_Viewer::assign
                    Open

                                    $viewer->assign('HEADER_MESSAGE', \App\Language::translate($messageHeader));
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Argument 2 (str) is float but \explode() takes string
                    Open

                            $fld_value = explode('.', $value);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phan

                    Saw unextractable annotation for comment '* @return <date> - last working y'</date>
                    Open

                         * @return <Date> - last working y
                    Severity: Info
                    Found in vtlib/Vtiger/Functions.php by phan

                    Argument 1 (str) is float but \rtrim() takes string
                    Open

                                $fld_value = rtrim($value, '0');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to method getLine from undeclared class \yii\db\Exception (Did you mean class \Exception)
                    Open

                                            'trace' => str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', "-> {$e->getFile()}:{$e->getLine()}\n{$e->getTraceAsString()}"),
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \Vtiger_Viewer::assign
                    Open

                                    $viewer->assign('MESSAGE_EXPANDED', \is_array($message));
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to method getTraceAsString from undeclared class \yii\db\Exception (Did you mean class \Exception)
                    Open

                                            'trace' => str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', "-> {$e->getFile()}:{$e->getLine()}\n{$e->getTraceAsString()}"),
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \RecursiveIteratorIterator::getSubPathName
                    Open

                                    mkdir($dest . $iterator->getSubPathName(), 0755);
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Saw unextractable annotation for comment '* @return <array> - array containing:'</array>
                    Open

                         * @return <Array> - array containing:
                    Severity: Info
                    Found in vtlib/Vtiger/Functions.php by phan

                    Saw unextractable annotation for comment '* @param <date> $date'</date>
                    Open

                         * @param <Date> $date
                    Severity: Info
                    Found in vtlib/Vtiger/Functions.php by phan

                    Saw unextractable annotation for comment '* @param <date> $date - date of exchange rates, if empty then rate from yesterday'</date>
                    Open

                         * @param <Date>    $date       - date of exchange rates, if empty then rate from yesterday
                    Severity: Info
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to method getFile from undeclared class \yii\db\Exception (Did you mean class \Exception)
                    Open

                                            'trace' => str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', "-> {$e->getFile()}:{$e->getLine()}\n{$e->getTraceAsString()}"),
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

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

                                $array[] = $values;
                    Severity: Info
                    Found in vtlib/Vtiger/Functions.php by phan

                    Saw an @param annotation for column_nametable_name, but it was not found in the param list of function transformFieldTypeOfData(string $table_name, mixed $column_name, string $type_of_data)
                    Open

                         * *     @param string $column_nametable_name - columnname value from field table
                    Severity: Info
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to method error from undeclared class \App\Log
                    Open

                                \App\Log::error(__METHOD__ . ' - Required parameter missing');
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to method getMessage from undeclared class \yii\db\Exception (Did you mean class \Exception)
                    Open

                            $message = \is_object($e) ? $e->getMessage() : $e;
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to method getCode from undeclared class \yii\db\Exception (Did you mean class \Exception)
                    Open

                                        $code = $e->getCode();
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \Vtiger_Viewer::assign
                    Open

                                    $viewer->assign('MESSAGE', \Config\Debug::$EXCEPTION_ERROR_TO_SHOW ? $message : \App\Language::translate('ERR_OCCURRED_ERROR'));
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \RecursiveIteratorIterator::getSubPathName
                    Open

                                if ($item->isDir() && !file_exists($dest . $iterator->getSubPathName())) {
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Call to undeclared method \App\Db\Query::select
                    Open

                            return (new \App\Db\Query())->select([$fieldName])->from($tableName)->where([$idName => $id])->scalar();
                    Severity: Critical
                    Found in vtlib/Vtiger/Functions.php by phan

                    Avoid excessively long variable names like $crmRecordIdMetadataCache. Keep variable name length under 20.
                    Open

                        protected static $crmRecordIdMetadataCache = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    LongVariable

                    Since: 0.2

                    Detects when a field, formal or local variable is declared with a long name.

                    Example

                    class Something {
                        protected $reallyLongIntName = -3; // VIOLATION - Field
                        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                            $otherReallyLongName = -5; // VIOLATION - Local
                            for ($interestingIntIndex = 0; // VIOLATION - For
                                 $interestingIntIndex < 10;
                                 $interestingIntIndex++ ) {
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#longvariable

                    The parameter $table_name is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseParameterName

                    Since: 0.2

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

                    Example

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

                    Source

                    Avoid variables with short names like $id. Configured minimum length is 3.
                    Open

                        public static function getSingleFieldValue($tableName, $fieldName, $idName, $id)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    Avoid variables with short names like $gb. Configured minimum length is 3.
                    Open

                                $gb = $bytes / 1073741824;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    The parameter $column_name is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseParameterName

                    Since: 0.2

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

                    Example

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

                    Source

                    Avoid variables with short names like $id. Configured minimum length is 3.
                    Open

                        public static function clearCacheMetaDataRecord($id)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    Avoid variables with short names like $i. Configured minimum length is 3.
                    Open

                            $i = 0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    The parameter $type_of_data is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseParameterName

                    Since: 0.2

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

                    Example

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

                    Source

                    Avoid variables with short names like $id. Configured minimum length is 3.
                    Open

                        public static function getCRMRecordLabel($id, $default = '')
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    Avoid variables with short names like $e. Configured minimum length is 3.
                    Open

                        public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    Avoid variables with short names like $mb. Configured minimum length is 3.
                    Open

                                $mb = $bytes / 1048576;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    Avoid variables with short names like $i. Configured minimum length is 3.
                    Open

                            $i = 0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    Avoid variables with short names like $id. Configured minimum length is 3.
                    Open

                            $id = $name = null;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

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

                            if (is_numeric($mixed)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    return \App\Cache::get('moduleTabByName', $name);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        protected static $crmRecordIdMetadataCache = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param int $id
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (isset(static::$crmRecordIdMetadataCache[$id])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $result[$id] = self::$crmRecordIdMetadataCache[$id];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 146 characters
                    Open

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['tabid'] = (int) $row['tabid'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param array|int $mixedid
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (\App\Cache::has('moduleTabs', 'all')) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    if (!\App\Cache::has('moduleTabByName', $row['name'])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['type'] = (int) $row['type'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            foreach ($moduleList as $id => $module) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    unset($moduleList[$id]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    return \App\Cache::get('moduleTabById', $mixed);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $name = (string) $mixed;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            \App\Cache::save('moduleTabs', 'all', $moduleList);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            foreach ($ids as $id) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $query = (new \App\Db\Query())
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                while ($row = $dataReader->read()) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['private'] = (int) $row['private'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (isset(self::$crmRecordIdMetadataCache[$id])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['presence'] = (int) $row['presence'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $restrictedModules = ['Dashboard', 'ModComments'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if ($isEntityType && 0 === (int) $module['isentitytype']) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (false !== $colorActive && 1 !== (int) $module['coloractive']) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    unset($moduleList[$id]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $moduleList;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $missing = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ($missing) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $result[$id] = null;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getAllModules($isEntityType = true, $showRestricted = false, $presence = false, $colorActive = false, $ownedby = false)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                \App\Cache::save('moduleTabs', 'all', $moduleList);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (empty($mixed)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                unset(static::$crmRecordIdMetadataCache[$id]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['premium'] = (int) $row['premium'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (!$showRestricted && \in_array($module['name'], $restrictedModules)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $id = $mixed;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                \App\Cache::save('moduleTabById', $row['tabid'], $row);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $moduleList[$row['tabid']] = $row;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ($name && \App\Cache::has('moduleTabByName', $name)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        // MODULE RECORD
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Clear cache meta data for records.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    ->select(['crmid', 'setype', 'deleted', 'smcreatorid', 'smownerid', 'createdtime', 'private'])
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['smcreatorid'] = (int) $row['smcreatorid'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    self::$crmRecordIdMetadataCache[$row['crmid']] = $row;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $rows = (new \App\Db\Query())->from('vtiger_tab')->all();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (false !== $presence && (int) $module['presence'] !== $presence) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    unset($moduleList[$id]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $result = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $id = $name = null;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $rows = (new \App\Db\Query())->from('vtiger_tab')->all();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $missing[] = $id;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['crmid'] = (int) $row['crmid'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (\App\Cache::has('moduleTabByName', $name)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $moduleList = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            foreach ($rows as $row) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function clearCacheMetaDataRecord($id)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    ->from('vtiger_crmentity')
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $dataReader = $query->createCommand()->query();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (false !== $ownedby && (int) $module['ownedby'] !== $ownedby) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $id ? \App\Cache::get('moduleTabById', $id) : null;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                \App\Log::error(__METHOD__ . ' - Required parameter missing');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                \App\Cache::save('moduleTabByName', $row['name'], $row);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $ids = $multimode ? $mixedid : [$mixedid];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    ->where(['in', 'crmid', $missing]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            foreach ($ids as $id) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        \App\Cache::save('moduleTabByName', $row['name'], $row);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getModuleData($mixed)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Function gets record metadata.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if ($id && !isset(self::$crmRecordIdMetadataCache[$id])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        \App\Cache::save('moduleTabById', $row['tabid'], $row);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $moduleList[$row['tabid']] = $row;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    unset($moduleList[$id]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (\App\Cache::has('moduleTabById', $mixed)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['deleted'] = (int) $row['deleted'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $moduleList = \App\Cache::get('moduleTabs', 'all');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['tabsequence'] = (int) $row['tabsequence'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['ownedby'] = (int) $row['ownedby'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['isentitytype'] = (int) $row['isentitytype'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    unset($moduleList[$id]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                return \App\Cache::get('moduleTabByName', $name);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getCRMRecordMetadata($mixedid)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $multimode = \is_array($mixedid);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['smownerid'] = (int) $row['smownerid'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $field = null;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *                "vtiger_quotes:potentialid"=>"V",
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $moduleList = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['customized'] = (int) $row['customized'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param bool       $onlyactive
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $value;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ($encode && \is_string($string)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return preg_replace('/"/', ' ', $str);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_contactsubdetails:birthday' => 'D',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_account:email2' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Faq Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_senotesrel:crmid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ('' === $values) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $multimode ? $result : array_shift($result);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $field = \App\Field::getFieldInfo($mixed, $moduleId);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function br2nl($str)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *     @param string $table_name - tablename value from field table
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *    Now in customview and report's advance filter this field's criteria will be show like string.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_account:email1' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_leaddetails:email' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //HelpDesk Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ($field && $onlyactive && ('0' !== $field['presence'] && '2' !== $field['presence'])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $fld_value = rtrim($value, '0');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $str = preg_replace("/'/", ' ', $str);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function suppressHTMLTags($string)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *     @param string $column_nametable_name - columnname value from field table
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            static $new_field_details = [
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_activityproductrel:activityid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $array;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 147 characters
                    Open

                                        $trace = str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', "->{$e->getFile()}:{$e->getLine()}\n{$e->getTraceAsString()}");
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $viewer->assign('HEADER_MESSAGE', \App\Language::translate($messageHeader));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 132 characters
                    Open

                                    echo(\Config\Debug::$EXCEPTION_ERROR_TO_SHOW ? $message : \App\Language::translate('ERR_OCCURRED_ERROR')) . PHP_EOL;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    throw new \App\Exceptions\AppException($message['message']);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string $dest
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                foreach ($rows as $row) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    if (!\App\Cache::has('moduleTabById', $row['tabid'])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $row['coloractive'] = (int) $row['coloractive'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                return false;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return array
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return preg_replace(['/</', '/>/', '/"/'], ['&lt;', '&gt;', '&quot;'], $string);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string $idName    - idname which is the name of the entity id in the table like, inoviceid, etc.,
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $field = $table_name . ':' . $column_name;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_contactdetails:parentid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_seproductsrel:crmid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $params = explode('||', $message);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $label = \App\Language::translateSingleMod(array_shift($params), 'Other.Exceptions');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        $message = [
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param bool   $outsideRoot
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function recurseDelete($src, $outsideRoot = false): int
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param int|string $mixed
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $string = addslashes(str_replace(array_values($popup_toHtml), array_keys($popup_toHtml), $string));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getSingleFieldValue($tableName, $fieldName, $idName, $id)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *        fieldlabel         | typeofdata | tablename            | columnname       |
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Documents Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_senotesrel:crmid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_campaign_records:crmid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (isset($new_field_details[$field])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $type_of_data = $new_field_details[$field];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 173 characters
                    Open

                                header("content-security-policy: default-src 'self' 'nonce-" . \App\Session::get('CSP_TOKEN') . "'; object-src 'none';base-uri 'self'; frame-ancestors 'self';");
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (!\is_array($message)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                throw new \App\Exceptions\ApiException($message, 401);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $trace = '';
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string $src
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $dest = $dest . \DIRECTORY_SEPARATOR;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $dest = $rootDir . $dest;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    copy($item->getRealPath(), $dest . $iterator->getSubPathName());
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $message = \App\Language::translateSingleMod($message, 'Other.Exceptions');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $message = \call_user_func_array('vsprintf', [$label, $params]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $response->emit();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $viewer->view('Exceptions/ExceptionError.tpl', 'Vtiger');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string $src
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return int
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $rootDir = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 190 characters
                    Open

                            foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getCRMRecordLabel($id, $default = '')
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return empty($label) ? $default : $label;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function formatDecimal($value)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $value = rtrim($fld_value, '.');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                "'" => '&#039;',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Lead Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_pricebookproductrel:pricebookid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getArrayFromValue($values)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $array = explode(',', $values);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (!headers_sent() && \App\Config::security('cspHeaderActive')) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (\PHP_SAPI !== 'cli') {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 154 characters
                    Open

                                            'trace' => str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', "-> {$e->getFile()}:{$e->getLine()}\n{$e->getTraceAsString()}"),
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $viewer = new \Vtiger_Viewer();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $rootDir = ($outsideRoot || 0 === strpos($src, ROOT_DIRECTORY)) ? '' : ROOT_DIRECTORY . \DIRECTORY_SEPARATOR;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    mkdir($dest . $iterator->getSubPathName(), 0755);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getModuleFieldId($moduleId, $mixed, $onlyactive = true)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        // Utility
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $fld_value = explode('.', $value);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                '"' => '&quot;',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $string;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $str = preg_replace("/(\r\n)/", '\\r\\n', $str);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *     return string $type_of_data - If the string matched with the $new_field_details array then the Changed
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_leaddetails:secondaryemail' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_troubletickets:product_id' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Related List Entries(For Report Module)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        $code = $e->getCode();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getHtmlOrPlainText(string $content)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * The function copies files.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $i;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return bool|int
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $field ? $field['fieldid'] : false;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $popup_toHtml = [
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return (new \App\Db\Query())->select([$fieldName])->from($tableName)->where([$idName => $id])->scalar();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_contactdetails:secondaryemail' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Product Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_products:parentid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Vendor Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_vendor:email' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $type_of_data;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $params = array_pad($params, substr_count($label, '%'), '');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $label = \App\Record::getLabel($id);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $content;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *     @param string $type_of_data - current type of data of the field. It is to return the same TypeofData
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Function to delete files and dirs.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *     EXAMPLE: If you have a field entry like this:
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (!file_exists($rootDir . $src)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                return 0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Account Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootDir . $src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST) as $filename => $file) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_activityproductrel:productid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 207 characters
                    Open

                                foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootDir . $src, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST) as $filename => $file) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_campaign_records:campaignid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_pricebookproductrel:productid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                return 0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                return [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (\is_object($e)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 144 characters
                    Open

                                    $viewer->assign('MESSAGE', \Config\Debug::$EXCEPTION_ERROR_TO_SHOW ? $message : \App\Language::translate('ERR_OCCURRED_ERROR'));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                trigger_error(print_r($message, true), E_USER_ERROR);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Get html rr plain text.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                rmdir($rootDir . $src);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                ++$i;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *        Potential Name     | I~O        | vtiger_quotes        | potentialid      |
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Contacts Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    throw new $message();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (\is_array($message)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    if ($file->isFile()) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        ++$i;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param int|string $moduleId
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function fromHtmlPopup($string, $encode = true)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            ];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *            if the  field is not matched with the $new_field_details array.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            //Add the field details in this array if you want to change the advance filter field details
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_contactdetails:email' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_troubletickets:parent_id' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                //Campaign Related Fields
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_seproductsrel:productid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                return $values;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $response->setEmitType(\Vtiger_Response::$EMIT_JSON);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $response->setError($code, $message, $trace);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $viewer->assign('MESSAGE', \Config\Debug::$EXCEPTION_ERROR_TO_SHOW ? $message : \App\Language::translate('ERR_OCCURRED_ERROR'));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ($die) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string $content
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (\App\Utils::isHtml($content)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function recurseCopy($src, $dest)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ($dest && '/' !== substr($dest, -1) && '\\' !== substr($dest, -1)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**    Function used to retrieve a single field value from database.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_account:parentid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            //If the Fields details does not match with the array, then we return the same typeofdata
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (false === strpos($values, ',')) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $array[] = $values;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        $trace = str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', "->{$e->getFile()}:{$e->getLine()}\n{$e->getTraceAsString()}");
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    http_response_code($code);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $viewer->assign('MESSAGE_EXPANDED', \is_array($message));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $content = \App\Purifier::decodeHtml($content);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (is_dir($rootDir . $src)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $i = 0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Function to gets mudule field ID.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param int    $id        - entity id
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param mixed $column_name
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_products:discontinued' => 'C',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_pricebook:currency_id' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function throwNewException($e, $die = true, $messageHeader = 'LBL_ERROR')
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $message = \is_object($e) ? $e->getMessage() : $e;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                            'trace' => str_replace(ROOT_DIRECTORY . \DIRECTORY_SEPARATOR, '', "-> {$e->getFile()}:{$e->getLine()}\n{$e->getTraceAsString()}"),
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        unlink($filename);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                } elseif (!$item->isDir()) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    ++$i;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string $tableName - tablename from which we will retrieve the field value
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *                          return mixed $fieldval  - field value of the needed fieldname from database will be returned
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**     function used to change the Type of Data for advanced filters in custom view and Reports.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *           typeofdata will return, else the same typeofdata will return.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *            -------------------+------------+----------------------+------------------+
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_products:vendor_id' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_faq:product_id' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_senotesrel:notesid' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $code = 500;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (false === strpos($message, '||')) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (!empty($fld_value[1])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string $fieldName - fieldname to which we want to get the value from database
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 124 characters
                    Open

                         *                          return mixed $fieldval  - field value of the needed fieldname from database will be returned
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * *     Then put an entry in $new_field_details  like this:
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                'vtiger_campaign:product_id' => 'V',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            ];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (\is_array($values)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (\App\Request::_isAjax() && \App\Request::_isJSON()) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $response->setException($e);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    if (\App\Config::debug('DISPLAY_EXCEPTION_BACKTRACE') && \is_object($e)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return string
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        rmdir($filename);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (is_numeric($str)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return (float) $bytes;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $str = sprintf('%d ', round($bytes / 1024)) . $unit;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ('Sat' === date('D', $date)) { // switch to friday the day before
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (empty($date)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ('API' === \App\Process::$requestMode) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                            'message' => $message,
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        ];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    echo(\Config\Debug::$EXCEPTION_ERROR_TO_SHOW ? $message : \App\Language::translate('ERR_OCCURRED_ERROR')) . PHP_EOL;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (\is_object($message)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $i;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (!file_exists($rootDir . $src)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if ($item->isDir() && !file_exists($dest . $iterator->getSubPathName())) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $unit = 'MB';
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                case 'css':
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } elseif ('Sun' === date('D', $date)) { // switch to friday two days before
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *                 conversion - 1 $currencyId -> default currency
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $response = new \Vtiger_Response();
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    if (\App\Config::debug('DISPLAY_EXCEPTION_BACKTRACE') && \is_object($e)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                throw new \App\Exceptions\AppException($message);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $content = nl2br($content);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $i = 0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                unlink($rootDir . $src);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return float
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return string
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } elseif ($bytes >= 1024) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            switch ($type) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Checks if given date is working day, if not returns last working day.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param <Date>    $date       - date of exchange rates, if empty then rate from yesterday
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $defaultCurrencyId = \App\Fields\Currency::getDefault()['id'];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $info['conversion'] = empty($value) ? 1.0 : round(1 / $value, 5);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    case 'g':
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    case 'k':
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $date = strtotime($date);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $lastWorkingDay = date('Y-m-d', $date);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ($currencyId == $defaultCurrencyId) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                parse_str($queryStr, $queryParams);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $str = sprintf($gb >= 10 ? '%d ' : '%.2f ', $gb) . $unit;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $return = \App\Config::developer('MINIMIZE_JS');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getLastWorkingDay($date)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    Line exceeds 120 characters; contains 141 characters
                    Open

                                $value = \Settings_CurrencyUpdate_Module_Model::getCleanInstance()->getCRMConversionRate($currencyId, $defaultCurrencyId, $date);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Getting parameters from URL.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                if (\is_array($value)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    case 'm':
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $unit = 'GB';
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getConversionRateInfo($currencyId, $date = '')
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $info['value'] = 1.0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getQueryParams($url): array
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return <Date> - last working y
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return <Array> - array containing:
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *                 date - date of rate
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $info = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $date = self::getLastWorkingDay($yesterday);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $bytes = (float) ($regs[1]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                switch (strtolower($regs[2])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        $bytes *= 1073741824;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param mixed       $bytes
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $gb = $bytes / 1073741824;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param <Date> $date
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $lastWorkingDay = date('Y-m-d', strtotime('-1 day', $date));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Function that returns conversion info from default system currency to chosen one.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    if (!isset($array2[$key]) || !\is_array($array2[$key])) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param mixed $str
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    case 'gb':
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        break;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $unit = 'B';
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                case 'js':
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $lastWorkingDay = date('Y-m-d', strtotime('-2 day', $date));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $info;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function arrayDiffAssocRecursive($array1, $array2)
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $difference = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            foreach ($array1 as $key => $value) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                return (float) $str;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        $bytes *= 1048576;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $unit = 'KB';
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    break;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @return array
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (!empty($url) && $queryStr = parse_url(htmlspecialchars_decode($url), PHP_URL_QUERY)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    case 'kb':
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        $bytes *= 1024;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $mb = $bytes / 1048576;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $return = \App\Config::developer('MINIMIZE_CSS');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    break;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $return;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param <Integer> $currencyId - id of currency for which we want to retrieve conversion rate to default currency
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $info['conversion'] = 1.0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $info['value'] = empty($value) ? 1.0 : round($value, 5);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $queryParams = [];
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $queryParams;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function parseBytes($str): float
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    default:
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $value = \Settings_CurrencyUpdate_Module_Model::getCleanInstance()->getCRMConversionRate($currencyId, $defaultCurrencyId, $date);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                            $difference[$key] = $newDiff;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        break;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        break;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string|null $unit
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         */
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function showBytes($bytes, &$unit = null): string
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $bytes = self::parseBytes($bytes);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if ($bytes >= 1073741824) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                default:
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    break;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $lastWorkingDay;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $yesterday = date('Y-m-d', strtotime('-1 day'));
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        if (!empty($newDiff)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    $difference[$key] = $value;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Parse bytes.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $bytes = 0;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    case 'mb':
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        break;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $str;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $date = date('Y-m-d');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *                 value - conversion 1 default currency -> $currencyId
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        $newDiff = self::arrayDiffAssocRecursive($value, $array2[$key]);
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                } elseif (!\array_key_exists($key, $array2) || $array2[$key] !== $value) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         *
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (preg_match('/([0-9\.]+)\s*([a-z]*)/i', $str, $regs)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $str = sprintf($mb >= 10 ? '%d ' : '%.2f ', $mb) . $unit;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        public static function getMinimizationOptions($type = 'js')
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        /**
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * @param string|null $url
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                        $difference[$key] = $value;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                    } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            return $difference;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                         * Show bytes.
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } elseif ($bytes >= 1048576) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                                $str = sprintf('%d ', $bytes) . $unit;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            if (empty($date)) {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            $info['date'] = $date;
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                            } else {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        }
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

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

                        {
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpcodesniffer

                    The variable $fld_value is not named in camelCase.
                    Open

                        public static function formatDecimal($value)
                        {
                            $fld_value = explode('.', $value);
                            if (!empty($fld_value[1])) {
                                $fld_value = rtrim($value, '0');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $popup_toHtml is not named in camelCase.
                    Open

                        public static function fromHtmlPopup($string, $encode = true)
                        {
                            $popup_toHtml = [
                                '"' => '&quot;',
                                "'" => '&#039;',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $fld_value is not named in camelCase.
                    Open

                        public static function formatDecimal($value)
                        {
                            $fld_value = explode('.', $value);
                            if (!empty($fld_value[1])) {
                                $fld_value = rtrim($value, '0');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $table_name is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $column_name is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $new_field_details is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $fld_value is not named in camelCase.
                    Open

                        public static function formatDecimal($value)
                        {
                            $fld_value = explode('.', $value);
                            if (!empty($fld_value[1])) {
                                $fld_value = rtrim($value, '0');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $type_of_data is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $popup_toHtml is not named in camelCase.
                    Open

                        public static function fromHtmlPopup($string, $encode = true)
                        {
                            $popup_toHtml = [
                                '"' => '&quot;',
                                "'" => '&#039;',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $popup_toHtml is not named in camelCase.
                    Open

                        public static function fromHtmlPopup($string, $encode = true)
                        {
                            $popup_toHtml = [
                                '"' => '&quot;',
                                "'" => '&#039;',
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $type_of_data is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $new_field_details is not named in camelCase.
                    Open

                        public static function transformFieldTypeOfData($table_name, $column_name, $type_of_data)
                        {
                            $field = $table_name . ':' . $column_name;
                            //Add the field details in this array if you want to change the advance filter field details
                    
                    
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $fld_value is not named in camelCase.
                    Open

                        public static function formatDecimal($value)
                        {
                            $fld_value = explode('.', $value);
                            if (!empty($fld_value[1])) {
                                $fld_value = rtrim($value, '0');
                    Severity: Minor
                    Found in vtlib/Vtiger/Functions.php by phpmd

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    There are no issues that match your filters.

                    Category
                    Status