YetiForceCompany/YetiForceCRM

View on GitHub
modules/CustomView/actions/Save.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Method getCVModelFromRequest has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function getCVModelFromRequest(App\Request $request)
    {
        $cvId = $request->getInteger('record');
        if (!empty($cvId)) {
            $customViewModel = CustomView_Record_Model::getInstanceById($cvId);
Severity: Minor
Found in modules/CustomView/actions/Save.php - About 1 hr to fix

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

        private function getCVModelFromRequest(App\Request $request)
        {
            $cvId = $request->getInteger('record');
            if (!empty($cvId)) {
                $customViewModel = CustomView_Record_Model::getInstanceById($cvId);
    Severity: Minor
    Found in modules/CustomView/actions/Save.php - About 35 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
    Severity: Minor
    Found in modules/CustomView/actions/Save.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 '30', column '19').
    Open

            $response = new Vtiger_Response();
    Severity: Minor
    Found in modules/CustomView/actions/Save.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 '21', column '14').
    Open

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

    MissingImport

    Since: 2.7.0

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

    Example

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

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

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

                $defaultCustomViewModel = CustomView_Record_Model::getInstanceById($cvIdDefault);
    Severity: Minor
    Found in modules/CustomView/actions/Save.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 'getCVModelFromRequest'.
    Open

                \App\Condition::validAdvancedConditions($advancedConditions);
    Severity: Minor
    Found in modules/CustomView/actions/Save.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

            $moduleModel = Vtiger_Module_Model::getInstance($request->getByType('source_module', 2));
    Severity: Minor
    Found in modules/CustomView/actions/Save.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\Language' in method 'process'.
    Open

                    'message' => \App\Language::translate('LBL_CUSTOM_VIEW_NAME_DUPLICATES_EXIST', $request->getModule(false)),
    Severity: Minor
    Found in modules/CustomView/actions/Save.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\Privilege' in method 'checkPermission'.
    Open

            if (!App\Privilege::isPermitted($request->getByType('source_module', 2), 'CreateCustomFilter')) {
    Severity: Minor
    Found in modules/CustomView/actions/Save.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 'getCVModelFromRequest'.
    Open

                $customViewModel = CustomView_Record_Model::getInstanceById($cvId);
    Severity: Minor
    Found in modules/CustomView/actions/Save.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 {
                $response->setResult([
                    'success' => false,
                    'message' => \App\Language::translate('LBL_CUSTOM_VIEW_NAME_DUPLICATES_EXIST', $request->getModule(false)),
                ]);
    Severity: Minor
    Found in modules/CustomView/actions/Save.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 'CustomView_Record_Model' in method 'getCVModelFromRequest'.
    Open

                $customViewModel = CustomView_Record_Model::getCleanInstance();
    Severity: Minor
    Found in modules/CustomView/actions/Save.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\Json' in method 'getCVModelFromRequest'.
    Open

                $customViewData['advanced_conditions'] = \App\Json::encode($advancedConditions);
    Severity: Minor
    Found in modules/CustomView/actions/Save.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\Purifier' in method 'getCVModelFromRequest'.
    Open

                $customLabel = \App\Purifier::decodeHtml(trim($customLabel));
    Severity: Minor
    Found in modules/CustomView/actions/Save.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 getCVModelFromRequest uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $customViewModel = CustomView_Record_Model::getCleanInstance();
                $customViewModel->setModule($request->getByType('source_module', \App\Purifier::ALNUM));
            }
    Severity: Minor
    Found in modules/CustomView/actions/Save.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

    Define a constant instead of duplicating this literal "source_module" 4 times.
    Open

            if (!App\Privilege::isPermitted($request->getByType('source_module', 2), 'CreateCustomFilter')) {
    Severity: Critical
    Found in modules/CustomView/actions/Save.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->has('record') && !CustomView_Record_Model::getInstanceById($request->getInteger('record'))->isEditable()) {
    Severity: Critical
    Found in modules/CustomView/actions/Save.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 "setmetrics" 3 times.
    Open

                'setmetrics' => $request->isEmpty('setmetrics') ? 0 : $request->getInteger('setmetrics'),
    Severity: Critical
    Found in modules/CustomView/actions/Save.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 "color" 3 times.
    Open

                'color' => !$request->isEmpty('color') ? $request->getByType('color', 'Color') : '',
    Severity: Critical
    Found in modules/CustomView/actions/Save.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.

    Argument 2 (emptyFunction) is 'Alnum' but \App\Request::isEmpty() takes bool|false defined at /code/app/Request.php:577
    Open

                if (!$request->isEmpty('mid', 'Alnum')) {
    Severity: Minor
    Found in modules/CustomView/actions/Save.php by phan

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

                $defaultCustomViewModel = CustomView_Record_Model::getInstanceById($cvIdDefault);
    Severity: Minor
    Found in modules/CustomView/actions/Save.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_Save_Action extends \App\Controller\Action

    The class CustomView_Save_Action is not named in CamelCase.
    Open

    class CustomView_Save_Action extends \App\Controller\Action
    {
        /** {@inheritdoc} */
        public function checkPermission(App\Request $request)
        {
    Severity: Minor
    Found in modules/CustomView/actions/Save.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

            if (!App\Privilege::isPermitted($request->getByType('source_module', 2), 'CreateCustomFilter')) {

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

        {

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

                $cvId = $customViewModel->getId();

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

            if (!empty($cvId)) {

    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

                \App\Condition::validAdvancedConditions($advancedConditions);

    Line exceeds 120 characters; contains 129 characters
    Open

            if ($request->has('record') && !CustomView_Record_Model::getInstanceById($request->getInteger('record'))->isEditable()) {

    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

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

        public function process(App\Request $request)

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

                $url = $moduleModel->getListViewUrl() . '&viewname=' . $cvId;

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

                $response->setResult([

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

            $response->emit();

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

            $customViewData['columnslist'] = $selectedColumnsList;

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

            if (!empty($advancedConditions['relationId']) || !empty($advancedConditions['relationColumns'])) {

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

            $moduleModel = Vtiger_Module_Model::getInstance($request->getByType('source_module', 2));

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

                    'message' => \App\Language::translate('LBL_CUSTOM_VIEW_NAME_DUPLICATES_EXIST', $request->getModule(false)),

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

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

            $customViewData = [

    Line exceeds 120 characters; contains 133 characters
    Open

                $cvIdDefault = App\CustomView::getInstance($request->getByType('source_module', \App\Purifier::ALNUM))->getDefaultCvId();

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

            if ($request->has('record') && !CustomView_Record_Model::getInstanceById($request->getInteger('record'))->isEditable()) {

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

            $customViewModel = $this->getCVModelFromRequest($request);

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

                if (!$request->isEmpty('mid', 'Alnum')) {

    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

            }

    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

            $response = new Vtiger_Response();

    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

                $selectedColumnsList = array_keys($defaultCustomViewModel->getSelectedFields());

    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

            if (!$customViewModel->checkDuplicate()) {

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

         * Function to get the custom view model based on the request parameters.

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

         * @return CustomView_Record_Model or Module specific Record Model instance

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

                $customLabel = \App\Purifier::decodeHtml(trim($customLabel));

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

                    'ignore' => 'Bool',

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

                    'success' => false,

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

                'cvid' => $cvId,

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

            $selectedColumnsList = $request->getArray('columnslist', 'Text');

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

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

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

                $cvIdDefault = App\CustomView::getInstance($request->getByType('source_module', \App\Purifier::ALNUM))->getDefaultCvId();

    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

            if (!empty($advFilterList)) {

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

            }

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

                $customViewData['duplicatefields'] = $duplicateFields;

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

            $duplicateFields = $request->getMultiDimensionArray('duplicatefields', [

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

                    'fieldid' => 'Integer',

    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

                'setdefault' => $request->getInteger('setdefault'),

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

            $customFieldNames = $request->getArray('customFieldNames', 'Text');

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

                ],

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

            $advancedConditions = $request->getArray('advanced_conditions', 'Text');

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

                $customViewData['advanced_conditions'] = \App\Json::encode($advancedConditions);

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

        }

    Line exceeds 120 characters; contains 123 characters
    Open

                    'message' => \App\Language::translate('LBL_CUSTOM_VIEW_NAME_DUPLICATES_EXIST', $request->getModule(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

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

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

            }

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

                'featured' => $request->getInteger('featured', 0),

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

            $advFilterList = $request->getArray('advfilterlist', 'Text');

    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

                'status' => $request->getInteger('status', \App\CustomView::CV_STATUS_PRIVATE),

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

            return $customViewModel->setData($customViewData);

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

            ];

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

                $defaultCustomViewModel = CustomView_Record_Model::getInstanceById($cvIdDefault);

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

            }

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

            }

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

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

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

                    $url .= '&mid=' . $request->getInteger('mid');

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

        private function getCVModelFromRequest(App\Request $request)

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

                'description' => $request->getForHtml('description'),

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

            if (empty($selectedColumnsList)) {

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

            array_walk($customFieldNames, function (&$customLabel) {

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

            }

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

                $customViewModel->save();

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

                $response->setResult(['success' => true, 'id' => $cvId, 'listviewurl' => $url]);

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

                'viewname' => $request->getByType('viewname', 'Text'),

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

                'setmetrics' => $request->isEmpty('setmetrics') ? 0 : $request->getInteger('setmetrics'),

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

                'color' => !$request->isEmpty('color') ? $request->getByType('color', 'Color') : '',

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

                $customViewData['advfilterlist'] = $advFilterList;

    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

                $customViewModel = CustomView_Record_Model::getInstanceById($cvId);

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

            }

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

            $customViewData['customFieldNames'] = $customFieldNames;

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

                $customViewModel = CustomView_Record_Model::getCleanInstance();

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

            if (!empty($duplicateFields)) {

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

    class CustomView_Save_Action extends \App\Controller\Action

    There are no issues that match your filters.

    Category
    Status