YetiForceCompany/YetiForceCRM

View on GitHub
modules/CustomView/views/EditAjax.php

Summary

Maintainability
A
3 hrs
Test Coverage
F
0%

Method process has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function process(App\Request $request)
    {
        $viewer = $this->getViewer($request);
        $sourceModuleName = $request->getByType('source_module', \App\Purifier::ALNUM);
        $moduleName = $request->getModule();
Severity: Minor
Found in modules/CustomView/views/EditAjax.php - About 1 hr to fix

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

        public function process(App\Request $request)
        {
            $viewer = $this->getViewer($request);
            $sourceModuleName = $request->getByType('source_module', \App\Purifier::ALNUM);
            $moduleName = $request->getModule();
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.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

    The method process() has an NPath complexity of 240. The configured NPath complexity threshold is 200.
    Open

        public function process(App\Request $request)
        {
            $viewer = $this->getViewer($request);
            $sourceModuleName = $request->getByType('source_module', \App\Purifier::ALNUM);
            $moduleName = $request->getModule();
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    NPathComplexity

    Since: 0.1

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

    Example

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

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

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

        public function process(App\Request $request)
        {
            $viewer = $this->getViewer($request);
            $sourceModuleName = $request->getByType('source_module', \App\Purifier::ALNUM);
            $moduleName = $request->getModule();
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    CyclomaticComplexity

    Since: 0.1

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

    Example

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

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

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

                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    MissingImport

    Since: 2.7.0

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

    Example

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

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

    Missing class import via use statement (line '53', column '27').
    Open

                $customViewModel = new CustomView_Record_Model();
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    MissingImport

    Since: 2.7.0

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

    Example

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

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

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

            } else {
                $viewer->assign('CV_PRIVATE_VALUE', App\CustomView::CV_STATUS_PRIVATE);
            }
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\App\Privilege' in method 'checkPermission'.
    Open

                $permissions = \App\Privilege::isPermitted($sourceModuel, 'CreateCustomFilter');
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

            $sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModuleName);
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

            } else {
                $permissions = CustomView_Record_Model::getInstanceById($request->getInteger('record'))->isEditable();
            }
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

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

                $sourceModuleName = \App\Module::getModuleName($sourceModuleName);
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\App\Condition' in method 'process'.
    Open

            $viewer->assign('ADVANCED_CONDITIONS', \App\Condition::validAdvancedConditions($customViewModel->getAdvancedConditions()));
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Users_Record_Model' in method 'process'.
    Open

            $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'CustomView_Record_Model' in method 'process'.
    Open

                $customViewModel = CustomView_Record_Model::getInstanceById($record);
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

            } else {
                $customViewModel = new CustomView_Record_Model();
                $customViewModel->setModule($sourceModuleName);
                $viewer->assign('MODE', '');
            }
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    ElseExpression

    Since: 1.4.0

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

    Example

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

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

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

                    $recordStructureModulesField[$relatedModuleName][$referenceField->getFieldName()] = Vtiger_RecordStructure_Model::getInstanceForModule(Vtiger_Module_Model::getInstance($relatedModuleName))->getStructure();
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Define a constant instead of duplicating this literal "duplicate" 3 times.
    Open

            if ($request->getBoolean('duplicate') || $request->isEmpty('record')) {
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by sonar-php

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Define a constant instead of duplicating this literal "record" 3 times.
    Open

            if ($request->getBoolean('duplicate') || $request->isEmpty('record')) {
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by sonar-php

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('CV_PENDING_VALUE', App\CustomView::CV_STATUS_PENDING);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

                $viewer->assign('MODE', 'edit');
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('DUPLICATE_FIELDS', $customViewModel->getDuplicateFields());
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('RELATIONS', $sourceModuleModel->getRelations());
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('ADVANCED_CONDITIONS', \App\Condition::validAdvancedConditions($customViewModel->getAdvancedConditions()));
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('QUALIFIED_MODULE', $sourceModuleName);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('ADVANCE_CRITERIA', $customViewModel->getConditions());
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('CUSTOMVIEW_MODEL', $customViewModel);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('CV_PUBLIC_VALUE', App\CustomView::CV_STATUS_PUBLIC);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('MID', $request->has('mid') ? $request->getInteger('mid') : null);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

                $viewer->assign('MODE', '');
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

                $viewer->assign('CV_PRIVATE_VALUE', App\CustomView::CV_STATUS_PRIVATE);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('RECORD_STRUCTURE_RELATED_MODULES', $recordStructureModulesField);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

                $viewer->assign('RECORD_ID', $record);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('MODULE_MODEL', $sourceModuleModel);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

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

                    $recordStructureModulesField[$relatedModuleName][$referenceField->getFieldName()] = Vtiger_RecordStructure_Model::getInstanceForModule(Vtiger_Module_Model::getInstance($relatedModuleName))->getStructure();
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('CURRENTDATE', date('Y-n-j'));
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('RECORD_STRUCTURE', Vtiger_RecordStructure_Model::getInstanceForModule($sourceModuleModel)->getStructure());
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('SOURCE_MODULE', $sourceModuleName);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

                $viewer->assign('CV_PRIVATE_VALUE', App\CustomView::CV_STATUS_DEFAULT);
    Severity: Critical
    Found in modules/CustomView/views/EditAjax.php by phan

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

            $recordStructureModulesField = [];
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    LongVariable

    Since: 0.2

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

    Example

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

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

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

    class CustomView_EditAjax_View extends Vtiger_IndexAjax_View

    The class CustomView_EditAjax_View is not named in CamelCase.
    Open

    class CustomView_EditAjax_View extends Vtiger_IndexAjax_View
    {
        /** {@inheritdoc} */
        public function checkPermission(App\Request $request)
        {
    Severity: Minor
    Found in modules/CustomView/views/EditAjax.php by phpmd

    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

            } else {

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

        public function process(App\Request $request)

    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 (0 === $customViewModel->get('presence') && !$request->getBoolean('duplicate')) {

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

            }

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

            $record = $request->getInteger('record');

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

            $viewer->assign('RECORD_STRUCTURE_RELATED_MODULES', $recordStructureModulesField);

    Line exceeds 120 characters; contains 132 characters
    Open

            $viewer->assign('RECORD_STRUCTURE', Vtiger_RecordStructure_Model::getInstanceForModule($sourceModuleModel)->getStructure());

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

            $viewer->assign('CV_PUBLIC_VALUE', App\CustomView::CV_STATUS_PUBLIC);

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

            $viewer->assign('MODULE_MODEL', $sourceModuleModel);

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

            if (is_numeric($sourceModuleName)) {

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

            }

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

                $permissions = \App\Privilege::isPermitted($sourceModuel, 'CreateCustomFilter');

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

                $customViewModel = CustomView_Record_Model::getInstanceById($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

            $viewer->assign('CUSTOMVIEW_MODEL', $customViewModel);

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

            $viewer->assign('CURRENTDATE', date('Y-n-j'));

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

                $viewer->assign('RECORD_ID', $record);

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

            $viewer->assign('MID', $request->has('mid') ? $request->getInteger('mid') : null);

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

            $viewer->assign('RECORD_STRUCTURE', Vtiger_RecordStructure_Model::getInstanceForModule($sourceModuleModel)->getStructure());

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

        public function checkPermission(App\Request $request)

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

                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);

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

            $sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModuleName);

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

            if (!$request->getBoolean('duplicate')) {

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

        }

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

            $moduleName = $request->getModule();

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

                $customViewModel = new CustomView_Record_Model();

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

            $viewer->assign('DUPLICATE_FIELDS', $customViewModel->getDuplicateFields());

    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 ($referenceField->getReferenceList() as $relatedModuleName) {

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

            }

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

            $viewer->assign('SOURCE_MODULE', $sourceModuleName);

    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

            $permissions = false;

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

            if ($request->getBoolean('duplicate') || $request->isEmpty('record')) {

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

            $viewer = $this->getViewer($request);

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

            foreach ($sourceModuleModel->getFieldsByReference() as $referenceField) {

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

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

            $viewer->assign('QUALIFIED_MODULE', $sourceModuleName);

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

            $viewer->assign('RELATIONS', $sourceModuleModel->getRelations());

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

            $viewer->assign('ADVANCED_CONDITIONS', \App\Condition::validAdvancedConditions($customViewModel->getAdvancedConditions()));

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

                $sourceModuleName = \App\Module::getModuleName($sourceModuleName);

    Line exceeds 120 characters; contains 221 characters
    Open

                    $recordStructureModulesField[$relatedModuleName][$referenceField->getFieldName()] = Vtiger_RecordStructure_Model::getInstanceForModule(Vtiger_Module_Model::getInstance($relatedModuleName))->getStructure();

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

                $viewer->assign('CV_PRIVATE_VALUE', App\CustomView::CV_STATUS_DEFAULT);

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

                $viewer->assign('CV_PRIVATE_VALUE', App\CustomView::CV_STATUS_PRIVATE);

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

            $recordStructureModulesField = [];

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

            $viewer->view('EditView.tpl', $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

                $viewer->assign('MODE', '');

    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

                $customViewModel->setModule($sourceModuleName);

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

            $viewer->assign('ADVANCE_CRITERIA', $customViewModel->getConditions());

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

            if (!$permissions) {

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

                    continue;

    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

            $viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());

    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

            } else {

    Line exceeds 120 characters; contains 131 characters
    Open

            $viewer->assign('ADVANCED_CONDITIONS', \App\Condition::validAdvancedConditions($customViewModel->getAdvancedConditions()));

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

            $sourceModuel = $request->getByType('source_module', \App\Purifier::ALNUM);

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

                $permissions = CustomView_Record_Model::getInstanceById($request->getInteger('record'))->isEditable();

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

            $sourceModuleName = $request->getByType('source_module', \App\Purifier::ALNUM);

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

                    $recordStructureModulesField[$relatedModuleName][$referenceField->getFieldName()] = Vtiger_RecordStructure_Model::getInstanceForModule(Vtiger_Module_Model::getInstance($relatedModuleName))->getStructure();

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

                $viewer->assign('MODE', 'edit');

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

            }

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

            $viewer->assign('CV_PENDING_VALUE', App\CustomView::CV_STATUS_PENDING);

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

    class CustomView_EditAjax_View extends Vtiger_IndexAjax_View

    There are no issues that match your filters.

    Category
    Status