YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/inventoryfields/Basic.php

Summary

Maintainability
C
1 day
Test Coverage
F
39%

Vtiger_Basic_InventoryField has 41 functions (exceeds 20 allowed). Consider refactoring.
Open

class Vtiger_Basic_InventoryField extends \App\Base
{
    /**
     * Field visible everywhere.
     */
Severity: Minor
Found in modules/Vtiger/inventoryfields/Basic.php - About 5 hrs to fix

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

    class Vtiger_Basic_InventoryField extends \App\Base
    {
        /**
         * Field visible everywhere.
         */

    File Basic.php has 273 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /**
     * Inventory Basic Field Class.
     *
    Severity: Minor
    Found in modules/Vtiger/inventoryfields/Basic.php - About 2 hrs to fix

      The class Vtiger_Basic_InventoryField has 18 fields. Consider redesigning Vtiger_Basic_InventoryField to keep the number of fields under 15.
      Open

      class Vtiger_Basic_InventoryField extends \App\Base
      {
          /**
           * Field visible everywhere.
           */

      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

      Avoid too many return statements within this method.
      Open

              return $view . 'Base' . '.tpl';
      Severity: Major
      Found in modules/Vtiger/inventoryfields/Basic.php - About 30 mins to fix

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

        class Vtiger_Basic_InventoryField extends \App\Base

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

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

            public function getTemplateName($view, $moduleName)

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

        Noncompliant Code Example

        With the default threshold of 3:

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

        Avoid using undefined variables such as '$modulesNames' which will lead to PHP notices.
        Open

                    $modulesNames[] = ['module' => $module->getName(), 'name' => $module->getName(), 'id' => $module->getName()];

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

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

        Avoid using undefined variables such as '$modulesNames' which will lead to PHP notices.
        Open

                return $modulesNames;

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

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

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

        class Vtiger_Basic_InventoryField extends \App\Base
        {
            /**
             * Field visible everywhere.
             */

        CouplingBetweenObjects

        Since: 1.1.0

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

        Example

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

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

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

                    throw new \App\Exceptions\Security('ERR_VALUE_IS_TOO_LONG||' . $columnName ?? $this->getColumnName() . '||' . $this->getModuleName() . '||' . $value, 406);

        MissingImport

        Since: 2.7.0

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

        Example

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

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

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

                    throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . ($columnName ?? $this->getColumnName()) . '||' . $this->getModuleName() . '||' . $value, 406);

        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 getValueForSave has a boolean flag argument $userFormat, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function getValueForSave(array $item, bool $userFormat = false, string $column = null)

        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 getDisplayValue has a boolean flag argument $rawText, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function getDisplayValue($value, array $rowData = [], bool $rawText = false)

        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 getListViewDisplayValue has a boolean flag argument $rawText, which is a certain sign of a Single Responsibility Principle violation.
        Open

            public function getListViewDisplayValue($value, array $rowData = [], bool $rawText = false)

        BooleanArgumentFlag

        Since: 1.4.0

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

        Example

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

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

        Avoid using static access to class 'Vtiger_Module_Model' in method 'modulesValues'.
        Open

                $modules = Vtiger_Module_Model::getAll([0], [], true);

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

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

