YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/MappedFields/models/Field.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Function getInstance has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getInstance($value, $module = false, $type = '')
    {
        switch ($type) {
            case 'SELF':
                $fieldModel = parent::getInstance($value, $module);
Severity: Minor
Found in modules/Settings/MappedFields/models/Field.php - About 1 hr to fix

Cognitive Complexity

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

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

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

Further reading

Method getInstance has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getInstance($value, $module = false, $type = '')
    {
        switch ($type) {
            case 'SELF':
                $fieldModel = parent::getInstance($value, $module);
Severity: Minor
Found in modules/Settings/MappedFields/models/Field.php - About 1 hr to fix

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

        public static function getInstance($value, $module = false, $type = '')

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

                        } else {
                            \App\Log::warning('Not found field: ' . $value, 'MappedFields');
                        }

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

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

                    } else {
                        $return = self::getInstanceFromInventoryFieldObject($inventoryField);
                    }

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

                        $fields = Settings_MappedFields_Module_Model::getSpecialFields();

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\App\Log' in method 'getInstance'.
    Open

                        \App\Log::warning('Not found inventory field: ' . $value, 'MappedFields');

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

                    $inventoryModel = Vtiger_Inventory_Model::getInstance($module->getName());

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\App\Log' in method 'getInstance'.
    Open

                            \App\Log::warning('Not found field: ' . $value, 'MappedFields');

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

            $row['label'] = $fieldModel->getFieldLabel();

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

            if (empty($this->fieldDataType) && 'INVENTORY' == $this->get('typeofdata')) {

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

            if (empty($this->fieldDataType) && 'INVENTORY' == $this->get('typeofdata')) {

    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 warning from undeclared class \App\Log
    Open

                            \App\Log::warning('Not found field: ' . $value, 'MappedFields');

    Saw unextractable annotation for comment '* @return <settings_mappedfields_field_model> field model'</settings_mappedfields_field_model>
    Open

         * @return <Settings_MappedFields_Field_Model> field model

    Call to method getName on non-class type false|string
    Open

                    $inventoryModel = Vtiger_Inventory_Model::getInstance($module->getName());

    Declaration of function getUIType() : string should be compatible with function getUIType() : int defined in /code/modules/Vtiger/models/Field.php:255
    Open

        public function getUIType()

    Saw unextractable annotation for comment '* @return <settings_mappedfields_field_model>'</settings_mappedfields_field_model>
    Open

         * @return <Settings_MappedFields_Field_Model>

    Call to deprecated function \Vtiger_Field_Model::getFieldName() defined at /code/modules/Vtiger/models/Field.php:203
    Open

            $row['name'] = $fieldModel->getFieldName();

    Default value for string $module can't be false
    Open

        public static function getInstance($value, $module = false, $type = '')

    Suspicious array access to \instance
    Open

                            $fieldModel = $fields[$value];

    Reference to undeclared property \Settings_MappedFields_Field_Model->mandatory
    Open

            return $this->mandatory;

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

         * @param <String/Integer> $value

    Returning type int but getUIType() is declared to return string
    Open

            return $this->uitype;

    Call to deprecated function \Vtiger_Field_Model::getFieldLabel() defined at /code/modules/Vtiger/models/Field.php:215
    Open

            $row['label'] = $fieldModel->getFieldLabel();

    Reference to undeclared property \Settings_MappedFields_Field_Model->fieldModel (Did you mean $fieldModel)
    Open

            $instance->fieldModel = $fieldModel;

    Saw unextractable annotation for comment '* @return <settings_mappedfields_field_model>'</settings_mappedfields_field_model>
    Open

         * @return <Settings_MappedFields_Field_Model>

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

                        \App\Log::warning('Not found inventory field: ' . $value, 'MappedFields');

    Saw unextractable annotation for comment '* @return <settings_mappedfields_field_model>'</settings_mappedfields_field_model>
    Open

         * @return <Settings_MappedFields_Field_Model>

    Reference to undeclared property \Settings_MappedFields_Field_Model->mandatory
    Open

                $this->mandatory = parent::isMandatory();

    Reference to undeclared property \Settings_MappedFields_Field_Model->mandatory
    Open

            if (!$this->mandatory) {

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

    class Settings_MappedFields_Field_Model extends Vtiger_Field_Model

    The class Settings_MappedFields_Field_Model is not named in CamelCase.
    Open

    class Settings_MappedFields_Field_Model extends Vtiger_Field_Model
    {
        public $inventoryField = false;
    
        /**

    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

        {

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

         * Function to get field data type.

    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

                $this->fieldDataType = parent::getFieldDataType();

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

    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->fieldDataType = 'inventory';

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

         * @param mixed $row

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

        {

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

            $row = [];

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

            if (!$this->mandatory) {

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

        /**

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

            $row['label'] = $inventoryField->get('label');

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

            $row['typeofdata'] = 'INVENTORY';

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

            $instance = self::fromArray($row);

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

                    $fieldModel = parent::getInstance($value, $module);

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

                default:

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

        public function getUIType()

    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($this->fieldDataType) && 'INVENTORY' == $this->get('typeofdata')) {

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

            } elseif (empty($this->fieldDataType)) {

    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 self();

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

        public $inventoryField = 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

         * @param Vtiger_Field_Model $fieldModel

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

            return $this->get('label');

    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 (!$fieldModel) {

    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 data 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

                $this->uitype = parent::getUIType();

    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 $inventoryField

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

        {

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

            $row['defaultvalue'] = $inventoryField->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

         */

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

                case 'SELF':

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

                    $fieldModel = parent::getInstance($value, $module);

    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 parent::getFieldType();

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

         * Function to get clean 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

            foreach ($row as $name => $value) {

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

            $row['fieldparams'] = $fieldModel->getFieldParams();

    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

            $instance->inventoryField = $inventoryField;

    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 (isset($fields[$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 $return;

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

                $objectProperties = get_object_vars($fieldModel);

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

            if (!$this->get('uitype')) {

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

         * Function to get the 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

        }

    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

            $row['displaytype'] = $fieldModel->getDisplayType();

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

        public function getFieldLabelKey()

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

         * @param <String/Integer> $value

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

         * @param string           $module

    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

                    $inventoryField = $inventoryModel->getField($value);

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

            if ($fieldModel) {

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

                foreach ($objectProperties as $properName => $propertyValue) {

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

            return $fieldModel;

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

         * Function to get field uitype.

    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

            $row['table'] = $fieldModel->getTableName();

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

            $instance->fieldModel = $fieldModel;

    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 get field label.

    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 = self::getInstanceFromInventoryFieldObject($inventoryField);

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

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

         * Function to get field instance from WebserviceFieldObject.

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

         * Function to get instance.

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

         * @return <Settings_MappedFields_Field_Model> field model

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

                        $fields = Settings_MappedFields_Module_Model::getSpecialFields();

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

                            $fieldModel = $fields[$value];

    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

        public function getFieldType()

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

        {

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

            $row['name'] = $fieldModel->getFieldName();

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

            $row['typeofdata'] = $fieldModel->get('typeofdata');

    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 label

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

         * @param string           $type

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

        public static function getInstance($value, $module = false, $type = '')

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

                        \App\Log::warning('Not found inventory field: ' . $value, 'MappedFields');

    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

         * @return string uitype

    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 <Settings_MappedFields_Field_Model>

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

        /**

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

            $row['defaultvalue'] = $fieldModel->getDefaultFieldValue();

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

            $row['mandatory'] = $fieldModel->isMandatory();

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

                    $inventoryModel = Vtiger_Inventory_Model::getInstance($module->getName());

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

                    if (empty($inventoryField)) {

    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 get Field instance from array.

    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

            $row['id'] = $inventoryField->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

         * @return string type of the field

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

         * @return Settings_MappedFields_Field_Model

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

            $row['label'] = $fieldModel->getFieldLabel();

    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 get field instance from InventoryFieldObject.

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

                            \App\Log::warning('Not found field: ' . $value, 'MappedFields');

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

                $fieldModel = new 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

            return new 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

         * @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

         * @return <Settings_MappedFields_Field_Model>

    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 static function fromArray($row = [])

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

            return $instance;

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

            $row['masseditable'] = (bool) $fieldModel->get('masseditable');

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

            $instance = self::fromArray($row);

    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

            $row = [];

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

            $row['mandatory'] = $inventoryField->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

            if ('id' === $this->get('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

            $row['column'] = $fieldModel->getColumnName();

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

            return $instance;

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

                $this->mandatory = parent::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

            $row['name'] = $inventoryField->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

         * @return <Settings_MappedFields_Field_Model>

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

        public static function getCleanInstance()

    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 static function getInstanceFromWebserviceFieldObject($fieldModel)

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

            $row['uitype'] = $fieldModel->getUIType();

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

            $row['presence'] = $fieldModel->get('presence');

    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 static function getInstanceFromInventoryFieldObject($inventoryField)

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

            switch ($type) {

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

                    break;

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

                    $fieldModel->{$properName} = $propertyValue;

    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->set($name, $value);

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

            $row['id'] = $fieldModel->getId();

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

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

            $row['column'] = $inventoryField->getColumnName();

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

            return $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

                case 'INVENTORY':

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

                    break;

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

    class Settings_MappedFields_Field_Model extends Vtiger_Field_Model

    There are no issues that match your filters.

    Category
    Status