YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/Widgets/actions/SaveAjax.php

Summary

Maintainability
A
1 hr
Test Coverage
F
0%

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

    public function saveWidget(App\Request $request)
    {
        $params = $request->getMultiDimensionArray('params', [
            'tabid' => 'Integer',
            'data' => [
Severity: Minor
Found in modules/Settings/Widgets/actions/SaveAjax.php - About 1 hr to fix

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

        private function validateLimit(array $params): bool
        {
            $returnVal = false;
            if (isset($params['data']['type'])) {
                switch ($params['data']['type']) {

    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 '104', column '19').
    Open

            $response = new Vtiger_Response();

    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 '64', column '14').
    Open

                throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||limit||' . $params['data']['limit'], 406);

    MissingImport

    Since: 2.7.0

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

    Example

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

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

    Missing class import via use statement (line '87', column '19').
    Open

            $response = new Vtiger_Response();

    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 '73', column '19').
    Open

            $response = new Vtiger_Response();

    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 'Settings_Widgets_Module_Model' in method 'removeWidget'.
    Open

            Settings_Widgets_Module_Model::removeWidget($params['wid']);

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

                $params['data']['orderby'] = \App\Json::decode($params['data']['orderby']);

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

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

    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 'Settings_Widgets_Module_Model' in method 'updateSequence'.
    Open

            Settings_Widgets_Module_Model::updateSequence($params);

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_Widgets_Module_Model' in method 'saveWidget'.
    Open

            Settings_Widgets_Module_Model::saveWidget($params);

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class '\App\Json' in method 'saveWidget'.
    Open

                $params['data']['search_params'] = \App\Json::decode($params['data']['search_params']);

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

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

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

                'message' => \App\Language::translate('Update has been completed', $request->getModule(false)),

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

                'tabid' => 'Integer',

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

                    'type' => 'Alnum',

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

                    'limit' => 'Integer',

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

            $params = $request->getMultiDimensionArray('params', [

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

                    'orderby' => \App\Purifier::TEXT

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

                'success' => 1,

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

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

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

                    'search_params' => 'Text',

    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.

    Invalid offset "orderby" of array type array{search_params:mixed}
    Open

                $params['data']['orderby'] = \App\Json::decode($params['data']['orderby']);

    Argument 1 (encodedValue) is null but \App\Json::decode() takes string defined at /code/app/Json.php:37
    Open

                $params['data']['orderby'] = \App\Json::decode($params['data']['orderby']);

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

    class Settings_Widgets_SaveAjax_Action extends Settings_Vtiger_Basic_Action

    The class Settings_Widgets_SaveAjax_Action is not named in CamelCase.
    Open

    class Settings_Widgets_SaveAjax_Action extends Settings_Vtiger_Basic_Action
    {
        /** {@inheritdoc} */
        public function __construct()
        {

    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

                    'wid' => 'Integer',

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

                    'actionSelect' => 'Integer',

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

                    'filter' => '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

            $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

            $response->setResult([

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

                    case 'Summary':

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

            $this->exposeMethod('removeWidget');

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

         * Save widget.

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

                    'relatedfields' => ['Text'],

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

                    'fromRelation' => \App\Purifier::TEXT,

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

                throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||limit||' . $params['data']['limit'], 406);

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

        {

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

        }

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

            if (isset($params['data']['type'])) {

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

        public function __construct()

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

         */

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

                    'label' => 'Text',

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

                    'email_template' => \App\Purifier::INTEGER,

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

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

                'message' => \App\Language::translate('Update has been completed', $request->getModule(false)),

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

         * Validate limit for widgets.

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

                    case 'DetailView':

    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

            $params = $request->getMultiDimensionArray('params', [

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

                'data' => [

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

                ]

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

            if (isset($params['data']['search_params'])) {

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

            Settings_Widgets_Module_Model::saveWidget($params);

    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

            ]);

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

        public function updateSequence(App\Request $request)

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

                    case 'FastEdit':

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

                    case 'Updates':

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

            }

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

        /** {@inheritdoc} */

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

                    'viewtype' => 'Alnum',

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

                    'color' => \App\Purifier::BOOL,

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

            $params = $request->getMultiDimensionArray('params', [

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

        }

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

                'success' => 1,

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

            $returnVal = false;

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

            return $returnVal;

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

         *

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

                    'relatedmodule' => 'Integer',

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

                    'switchHeader' => 'Text',

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

        public function removeWidget(App\Request $request)

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

                'tabid' => 'Integer',

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

                    'column' => 'Integer',

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

                    case 'UpdatesList':

    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->exposeMethod('updateSequence');

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

                    'limit' => 'Integer',

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

                    'valueType' => '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

            $response = new Vtiger_Response();

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

                    'type' => '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

            $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

                'data' => [[

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

                    'index' => 'Integer',

    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

                    case 'PDFViewer':

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

                        $returnVal = true;

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

            parent::__construct();

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

        public function saveWidget(App\Request $request)

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

                    'no_result_text' => 'Integer',

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

                    'FastEdit' => 'Integer',

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

                    'chartType' => 'Text',

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

                    'groupField' => '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

            $params = $request->getMultiDimensionArray('params', [

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

         *

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

        {

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

                    'switchTypeInHeader' => '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

                    case 'WYSIWYG':

    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

        }

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

         *

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

         * @throws \App\Exceptions\IllegalValue

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

                $params['data']['search_params'] = \App\Json::decode($params['data']['search_params']);

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

            Settings_Widgets_Module_Model::updateSequence($params);

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

         */

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

                    case 'SummaryCategory':

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

                'tabid' => 'Integer',

    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

                    'relation_id' => 'Integer',

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

                    'valueField' => 'Text',

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

            if (!$this->validateLimit($params)) {

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

        {

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

                switch ($params['data']['type']) {

    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

                    'action' => 'Integer',

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

                $params['data']['orderby'] = \App\Json::decode($params['data']['orderby']);

    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

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

                    'search_params' => '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

            if (isset($params['data']['orderby'])) {

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

                'success' => 1,

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

            Settings_Widgets_Module_Model::removeWidget($params['wid']);

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

                'success' => 1,

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

                'message' => \App\Language::translate('Removed widget', $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

        {

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

                        $returnVal = $params['data']['limit'] >= 1;

    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->exposeMethod('saveWidget');

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

                    'checkbox' => 'Text',

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

                    'field_name' => 'Alnum',

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

                    'orderby' => \App\Purifier::TEXT

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

                'wid' => 'Integer',

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

         * @param array $params

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

        /**

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

                    'customView' => ['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

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

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

        private function validateLimit(array $params): bool

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

    class Settings_Widgets_SaveAjax_Action extends Settings_Vtiger_Basic_Action

    There are no issues that match your filters.

    Category
    Status