            public function getMapDetail(string $related)
            {
                $inventory = Vtiger_Inventory_Model::getInstance($this->getModuleName());
                $fields = $inventory->getAutoCompleteFields();
                $field = false;

        IfStatementAssignment

        Since: 2.7.0

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

        Example

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

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

        Avoid using static access to class '\App\Purifier' in method 'getDisplayValue'.
        Open

                return \App\Purifier::encodeHtml($value);

        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 'getInstance'.
        Open

                if (\App\Cache::has(__METHOD__, $cacheName)) {

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

        Avoid using static access to class 'Vtiger_Loader' in method 'getInstance'.
        Open

                    $className = Vtiger_Loader::getComponentClassName('InventoryField', $type, $moduleName);

        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\Layout' in method 'getTemplateName'.
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'Vtiger' . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

        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\Json' in method 'getParamsConfig'.
        Open

                return \App\Json::decode($this->get('params'));

        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\Layout' in method 'getTemplateName'.
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

        Avoid using static access to class 'Vtiger_Field_Model' in method 'getMapDetail'.
        Open

                    $field = Vtiger_Field_Model::getInstance($mapDetail['field'], $moduleModel);

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

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

            public function setValueToRecord(Vtiger_Record_Model $recordModel, array $item, bool $userFormat)
            {
                $column = $this->getColumnName();
                $baseValue = $item[$column] ?? null;
                $value = $this->getValueForSave($item, $userFormat, $column);

        IfStatementAssignment

        Since: 2.7.0

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

        Example

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

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

        Avoid using static access to class 'Vtiger_Viewer' in method 'getTemplateName'.
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . Vtiger_Viewer::getDefaultLayoutName() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'Vtiger' . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

        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 'getInstance'.
        Open

                    \App\Cache::save(__METHOD__, $cacheName, $instance);

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

        Avoid using static access to class 'Vtiger_Viewer' in method 'getTemplateName'.
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . Vtiger_Viewer::getDefaultLayoutName() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

        StaticAccess

        Since: 1.4.0

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

        Example

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

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

        Avoid using static access to class 'Vtiger_Inventory_Model' in method 'getMapDetail'.
        Open

                $inventory = Vtiger_Inventory_Model::getInstance($this->getModuleName());

        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 'getInstance'.
        Open

                    $instance = \App\Cache::get(__METHOD__, $cacheName);

        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 getInstance uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $className = Vtiger_Loader::getComponentClassName('InventoryField', $type, $moduleName);
                    $instance = new $className();
                    $instance->setModuleName($moduleName);
                    \App\Cache::save(__METHOD__, $cacheName, $instance);

        ElseExpression

        Since: 1.4.0

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

        Example

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

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

        Avoid using static access to class 'Vtiger_Module_Model' in method 'getMapDetail'.
        Open

                    $moduleModel = Vtiger_Module_Model::getInstance($related);

        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\TextUtils' in method 'validate'.
        Open

                if (App\TextUtils::getTextLength($value) > $this->maximumLength) {

        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 "inventoryfields" 4 times.
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

        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 "columnName" 3 times.
        Open

                return $this->has('columnName') ? $this->get('columnName') : $this->columnName;

        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 "layouts" 4 times.
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

        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 "displayType" 7 times.
        Open

                return $this->has('displayType') ? $this->get('displayType') : $this->displayType;

        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 "modules" 4 times.
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

        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 "defaultValue" 3 times.
        Open

                return $this->has('defaultValue') ? $this->get('defaultValue') : $this->defaultValue;

        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 "colSpan" 3 times.
        Open

                return $this->has('colSpan') ? $this->get('colSpan') : $this->colSpan;

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

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

        Noncompliant Code Example

        With the default threshold of 3:

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

        Compliant Solution

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

        Exceptions

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

        Avoid unused parameters such as '$name'.
        Open

            public function getDBValue($value, ?string $name = '')

        UnusedFormalParameter

        Since: 0.2

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

        Example

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

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

        Avoid unused parameters such as '$originalValue'.
        Open

            public function validate($value, string $columnName, bool $isUserFormat, $originalValue = null)

        UnusedFormalParameter

        Since: 0.2

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

        Example

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

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

        Avoid unused parameters such as '$rowData'.
        Open

            public function getDisplayValue($value, array $rowData = [], bool $rawText = false)

        UnusedFormalParameter

        Since: 0.2

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

        Example

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

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

        Avoid unused parameters such as '$rawText'.
        Open

            public function getDisplayValue($value, array $rowData = [], bool $rawText = false)

        UnusedFormalParameter

        Since: 0.2

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

        Example

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

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

        Avoid unused parameters such as '$isUserFormat'.
        Open

            public function validate($value, string $columnName, bool $isUserFormat, $originalValue = null)

        UnusedFormalParameter

        Since: 0.2

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

        Example

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

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

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

                    $modulesNames[] = ['module' => $module->getName(), 'name' => $module->getName(), 'id' => $module->getName()];

        Doc-block of $column in getValueForSave is phpdoc param type string which is not a permitted replacement of the nullable param type ?string declared in the signature ('?T' should be documented as 'T|null' or '?T')
        Open

             * @param string $column

        Parameter $value has undeclared type \type
        Open

            public function getValue($value)

        Each class must be in a namespace of at least one level (a top-level vendor name)
        Open

        class Vtiger_Basic_InventoryField extends \App\Base

        The class Vtiger_Basic_InventoryField is not named in CamelCase.
        Open

        class Vtiger_Basic_InventoryField extends \App\Base
        {
            /**
             * Field visible everywhere.
             */

        CamelCaseClassName

        Since: 0.2

        It is considered best practice to use the CamelCase notation to name classes.

        Example

        class class_name {
        }

        Source

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

            private const FIELD_VISIBLE_EVERYWHERE = 0;

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

             * Field visible in detail view.

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

            /**

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

             */

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

             * Field visible everywhere.

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

            /**

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

             */

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

            private const FIELD_VISIBLE_IN_DETAIL = 2;

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

             * Field read-only.

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

            protected $colSpan = 10;

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

            protected $displayType = self::FIELD_VISIBLE_EVERYWHERE;

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

             *

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

                return $this->params;

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

            /**

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

             * Gets inventory field instance.

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

             *

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

            /**

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

             * @return \Vtiger_Basic_InventoryField

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

                return $this;

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

            {

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

            {

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

            }

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

            private const FIELD_HIDDEN = 5;

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

            /**

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

            protected $onlyOne = true;

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

             * @return self

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

            /**

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

             *

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

             */

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

                return $this->displayTypeBase;

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

            protected $type;

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

            }

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

             * @return int

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

            public static function getInstance(string $moduleName, ?string $type = 'Basic')

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

            {

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

                if (\App\Cache::has(__METHOD__, $cacheName)) {

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

             *

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

            }

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

                    $column = $this->getColumnName();

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

            }

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

            public function getParamsConfig()

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

             * Field hidden.

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

            /**

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

             *

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

             */

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

            public function isOnlyOne()

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

            {

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

                'LBL_DISPLAYTYPE_READONLY' => self::FIELD_READONLY

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

             *

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

                    $instance->setModuleName($moduleName);

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

             * @return mixed

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

             */

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

            public function setModuleName(string $moduleName): self

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

             * Getting onlyOne field.

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

             * @return bool

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

            /**

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

             * @param array  $item

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

             * @param string $column

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

             * @return array

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

            public function displayTypeBase()

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

            protected $summationValue = false;

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

                'LBL_DISPLAYTYPE_ALL' => self::FIELD_VISIBLE_EVERYWHERE,

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

             *

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

                return clone $instance;

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

                return $this->moduleName;

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

             *

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

            }

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

                }

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

            {

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

            protected $defaultValue = '';

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

            protected $dbType = 'string';

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

             * @param string      $moduleName

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

                $cacheName = "$moduleName:$type";

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

                } else {

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

                    \App\Cache::save(__METHOD__, $cacheName, $instance);

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

            {

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

                return $this->onlyOne;

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

            public function getParams()

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

            private const FIELD_READONLY = 10;

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

            {

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

            protected $customColumn = [];

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

             */

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

             *

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

            {

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

             * @return string

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

             * @return string dbType

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

            /**

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

             * Getting all values display Type.

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

            {

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

             * @throws \App\Exceptions\AppException

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

            }

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

            }

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

            /**

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

             */

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

            }

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

             * Gets value for save.

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

                return $userFormat ? $this->getDBValue($value) : $value;

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

            /**

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

             * Gets display type.

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

             *

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

                    $instance = new $className();

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

             */

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

                return $this->blocks;

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

            public function getDBType()

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

                return $this->dbType;

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

                return \App\Json::decode($this->get('params'));

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

            protected $moduleName = '';

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

            protected $displayTypeBase = [

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

                'LBL_DISPLAYTYPE_ONLY_DETAIL' => self::FIELD_VISIBLE_IN_DETAIL,

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

            protected $fieldDataType = 'inventory';

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

            protected $purifyType = '';

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

             * Sets module name.

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

            {

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

            public function getBlocks()

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

             */

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

                $value = $item[$column] ?? null;

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

            }

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

             */

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

            }

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

            /**

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

            protected $columnName = '';

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

            protected $customPurifyType = [];

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

                    $className = Vtiger_Loader::getComponentClassName('InventoryField', $type, $moduleName);

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

                }

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

                $this->moduleName = $moduleName;

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

            {

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

             * Getting database-type of field.

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

                if (null === $column) {

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

                return $this->has('displayType') ? $this->get('displayType') : $this->displayType;

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

            public function getColSpan()

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

            public function getRangeValues()

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

            /**

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

             * @param string|null $type

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

            public function getModuleName(): string

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

            }

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

            protected $params = [];

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

            ];

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

            protected $defaultLabel = '';

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

             */

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

                    $instance = \App\Cache::get(__METHOD__, $cacheName);

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

             * Function returns module name.

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

             * @param string $moduleName

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

            }

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

             *

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

             * @param bool   $userFormat

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

             * Getting all params values.

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

             *

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

             *

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

                return $this->has('colSpan') ? $this->get('colSpan') : $this->colSpan;

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

             */

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

                'LBL_DISPLAYTYPE_HIDDEN' => self::FIELD_HIDDEN,

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

            protected $blocks = [1];

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

            protected $maximumLength = 255;

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

            {

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

            public function getValueForSave(array $item, bool $userFormat = false, string $column = null)

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

             */

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

             * @return array

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

            public function getDisplayType(): int

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

            }

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

             * Get template name for edit.

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

                if (is_file($filename)) {

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

                    return $tpl;

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

            {

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

             *

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

            {

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

            /**

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

             */

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

             * @param mixed $view

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

                }

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

                    return $tpl;

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

             * Getting field type.

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

             */

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

                return $this->has('defaultValue') ? $this->get('defaultValue') : $this->defaultValue;

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

            /**

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

            /**

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

             * Function to check if the current field is mandatory or not.

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

            {

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

                return $this->defaultLabel;

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

            /**

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

            }

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

                $tpl = $view . $this->type . '.tpl';

        Line exceeds 120 characters; contains 230 characters
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . Vtiger_Viewer::getDefaultLayoutName() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'Vtiger' . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

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

            }

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

             * Getting column name.

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

             *

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

            public function getCustomColumn()

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

            public function getDefaultValue()

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

             *

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

             * @return mixed

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

            }

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

             */

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

                }

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

             * @return string columnName

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

             * @return bool

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

            }

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

                return $this->has('columnName') ? $this->get('columnName') : $this->columnName;

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

             */

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

             */

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

            public function getDisplayValue($value, array $rowData = [], bool $rawText = false)

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

            {

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

                if ('' == $value) {

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

            /**

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

                if (is_file($filename)) {

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

                }

        Line exceeds 120 characters; contains 233 characters
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . Vtiger_Viewer::getDefaultLayoutName() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

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

                $filename = 'layouts' . DIRECTORY_SEPARATOR . Vtiger_Viewer::getDefaultLayoutName() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'Vtiger' . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

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

            /**

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

            {

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

                    $value = $this->getDefaultValue();

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

                return $value;

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

            /**

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

             * @return string

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

                return 'inventoryTypes/Base.tpl';

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

            /**

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

             * Getting default label.

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

             * @return string defaultLabel

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

            }

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

             *

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

             * @param array $rowData

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

                return $this->getDisplayValue($value);

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

            {

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

             * Getting template name.

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

             */

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

                    return $tpl;

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

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'Vtiger' . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

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

            {

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

            public function isSummary()

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

            {

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

            public function getListViewDisplayValue($value, array $rowData = [], bool $rawText = false)

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

                return $this->getDisplayValue($value, $rowData, $rawText);

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

             *

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

            /**

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

             */

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

             *

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

             * @return string templateName

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

                return $this->type;

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

             * Getting value to display.

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

            }

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

             * Getting value to display.

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

             * @return string

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

                return true;

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

                    return $tpl;

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

            public function getDefaultLabel()

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

            /**

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

             * @return string[] customColumn

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

            }

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

            }

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

                return $view . 'Base' . '.tpl';

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

             *

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

            {

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

             *

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

             * @param array $rowData

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

             *

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

            public function getValue($value)

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

            {

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

                $filename = 'layouts' . DIRECTORY_SEPARATOR . Vtiger_Viewer::getDefaultLayoutName() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

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

             */

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

             * @param mixed $value

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

             *

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

             * @param type $value

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

            }

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

            {

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

             */

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

            }

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

            public function getType()

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

             * Function to get the list value in display view.

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

             * @param bool  $rawText

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

            }

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

            public function isMandatory()

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

                return $this->maximumLength;

        Line exceeds 120 characters; contains 223 characters
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'Vtiger' . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

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

                if (is_file($filename)) {

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

             */

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

            }

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

            }

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

             * @param mixed $value

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

             * @return string

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

             *

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

            public function getEditValue($value)

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

            /**

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

            public function getEditTemplateName()

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

            public function getTemplateName($view, $moduleName)

        Line exceeds 120 characters; contains 226 characters
        Open

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

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

             * Getting column name.

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

                return $this->summationValue;

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

             * Getting value.

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

             *

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

             * @param mixed $moduleName

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

                $filename = 'layouts' . DIRECTORY_SEPARATOR . \App\Layout::getActiveLayout() . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $moduleName . DIRECTORY_SEPARATOR . 'inventoryfields' . DIRECTORY_SEPARATOR . $tpl;

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

             *

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

            public function getColumnName()

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

                return \App\Purifier::encodeHtml($value);

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

             * @param mixed $value

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

             * @return string

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

            {

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

             */

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

             * Function to check whether the current field is editable.

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

             *

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

             *

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

                return $field;

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

                }

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

             * Sets value data.

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

             *

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

            {

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

            /**

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

            {

        Line exceeds 120 characters; contains 139 characters
        Open

                return \in_array($this->get('displayType'), [self::FIELD_VISIBLE_EVERYWHERE, self::FIELD_READONLY, self::FIELD_VISIBLE_IN_DETAIL]);

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

             *

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

             * @return bool

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

             * @throws \App\Exceptions\AppException

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

            }

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

             *

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

                $modules = Vtiger_Module_Model::getAll([0], [], true);

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

            /**

        Line exceeds 120 characters; contains 121 characters
        Open

                    $modulesNames[] = ['module' => $module->getName(), 'name' => $module->getName(), 'id' => $module->getName()];

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

             * @param string|null $name

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

            public function getSummaryValuesFromData($data)

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

             *

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

             * @param mixed  $value

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

             */

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

                    ->set('label', $this->defaultLabel)

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

             * @param string $columnName

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

                return self::FIELD_HIDDEN !== $this->get('displayType');

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

             *

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

            public function validate($value, string $columnName, bool $isUserFormat, $originalValue = null)

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

             * @param bool                 $userFormat

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

             *

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

             * Getting value to display.

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

                    throw new \App\Exceptions\Security('ERR_VALUE_IS_TOO_LONG||' . $columnName ?? $this->getColumnName() . '||' . $this->getModuleName() . '||' . $value, 406);

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

                }

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

            /**

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

                return $sum;

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

                    ->set('invtype', $this->type)

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

             * @param mixed       $value

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

            }

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

             * Field required to make an entry.

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

             *

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

                $this->set('columnName', $this->columnName)

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

            /**

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

             * @return bool

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

             *

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

             *

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

                if (is_file($filename)) {

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

                }

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

                }

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

            {

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

             * @return string

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

                return $this->customColumn;

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

            {

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

            /**

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

             * @param bool  $rawText

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

             *

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

             */

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

             * @return bool

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

            public function isEditable(): bool

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

            {

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

                    $field = Vtiger_Field_Model::getInstance($mapDetail['field'], $moduleModel);

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

                }

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

            public function setDefaultDataConfig()

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

            public function isVisible()

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

             */

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

            }

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

            public function modulesValues()

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

                    $modulesNames[] = ['module' => $module->getName(), 'name' => $module->getName(), 'id' => $module->getName()];

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

             */

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

            public function getFieldDataType()

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

             * Gets database value.

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

             * @param bool   $isUserFormat

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

            public function isRequired()

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

             */

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

                }

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

            public function getMapDetail(string $related)

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

            {

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

             *

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

                    throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . ($columnName ?? $this->getColumnName()) . '||' . $this->getModuleName() . '||' . $value, 406);

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

             */

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

            }

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

