YetiForceCompany/YetiForceCRM

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

Summary

Maintainability
A
1 hr
Test Coverage
F
0%

Avoid too many return statements within this method.
Open

        return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));
Severity: Major
Found in modules/Vtiger/inventoryfields/Reference.php - About 30 mins to fix

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

        public function getReferenceModule($record): ?Vtiger_Module_Model
        {
            if (!empty($record)) {
                $referenceModuleList = $this->getReferenceModules();
                $referenceEntityType = vtlib\Functions::getCRMRecordMetadata($record)['setype'] ?? '';
    Severity: Minor
    Found in modules/Vtiger/inventoryfields/Reference.php - About 25 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

        public function validate($value, string $columnName, bool $isUserFormat, $originalValue = null)
        {
            if ((empty($value) && $this->isMandatory()) || ($value && !is_numeric($value))) {
                throw new \App\Exceptions\Security("ERR_ILLEGAL_FIELD_VALUE||$columnName||$value", 406);
            }
    Severity: Minor
    Found in modules/Vtiger/inventoryfields/Reference.php - About 25 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

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

    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;
    }
    

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

                throw new \App\Exceptions\Security("ERR_ILLEGAL_FIELD_VALUE||$columnName||$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 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

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

                throw new \App\Exceptions\Security("ERR_VALUE_IS_TOO_LONG||$columnName||$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

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

                return '<i class="color-red-500" title="' . \App\Purifier::encodeHtml($value) . '">' . \App\Language::translate('LBL_RECORD_DOES_NOT_EXIST') . '</i>';

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'vtlib\Functions' in method 'getReferenceModule'.
    Open

    }

    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 '54', column '8').
    Open

        public function getEditValue($value)
        {
            if (empty($value)) {
                return '';
            }

    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\Record' in method 'getEditValue'.
    Open

            return \App\Record::getLabel($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\Fields\Owner' in method 'getDisplayValue'.
    Open

                return \App\Fields\Owner::getLabel($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\Config' in method 'getDisplayValue'.
    Open

            return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                    return Vtiger_Module_Model::getInstance('Users');

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                return '<i class="color-red-500" title="' . \App\Purifier::encodeHtml($value) . '">' . \App\Language::translate('LBL_RECORD_DOES_NOT_EXIST') . '</i>';

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                    return Vtiger_Module_Model::getInstance($referenceEntityType);

    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\Fields\Owner' in method 'getEditValue'.
    Open

                return \App\Fields\Owner::getLabel($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\Record' in method 'getDisplayValue'.
    Open

            return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));

    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 '35', column '9').
    Open

        public function getDisplayValue($value, array $rowData = [], bool $rawText = false)
        {
            if (empty($value)) {
                return '';
            }

    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\Record' in method 'getDisplayValue'.
    Open

                return \App\Record::getLabel($value, $rawText);

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

            if ('Users' === $referenceModuleName || 'Groups' === $referenceModuleName) {

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

        protected $params = ['modules', 'mandatory'];

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Call to method getLabel from undeclared class \App\Fields\Owner
    Open

                return \App\Fields\Owner::getLabel($value);

    Argument 2 (moduleName) is false but \App\Record::getHtmlLink() takes null|string defined at /code/app/Record.php:394
    Open

            return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));

    Call to method getLabel from undeclared class \App\Fields\Owner
    Open

                return \App\Fields\Owner::getLabel($value);

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

    class Vtiger_Reference_InventoryField extends Vtiger_Basic_InventoryField

    The class Vtiger_Reference_InventoryField is not named in CamelCase.
    Open

    class Vtiger_Reference_InventoryField extends Vtiger_Basic_InventoryField
    {
        protected $type = 'Reference';
        protected $defaultLabel = 'LBL_REFERENCE';
        protected $columnName = 'ref';

    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

        protected $columnName = 'ref';

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

        protected $purifyType = \App\Purifier::INTEGER;

    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

        protected $defaultLabel = 'LBL_REFERENCE';

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

            if (!($referenceModule = $this->getReferenceModule($value))) {

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

            $referenceModuleName = $referenceModule->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 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

        }

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

                $referenceModuleList = $this->getReferenceModules();

    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 ('Users' === $referenceModuleName || 'Groups' === $referenceModuleName) {

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

            if ($rawText) {

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

            if (empty($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 (($referenceModule = $this->getReferenceModule($value)) && ('Users' === $referenceModule->getName() || 'Groups' === $referenceModule->getName())) {

    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

        {

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

            return isset($config['mandatory']) ? 'false' !== $config['mandatory'] : true;

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

                $referenceEntityType = vtlib\Functions::getCRMRecordMetadata($record)['setype'] ?? '';

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

                    return Vtiger_Module_Model::getInstance('Users');

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

        /**

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

        /** {@inheritdoc} */

    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 '';

    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 $maximumLength = '-2147483648,2147483647';

    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 \App\Record::getLabel($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

            if (!empty($record)) {

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

        /** {@inheritdoc} */

    Line exceeds 120 characters; contains 158 characters
    Open

            if (($referenceModule = $this->getReferenceModule($value)) && ('Users' === $referenceModule->getName() || 'Groups' === $referenceModule->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

                }

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

            return null;

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

        protected $params = ['modules', 'mandatory'];

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

                return '';

    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 'inventoryTypes/Reference.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

                return \App\Fields\Owner::getLabel($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 $record

    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 $type = 'Reference';

    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

        }

    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 '<i class="color-red-500" title="' . \App\Purifier::encodeHtml($value) . '">' . \App\Language::translate('LBL_RECORD_DOES_NOT_EXIST') . '</i>';

    Line exceeds 120 characters; contains 162 characters
    Open

                return '<i class="color-red-500" title="' . \App\Purifier::encodeHtml($value) . '">' . \App\Language::translate('LBL_RECORD_DOES_NOT_EXIST') . '</i>';

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

        public function getReferenceModule($record): ?Vtiger_Module_Model

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

                return \App\Fields\Owner::getLabel($value);

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

            return \App\Record::getHtmlLink($value, $referenceModuleName, \App\Config::main('href_max_length'));

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

                if (!empty($referenceModuleList) && \in_array('Users', $referenceModuleList)) {

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

            }

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

        /** {@inheritdoc} */

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

            $config = $this->getParamsConfig();

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

         * @return Vtiger_Module_Model|null

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

                    return Vtiger_Module_Model::getInstance($referenceEntityType);

    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

         * Function to get the Display Value, for the current field type with given DB Insert Value.

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

                if (!empty($referenceModuleList) && \in_array($referenceEntityType, $referenceModuleList)) {

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

        public function getReferenceModules()

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

        protected $dbType = 'int';

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

        /** {@inheritdoc} */

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

            if (empty($value)) {

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

                return \App\Record::getLabel($value, $rawText);

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

         * Function to get reference modules.

    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

            $values = $this->getParamsConfig()['modules'] ?? [];

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

        /** {@inheritdoc} */

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

                throw new \App\Exceptions\Security("ERR_ILLEGAL_FIELD_VALUE||$columnName||$value", 406);

    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

        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

            if (!empty($value) && ($rangeValues[1] < $value || $rangeValues[0] > $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

        /** {@inheritdoc} */

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

                throw new \App\Exceptions\Security("ERR_VALUE_IS_TOO_LONG||$columnName||$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

                ['id' => 'true', 'name' => 'LBL_YES'],

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

            if (\is_string($values)) {

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

                $values = explode(' |##| ', $values);

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

            return (int) $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 validate($value, string $columnName, bool $isUserFormat, $originalValue = null)

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

            if ((empty($value) && $this->isMandatory()) || ($value && !is_numeric($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 [

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

            ];

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

            $rangeValues = explode(',', $this->maximumLength);

    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

            return $values;

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

        public function mandatoryValues()

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

        }

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

                ['id' => 'false', 'name' => 'LBL_NO'],

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

    class Vtiger_Reference_InventoryField extends Vtiger_Basic_InventoryField

    There are no issues that match your filters.

    Category
    Status