YetiForceCompany/YetiForceCRM

View on GitHub
vtlib/Vtiger/FieldBasic.php

Summary

Maintainability
C
1 day
Test Coverage
B
86%

Function __create has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function __create($blockInstance)
    {
        $db = \App\Db::getInstance();
        $this->block = $blockInstance;
        $moduleInstance = $this->getModuleInstance();
Severity: Minor
Found in vtlib/Vtiger/FieldBasic.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

Method __create has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __create($blockInstance)
    {
        $db = \App\Db::getInstance();
        $this->block = $blockInstance;
        $moduleInstance = $this->getModuleInstance();
Severity: Major
Found in vtlib/Vtiger/FieldBasic.php - About 3 hrs to fix

    File FieldBasic.php has 279 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/FieldBasic.php - About 2 hrs to fix

      The class FieldBasic has 33 fields. Consider redesigning FieldBasic to keep the number of fields under 15.
      Open

      class FieldBasic
      {
          /** ID of this field instance */
          public $id;
          public $name;
      Severity: Minor
      Found in vtlib/Vtiger/FieldBasic.php by phpmd

      TooManyFields

      Since: 0.1

      Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

      Example

      class Person {
         protected $one;
         private $two;
         private $three;
         [... many more fields ...]
      }

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

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

          public function initialize($valuemap, $module = false, $blockInstance = false)
          {
              $this->id = (int) $valuemap['fieldid'];
              $this->tabid = (int) $valuemap['tabid'];
              $this->name = $valuemap['fieldname'];
      Severity: Minor
      Found in vtlib/Vtiger/FieldBasic.php - About 1 hr to fix

        The class FieldBasic has 49 public methods and attributes. Consider reducing the number of public items to less than 45.
        Open

        class FieldBasic
        {
            /** ID of this field instance */
            public $id;
            public $name;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        ExcessivePublicCount

        Since: 0.1

        A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

        Example

        public class Foo {
            public $value;
            public $something;
            public $var;
            // [... more more public attributes ...]
        
            public function doWork() {}
            public function doMoreWork() {}
            public function doWorkAgain() {}
            // [... more more public methods ...]
        }

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

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

            public function __delete()
            {
                Profile::deleteForField($this);
                $db = \App\Db::getInstance();
                $db->createCommand()->delete('vtiger_field', ['fieldid' => $this->id])->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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

        The method __create() has an NPath complexity of 2304. The configured NPath complexity threshold is 200.
        Open

            public function __create($blockInstance)
            {
                $db = \App\Db::getInstance();
                $this->block = $blockInstance;
                $moduleInstance = $this->getModuleInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 __create() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
        Open

            public function __create($blockInstance)
            {
                $db = \App\Db::getInstance();
                $this->block = $blockInstance;
                $moduleInstance = $this->getModuleInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CyclomaticComplexity

        Since: 0.1

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

        Example

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

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

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

            public function __create($blockInstance)
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by sonar-php

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

        See

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

            public function save($blockInstance = false)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 '122', column '18').
        Open

                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 initialize has a boolean flag argument $blockInstance, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function initialize($valuemap, $module = false, $blockInstance = false)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 initialize has a boolean flag argument $module, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function initialize($valuemap, $module = false, $blockInstance = false)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 '108', column '18').
        Open

                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        MissingImport

        Since: 2.7.0

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

        Example

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

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

        Avoid using static access to class 'vtlib\Profile' in method '__delete'.
        Open

                Profile::deleteForField($this);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'setMassEditable'.
        Open

                \App\Log::trace("Updated masseditable information of $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

        Avoid using static access to class '\App\User' in method 'clearCache'.
        Open

                \App\Cache::delete('App\Field::getFieldsPermissions' . \App\User::getCurrentUserId(), $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::delete('AllFieldForModule', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::delete('getRelatedFieldForModule', 'all');
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'setHelpInfo'.
        Open

                \App\Log::trace("Updated help information of $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::staticDelete('ModuleFields', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

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

                $db = \App\Db::getInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

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

                    $moduleName = \App\Module::getModuleName($this->tabid);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::delete('FieldInfoById', $this->id);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'setSummaryField'.
        Open

                \App\Log::trace("Updated summaryfield information of $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 '__create'.
        Open

                \App\Log::trace("Creating field $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

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

                $db = \App\Db::getInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 '__update'.
        Open

                \App\Log::trace("Updating Field $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 save uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $this->__create($blockInstance);
                }
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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\Json' in method 'initialize'.
        Open

                    $this->anonymizationTarget = \App\Json::decode($valuemap['anonymization_target']);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'vtlib\Block' in method 'initialize'.
        Open

                $this->block = $blockInstance ?: Block::getInstance($valuemap['block'], $module);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 __create uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $this->quicksequence = null;
                }
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'vtlib\Profile' in method '__create'.
        Open

                Profile::initForField($this);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::staticDelete('module', $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::delete('BlocksForModule', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::delete('ModuleFieldInfosByName', $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::delete('ModuleFieldInfosByColumn', $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'vtlib\Utils' in method '__create'.
        Open

                    Utils::addColumn($this->table, $this->column, $this->columntype);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 '__delete'.
        Open

                \App\Log::trace("Deleteing Field $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 'clearCache'.
        Open

                \App\Cache::delete('App\Field::getFieldsPermissions' . \App\User::getCurrentUserId(), $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 "tabid" 4 times.
        Open

                $this->tabid = (int) $valuemap['tabid'];
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.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 "block" 3 times.
        Open

                $this->block = $blockInstance ?: Block::getInstance($valuemap['block'], $module);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.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 "summaryfield" 3 times.
        Open

                $this->summaryfield = (int) $valuemap['summaryfield'];
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.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 "masseditable" 3 times.
        Open

                $this->masseditable = (int) $valuemap['masseditable'];
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.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 "sequence" 3 times.
        Open

                $this->sequence = (int) $valuemap['sequence'];
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.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 "vtiger_field" 7 times.
        Open

                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.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 "quickcreatesequence" 3 times.
        Open

                $this->quicksequence = (int) $valuemap['quickcreatesequence'];
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.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 "helpinfo" 3 times.
        Open

                $this->helpinfo = $valuemap['helpinfo'];
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.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 "fieldid" 6 times.
        Open

                $this->id = (int) $valuemap['fieldid'];
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by sonar-php

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

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

        Noncompliant Code Example

        With the default threshold of 3:

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

        Compliant Solution

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

        Exceptions

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

        Reference to undeclared property \vtlib\FieldBasic->module
        Open

                } elseif (!empty($this->module)) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Db::getInstance()->createCommand()
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Cache::delete('App\Field::getFieldsPermissions' . \App\User::getCurrentUserId(), $this->getModuleName());
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Default value for \vtlib\Block $blockInstance can't be false
        Open

            public function initialize($valuemap, $module = false, $blockInstance = false)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                        $indexes = $db->getSchema()->getTableIndexes($this->table, true);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Log::trace("Creating field $this->name ... DONE", __METHOD__);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                $db->createCommand()->delete('vtiger_field', ['fieldid' => $this->id])->execute();
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                    $indexes = $db->getSchema()->getTableIndexes($this->table, true);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Assigning 'string\x28100\x29' to property but \vtlib\FieldBasic->columntype is false
        Open

                    $this->columntype = 'string(100)';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                            $db->createCommand()->createIndex("{$this->table}_{$this->column}_idx", $this->table, $this->column)->execute();
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Log::trace("Updating Field $this->name ... DONE", __METHOD__);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Db::getInstance()->createCommand()
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Argument 2 (key) is false but \App\Cache::delete() takes string defined at /code/app/Cache.php:105
        Open

                \App\Cache::delete('AllFieldForModule', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Saw possibly unextractable annotation for a fragment of comment '* @param int Summaryfield value': after int, did not see an element name (will guess based on comment order)
        Open

             * @param int Summaryfield value
        Severity: Info
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Log::trace("Updated summaryfield information of $this->name ... DONE", __METHOD__);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Assigning int to property but \vtlib\FieldBasic->tabid is false
        Open

                $this->tabid = (int) $valuemap['tabid'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
        Open

                            $db->createCommand()->createIndex("{$this->table}_{$this->column}_idx", $this->table, $this->column)->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Log::trace("Updated masseditable information of $this->name ... DONE", __METHOD__);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Saw possibly unextractable annotation for a fragment of comment '* @param vtlib\Block Instance of the block to use': after vtlib\Block, did not see an element name (will guess based on comment order)
        Open

             * @param vtlib\Block Instance of the block to use
        Severity: Info
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Assigning string to property but \vtlib\FieldBasic->column is false
        Open

                    $this->column = strtolower($this->name);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Argument 1 (tableName) is false but \vtlib\Utils::addColumn() takes string defined at /code/vtlib/Vtiger/Utils.php:141
        Open

                    Utils::addColumn($this->table, $this->column, $this->columntype);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Saw possibly unextractable annotation for a fragment of comment '* @param string Help text (content)': after string, did not see an element name (will guess based on comment order)
        Open

             * @param string Help text (content)
        Severity: Info
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Argument 2 (key) is int but \App\Cache::delete() takes string defined at /code/app/Cache.php:105
        Open

                \App\Cache::delete('FieldInfoById', $this->id);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Assigning int to property but \vtlib\FieldBasic->sequence is false
        Open

                $this->sequence = (int) $valuemap['sequence'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Assigning int to property but \vtlib\FieldBasic->quicksequence is false
        Open

                $this->quicksequence = (int) $valuemap['quickcreatesequence'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                            $db->createCommand()->dropIndex($nameIndex, $this->table)->execute();
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Argument 3 (criteria) is false but \vtlib\Utils::addColumn() takes array|string defined at /code/vtlib/Vtiger/Utils.php:141
        Open

                    Utils::addColumn($this->table, $this->column, $this->columntype);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                $db->createCommand()->insert('vtiger_field', [
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Log::trace("Updated help information of $this->name ... DONE", __METHOD__);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Db::getInstance()->createCommand()
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Assigning 0|float|int to property but \vtlib\FieldBasic->quicksequence is false
        Open

                        $this->quicksequence = $this->__getNextQuickCreateSequence();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Argument 2 (columnName) is false but \vtlib\Utils::addColumn() takes string defined at /code/vtlib/Vtiger/Utils.php:141
        Open

                    Utils::addColumn($this->table, $this->column, $this->columntype);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Call to undeclared method \vtlib\FieldBasic::getRangeValues
        Open

                    $this->maximumlength = $this->getRangeValues();
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Assigning null to property but \vtlib\FieldBasic->quicksequence is false
        Open

                    $this->quicksequence = null;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
        Open

                        $nameIndex = "{$this->table}_{$this->column}_idx";
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Saw possibly unextractable annotation for a fragment of comment '* @param int Masseditable value': after int, did not see an element name (will guess based on comment order)
        Open

             * @param int Masseditable value
        Severity: Info
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Argument 2 (key) is false but \App\Cache::staticDelete() takes string defined at /code/app/Cache.php:169
        Open

                \App\Cache::staticDelete('ModuleFields', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                \App\Log::trace("Deleteing Field $this->name ... DONE", __METHOD__);
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Argument 1 (tabId) is false but \App\Module::getModuleName() takes int defined at /code/app/Module.php:129
        Open

                    $moduleName = \App\Module::getModuleName($this->tabid);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Argument 2 (key) is false but \App\Cache::delete() takes string defined at /code/app/Cache.php:105
        Open

                \App\Cache::delete('BlocksForModule', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Assigning 0|float|int to property but \vtlib\FieldBasic->sequence is false
        Open

                    $this->sequence = $this->__getNextSequence();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

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

                    $db->createCommand()->delete('vtiger_fieldmodulerel', ['fieldid' => $this->id])->execute();
        Severity: Critical
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
        Open

                    $nameIndex = "{$this->table}_{$this->column}_idx";
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Reference to undeclared property \vtlib\FieldBasic->module
        Open

                    $moduleName = $this->module->getName();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phan

        Saw possibly unextractable annotation for a fragment of comment '* @param vtlib\Block Instance of block to which this field should be added': after vtlib\Block, did not see an element name (will guess based on comment order)
        Open

             * @param vtlib\Block Instance of block to which this field should be added
        Severity: Info
        Found in vtlib/Vtiger/FieldBasic.php by phan

        The property $__cacheSchemaChanges is not named in camelCase.
        Open

        class FieldBasic
        {
            /** ID of this field instance */
            public $id;
            public $name;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CamelCasePropertyName

        Since: 0.2

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

        Example

        class ClassName {
            protected $property_name;
        }

        Source

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

                $db = \App\Db::getInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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 property $header_field is not named in camelCase.
        Open

        class FieldBasic
        {
            /** ID of this field instance */
            public $id;
            public $name;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CamelCasePropertyName

        Since: 0.2

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

        Example

        class ClassName {
            protected $property_name;
        }

        Source

        The property $info_type is not named in camelCase.
        Open

        class FieldBasic
        {
            /** ID of this field instance */
            public $id;
            public $name;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CamelCasePropertyName

        Since: 0.2

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

        Example

        class ClassName {
            protected $property_name;
        }

        Source

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

                $db = \App\Db::getInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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

            public $id;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.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

        Property name "$__cacheSchemaChanges" should not be prefixed with an underscore to indicate visibility
        Open

            public static $__cacheSchemaChanges = [];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $tabid = false;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                $this->label = $valuemap['fieldlabel'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                $this->header_field = $valuemap['header_field'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                return 0;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

             * @param \vtlib\Block $blockInstance Instance of block to which this field belongs
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    return $maxSeq + 1;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            /** ID of this field instance */
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $id;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $typeofdata = 'V~O';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $maximumlength;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $fieldparams = '';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $icon = '';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                $this->id = (int) $valuemap['fieldid'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->generatedtype = (int) $valuemap['generatedtype'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $columntype = false;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $tabindex = 0;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Initialize this instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->name = $valuemap['fieldname'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->visible = (int) $valuemap['visible'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->color = $valuemap['color'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $table = false;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $displaytype = 1;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                $this->masseditable = (int) $valuemap['masseditable'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->maxlengthtext = (int) $valuemap['maxlengthtext'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->fieldparams = $valuemap['fieldparams'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public function __getNextSequence()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $summaryfield = 0;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $readonly = 0;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $defaultvalue = '';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $quickcreate = 1;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $info_type = 'BAS';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @var string[] Anonymization targets form field ex. logs.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param mixed        $module        Mixed id or name of the module
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Get next sequence id to use within a block for this instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    ->max('sequence');
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                return 0;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $maxwidthcolumn = 0;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $visible = 0;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $color = '';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->table = $valuemap['tablename'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->maximumlength = $valuemap['maximumlength'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->readonly = (int) $valuemap['readonly'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->summaryfield = (int) $valuemap['summaryfield'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    ->where(['tabid' => $this->getModuleId(), 'block' => $this->getBlockId()])
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    return $maxSeq + 1;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

            public $masseditable = 1; // Default: Enable massedit for field
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

             * @param array        $valuemap
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public static $__cacheSchemaChanges = [];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Get next quick create sequence id for this instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param vtlib\Block Instance of the block to use
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $this->quicksequence = null;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                Profile::initForField($this);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public function __update()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->clearCache();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    $indexes = $db->getSchema()->getTableIndexes($this->table, true);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

            public function getModuleName()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $name;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $header_field = false;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $uitype = 1;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $generatedtype = 1;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->maxwidthcolumn = (int) $valuemap['maxwidthcolumn'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->quicksequence = (int) $valuemap['quickcreatesequence'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                if (1 != $this->quickcreate) { // If enabled for display
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                        $indexes = $db->getSchema()->getTableIndexes($this->table, true);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                            $db->createCommand()->createIndex("{$this->table}_{$this->column}_idx", $this->table, $this->column)->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Log::trace("Creating field $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Delete this field instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $nameIndex = "{$this->table}_{$this->column}_idx";
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    $moduleName = $this->block->module->name;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                            if ($indexObject->name === $nameIndex) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                                break;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'displaytype' => $this->displaytype,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->clearCache();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

             * Get module id to which this field instance is associated.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Get module name to which this field instance is associated.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $moduleInstance = $this->getModuleInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if (!$this->label) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                    'fieldname' => $this->name,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'fieldlabel' => $this->label,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'sequence' => $this->sequence,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'helpinfo' => $this->helpinfo,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'summaryfield' => (int) $this->summaryfield,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

             * Get block id to which this field instance is associated.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                    $moduleName = $this->module->getName();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    Utils::addColumn($this->table, $this->column, $this->columntype);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                                $isCreateIndex = false;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $this->maximumlength = $this->getRangeValues();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'tablename' => $this->table,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'uitype' => $this->uitype,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $db->createCommand()->delete('vtiger_field', ['fieldid' => $this->id])->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public function getBlockId()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param mixed $blockInstance
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $this->sequence = $this->__getNextSequence();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'tabid' => $this->getModuleId(),
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'presence' => $this->presence,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                            $db->createCommand()->dropIndex($nameIndex, $this->table)->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    return $this->block->tabid;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $helpinfo = '';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $presence = 2;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $anonymizationTarget = [];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                $this->column = $valuemap['columnname'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->typeofdata = $valuemap['typeofdata'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->displaytype = (int) $valuemap['displaytype'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->quickcreate = (int) $valuemap['quickcreate'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                        $this->quicksequence = $this->__getNextQuickCreateSequence();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                        $isCreateIndex = true;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                $db->createCommand()->insert('vtiger_field', [
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                Profile::deleteForField($this);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $db = \App\Db::getInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $db->createCommand()->delete('vtiger_fieldmodulerel', ['fieldid' => $this->id])->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

             * Create this field instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

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

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

                } elseif (!empty($this->module)) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

            public function __create($blockInstance)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                    'typeofdata' => $this->typeofdata,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'quickcreate' => (int) $this->quickcreate,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->id = (int) $db->getLastInsertID('vtiger_field_fieldid_seq');
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public function getModuleId()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if (!empty($this->block)) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $moduleName = \App\Module::getModuleName($this->tabid);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                return $moduleName;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $column = false;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $this->anonymizationTarget = \App\Json::decode($valuemap['anonymization_target']);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                    ->max('quickcreatesequence');
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                if (!$this->table) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    'masseditable' => $this->masseditable,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                ])->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public function __delete()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if ($this->tabid) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $label = '';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $maxlengthtext = 0;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $sequence = false;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public $quicksequence = false;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                $this->tabindex = (int) $valuemap['tabindex'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->presence = (int) $valuemap['presence'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->sequence = (int) $valuemap['sequence'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                    $this->column = strtolower($this->name);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if (!empty($this->columntype)) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    if (\in_array($this->uitype, [10, 318])) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                        foreach ($indexes as $indexObject) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->clearCache();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    return $this->tabid;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    $this->columntype = 'string(100)';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                        $nameIndex = "{$this->table}_{$this->column}_idx";
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'maximumlength' => $this->maximumlength,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

             * @return bool|string
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

            public $block;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public function initialize($valuemap, $module = false, $blockInstance = false)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->tabid = (int) $valuemap['tabid'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->helpinfo = $valuemap['helpinfo'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            /** Cache (Record) the schema changes to improve performance */
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            public function __getNextQuickCreateSequence()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    ->where(['tabid' => $this->getModuleId()])
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->block = $blockInstance;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $this->table = $moduleInstance->basetable;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $this->label = $this->name;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

        Line exceeds 120 characters; contains 132 characters
        Open

                            $db->createCommand()->createIndex("{$this->table}_{$this->column}_idx", $this->table, $this->column)->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if (!$this->maximumlength && method_exists($this, 'getRangeValues')) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'generatedtype' => (int) $this->generatedtype,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'fieldparams' => $this->fieldparams,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'icon' => $this->icon,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                        if ($indexObject->name === $nameIndex) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                if ($this->tabid) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->uitype = (int) $valuemap['uitype'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->defaultvalue = $valuemap['defaultvalue'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->icon = $valuemap['icon'];
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->block = $blockInstance ?: Block::getInstance($valuemap['block'], $module);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if (!empty($valuemap['anonymization_target'])) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                    if (!$this->quicksequence) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                // Initialize other variables which are not done
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'readonly' => $this->readonly,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'defaultvalue' => $this->defaultvalue,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'block' => $this->getBlockId(),
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'quickcreatesequence' => (int) $this->quicksequence,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'info_type' => $this->info_type,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                } elseif (!empty($this->block) && \is_object($this->block)) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $db = \App\Db::getInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                if (!$this->sequence) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if (!$this->column) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if (!$this->columntype) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    'columnname' => $this->column,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    'visible' => $this->visible,
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Log::trace("Updating Field $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                if (10 === $this->uitype) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    foreach ($indexes as $indexObject) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                            break;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Log::trace("Deleteing Field $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                return $this->block->id;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

             * Save this field instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    $this->__create($blockInstance);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Log::trace("Updated help information of $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

            public function delete()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

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

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

             * Get block name.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Cache::delete('ModuleFieldInfosByName', $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Get module instance to which this field instance is associated.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

            public function save($blockInstance = false)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                return $this->id;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    $this->__update();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Log::trace("Updated masseditable information of $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    ->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

            public function getBlockName()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    return $this->block->label;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                \App\Cache::delete('App\Field::getFieldsPermissions' . \App\User::getCurrentUserId(), $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

            public function setMassEditable($value)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Cache::delete('ModuleFieldInfosByColumn', $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    ->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

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

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

             * @return mixed
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

            public function setSummaryField($value)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @return string
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Clear cache.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param mixed $helptext
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                    ->update('vtiger_field', ['summaryfield' => $value], ['fieldid' => $this->id])
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                if ($this->block) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Cache::staticDelete('module', $this->getModuleName());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Cache::delete('BlocksForModule', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

            public function setHelpInfo($helptext)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

             * @param mixed $blockInstance
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

             * Set Help Information for this instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                    ->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param int Summaryfield value
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Log::trace("Updated summaryfield information of $this->name ... DONE", __METHOD__);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                return '';
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                if ($this->id) {
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Set Masseditable information for this instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param int Masseditable value
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                \App\Db::getInstance()->createCommand()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

                \App\Db::getInstance()->createCommand()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                \App\Cache::delete('FieldInfoById', $this->id);
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Cache::delete('getRelatedFieldForModule', 'all');
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param vtlib\Block Instance of block to which this field should be added
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

             * Delete this field instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Db::getInstance()->createCommand()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * Set Summaryfield information for this instance.
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                \Vtiger_Module_Model::getInstance($this->getModuleName())->clearCache();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                return $this->block->module;
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

             * @param string Help text (content)
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param mixed $value
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    ->update('vtiger_field', ['masseditable' => $value], ['fieldid' => $this->id])
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

             * @return void
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

            protected function clearCache(): void
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                $this->__delete();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

             * @param mixed $value
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

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

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

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

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

            public function getModuleInstance()
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                // Make sure to initialize the core tables first
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                    ->update('vtiger_field', ['helpinfo' => $helptext], ['fieldid' => $this->id])
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

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

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

                \App\Cache::staticDelete('ModuleFields', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

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

                \App\Cache::delete('AllFieldForModule', $this->getModuleId());
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpcodesniffer

        The method __create is not named in camelCase.
        Open

            public function __create($blockInstance)
            {
                $db = \App\Db::getInstance();
                $this->block = $blockInstance;
                $moduleInstance = $this->getModuleInstance();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CamelCaseMethodName

        Since: 0.2

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

        Example

        class ClassName {
            public function get_name() {
            }
        }

        Source

        The method __getNextSequence is not named in camelCase.
        Open

            public function __getNextSequence()
            {
                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
                    ->where(['tabid' => $this->getModuleId(), 'block' => $this->getBlockId()])
                    ->max('sequence');
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CamelCaseMethodName

        Since: 0.2

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

        Example

        class ClassName {
            public function get_name() {
            }
        }

        Source

        The method __delete is not named in camelCase.
        Open

            public function __delete()
            {
                Profile::deleteForField($this);
                $db = \App\Db::getInstance();
                $db->createCommand()->delete('vtiger_field', ['fieldid' => $this->id])->execute();
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CamelCaseMethodName

        Since: 0.2

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

        Example

        class ClassName {
            public function get_name() {
            }
        }

        Source

        The method __getNextQuickCreateSequence is not named in camelCase.
        Open

            public function __getNextQuickCreateSequence()
            {
                $maxSeq = (new \App\Db\Query())->from('vtiger_field')
                    ->where(['tabid' => $this->getModuleId()])
                    ->max('quickcreatesequence');
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CamelCaseMethodName

        Since: 0.2

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

        Example

        class ClassName {
            public function get_name() {
            }
        }

        Source

        The method __update is not named in camelCase.
        Open

            public function __update()
            {
                $this->clearCache();
                \App\Log::trace("Updating Field $this->name ... DONE", __METHOD__);
            }
        Severity: Minor
        Found in vtlib/Vtiger/FieldBasic.php by phpmd

        CamelCaseMethodName

        Since: 0.2

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

        Example

        class ClassName {
            public function get_name() {
            }
        }

        Source

        There are no issues that match your filters.

        Category
        Status