             *

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

             * Function to check if field is visible in detail view.

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

                return \in_array($this->get('displayType'), [self::FIELD_VISIBLE_EVERYWHERE, self::FIELD_READONLY, self::FIELD_VISIBLE_IN_DETAIL]);

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

                return self::FIELD_READONLY === $this->get('displayType');

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

            {

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

            }

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

            }

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

             * Verification of data.

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

             * @throws \App\Exceptions\Security

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

            }

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

                return $this->fieldDataType;

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

             * @return mixed

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

                if (!is_numeric($value) && (\is_string($value) && $value !== strip_tags($value))) {

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

             * @throws \App\Exceptions\AppException

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

            }

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

                return \in_array($this->get('displayType'), [self::FIELD_VISIBLE_EVERYWHERE, self::FIELD_READONLY]);

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

             * Function checks if the field is read-only.

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

            {

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

                }

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

            }

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

                    ->set('presence', 0)

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

             */

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

            /**

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

            /**

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

             *

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

                return $modulesNames;

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

                    foreach ($data as $row) {

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

                $inventory = Vtiger_Inventory_Model::getInstance($this->getModuleName());

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

                    $moduleModel = Vtiger_Module_Model::getInstance($related);

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

            }

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

             * @param mixed  $originalValue

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

            {

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

                return false;

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

            /**

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

                $baseValue = $item[$column] ?? null;

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

            {

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

             */

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

                $fields = $inventory->getAutoCompleteFields();

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

                $field = false;

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

            /**

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

             */

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

            {

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

                $this->validate($value, $column, false, $baseValue);

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

                }

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

                    'maximumlength' => $this->maximumLength

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

             * @return bool

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

            {

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

            }

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

                    }

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

            }

        Line exceeds 120 characters; contains 167 characters
        Open

                    throw new \App\Exceptions\Security('ERR_VALUE_IS_TOO_LONG||' . $columnName ?? $this->getColumnName() . '||' . $this->getModuleName() . '||' . $value, 406);

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

             * Sets default data config.

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

             *

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

             * @param \Vtiger_Record_Model $recordModel

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

             * @return array

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

            public function isVisibleInDetail()

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

            /**

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

            /**

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

             * @return array

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

                if (\is_array($data)) {

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

             * Gets relation field.

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

             * @param string $related

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

             * @return bool|\Vtiger_Field_Model

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

                return $value;

        Line exceeds 120 characters; contains 171 characters
        Open

                    throw new \App\Exceptions\Security('ERR_ILLEGAL_FIELD_VALUE||' . ($columnName ?? $this->getColumnName()) . '||' . $this->getModuleName() . '||' . $value, 406);

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

                if (App\TextUtils::getTextLength($value) > $this->maximumLength) {

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

                    ->set('colSpan', $this->colSpan);

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

             * @param array                $item

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

             *

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

            public function setValueToRecord(Vtiger_Record_Model $recordModel, array $item, bool $userFormat)

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

                        $value = $this->getValueForSave($item, $userFormat, $column);

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

             */

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

             * Function to check whether the current field is visible.

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

            public function isReadOnly()

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

             */

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

                $sum = 0;

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

                if ($mapDetail = $fields[$related][$this->getColumnName()] ?? false) {

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

             *

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

                    ->set('defaultValue', $this->defaultValue)

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

             * @throws \App\Exceptions\Security

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

                if ($customColumn = $this->getCustomColumn()) {

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

             * @return array

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

                ];

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

            }

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

             * @return bool

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

                foreach ($modules as $module) {

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

                        $sum += $row[$this->getColumnName()];

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

            {

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

            public function getDBValue($value, ?string $name = '')

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

            {

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

             */

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

                    ->set('displayType', $this->displayType)

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

            {

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

                $recordModel->setInventoryItemPart($item['id'], $column, $value);

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

                    foreach (array_keys($customColumn) as $column) {

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

            public function getFieldInfo(): array

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

             * Gets purify type.

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

            {

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

            }

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

                        $recordModel->setInventoryItemPart($item['id'], $column, $value);

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

            /**

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

            public function getPurifyType()

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

            /**

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

             *

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

            {

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

                    $baseValue = $this->getDBValue($baseValue, $column);

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

             */

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

                }

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

                $column = $this->getColumnName();

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

                $value = $this->getValueForSave($item, $userFormat, $column);

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

                if ($userFormat && $baseValue) {

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

            }

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

                return [$this->getColumnName() => $this->purifyType] + $this->customPurifyType;

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

                    }

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

                        $this->validate($value, $column, false);

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

             *

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

             * Get information about field.

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

                return [

        Class name "Vtiger_Basic_InventoryField" is not in camel caps format
        Open

        class Vtiger_Basic_InventoryField extends \App\Base

        There are no issues that match your filters.

        Category
        Status