YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/LayoutEditor/actions/Block.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Method save has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function save(App\Request $request)
    {
        $blockId = $request->get('blockid');
        $sourceModule = $request->getByType('sourceModule', 2);
        $modueInstance = Vtiger_Module_Model::getInstance($sourceModule);
Severity: Minor
Found in modules/Settings/LayoutEditor/actions/Block.php - About 1 hr to fix

    Function save has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        public function save(App\Request $request)
        {
            $blockId = $request->get('blockid');
            $sourceModule = $request->getByType('sourceModule', 2);
            $modueInstance = Vtiger_Module_Model::getInstance($sourceModule);
    Severity: Minor
    Found in modules/Settings/LayoutEditor/actions/Block.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

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

                $blockInstance = new Settings_LayoutEditor_Block_Model();

    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 '93', 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 '75', 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 '51', 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 'Vtiger_Module_Model' in method 'save'.
    Open

            $modueInstance = Vtiger_Module_Model::getInstance($sourceModule);

    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_Block_Model' in method 'save'.
    Open

                        $responseInfo['sequenceList'] = Vtiger_Block_Model::getAllBlockSequenceList($modueInstance->getId());

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

                    'message' => \App\Language::translate('LBL_DUPLICATES_EXIST', $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 'Vtiger_Block_Model' in method 'save'.
    Open

                    Vtiger_Block_Model::pushDown($beforeBlockSequence, $modueInstance->getId());

    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_Vtiger_Tracker_Model' in method '__construct'.
    Open

            Settings_Vtiger_Tracker_Model::addBasic('save');

    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_Block_Model' in method 'save'.
    Open

                    $beforeBlockInstance = Vtiger_Block_Model::getInstance($beforeBlockId);

    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 save 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_DUPLICATES_EXIST', $request->getModule(false))
                ]);

    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\Language' in method 'delete'.
    Open

                $response->setResult(['success' => false, 'message' => \App\Language::translate('LBL_FIELDS_EXISTS_IN_BLOCK', $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 'Vtiger_Block_Model' in method 'save'.
    Open

                $isDuplicate = Vtiger_Block_Model::checkDuplicate($request->get('label'), $modueInstance->getId());

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

                $response->setResult(['success' => false, 'message' => \App\Language::translate('LBL_DELETE_CUSTOM_BLOCKS', $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 'Vtiger_Block_Model' in method 'delete'.
    Open

            $blockInstance = Vtiger_Block_Model::getInstance($blockId);

    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_Block_Model' in method 'updateSequenceNumber'.
    Open

                Vtiger_Block_Model::updateSequenceNumber($sequenceList);

    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_LayoutEditor_Block_Model' in method 'save'.
    Open

                $blockInstance = Settings_LayoutEditor_Block_Model::getInstance($blockId);

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

            } else {
                $blockInstance = new Settings_LayoutEditor_Block_Model();
                $blockInstance->set('label', $request->get('label'));
                $blockInstance->set('iscustom', '1');
                //Indicates block id after which you need to add the new block

    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_Block_Model' in method 'delete'.
    Open

            $checkIfFieldsExists = Vtiger_Block_Model::checkFieldsExists($blockId);

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

                    'message' => \App\Language::translate('LBL_DUPLICATES_EXIST', $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 "success" 6 times.
    Open

                    $responseInfo = ['id' => $id, 'label' => $blockInstance->get('label'), 'isCustom' => $blockInstance->isCustomized(), 'beforeBlockId' => $beforeBlockId, 'isAddCustomFieldEnabled' => $blockInstance->isAddCustomFieldEnabled(), 'success' => true];

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

                    $beforeBlockSequence = $beforeBlockInstance->get('sequence');

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

                $blockInstance->set('label', $request->get('label'));

    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.

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

    class Settings_LayoutEditor_Block_Action extends Settings_Vtiger_Index_Action

    The class Settings_LayoutEditor_Block_Action is not named in CamelCase.
    Open

    class Settings_LayoutEditor_Block_Action extends Settings_Vtiger_Index_Action
    {
        public function __construct()
        {
            parent::__construct();

    CamelCaseClassName

    Since: 0.2

    It is considered best practice to use the CamelCase notation to name classes.

    Example

    class class_name {
    }

    Source

    Avoid variables with short names like $id. Configured minimum length is 3.
    Open

                    $id = $blockInstance->save($modueInstance);

    ShortVariable

    Since: 0.2

    Detects when a field, local, or parameter has a very short name.

    Example

    class Something {
        private $q = 15; // VIOLATION - Field
        public static function main( array $as ) { // VIOLATION - Formal
            $r = 20 + $this->q; // VIOLATION - Local
            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                $r += $this->q;
            }
        }
    }

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

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

                //Indicates block id after which you need to add the new block

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

                    $id = $blockInstance->save($modueInstance);

    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

            $response = new Vtiger_Response();

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

            $sourceModule = $request->getByType('sourceModule', 2);

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

                $response->setResult(['success' => true]);

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

        }

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

                return;

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

        }

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

                    $response->setResult($responseInfo);

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

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

    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

        public function updateSequenceNumber(App\Request $request)

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

        public function save(App\Request $request)

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

                        //if mode is create add all blocks sequence so that client will place the new block correctly

    Line exceeds 120 characters; contains 121 characters
    Open

                        $responseInfo['sequenceList'] = Vtiger_Block_Model::getAllBlockSequenceList($modueInstance->getId());

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

                }

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

                    }

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

                } catch (Exception $e) {

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

                }

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

            $checkIfFieldsExists = Vtiger_Block_Model::checkFieldsExists($blockId);

    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

        {

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

                $blockInstance->set('iscustom', '1');

    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

                    $response->setError($e->getCode(), $e->getMessage());

    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

         */

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

                $response->setResult(['success' => true]);

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

            $this->exposeMethod('updateSequenceNumber');

    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->setError($e->getCode(), $e->getMessage());

    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

            try {

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

            $blockId = $request->get('blockid');

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

            $modueInstance = Vtiger_Module_Model::getInstance($sourceModule);

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

            $beforeBlockId = false;

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

                $blockInstance->set('display_status', $request->get('display_status'));

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

                $blockInstance->set('label', $request->get('label'));

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

                if (!empty($beforeBlockId)) {

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

                    $newBlockSequence = ($beforeBlockSequence + 1);

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

                    $blockInstance->set('sequence', $newBlockSequence);

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

                $isDuplicate = Vtiger_Block_Model::checkDuplicate($request->get('label'), $modueInstance->getId());

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

         * Delete block.

    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

            $blockInstance = Vtiger_Block_Model::getInstance($blockId);

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

                $response->setResult(['success' => false, 'message' => \App\Language::translate('LBL_DELETE_CUSTOM_BLOCKS', $request->getModule(false))]);

    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

            }

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

            if (!$isDuplicate) {

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

                        $responseInfo['sequenceList'] = Vtiger_Block_Model::getAllBlockSequenceList($modueInstance->getId());

    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

            $blockId = $request->get('blockid');

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

            if (!empty($blockId)) {

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

                    $beforeBlockInstance = Vtiger_Block_Model::getInstance($beforeBlockId);

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

                    //push all other block down so that we can keep new block there

    Line exceeds 120 characters; contains 259 characters
    Open

                    $responseInfo = ['id' => $id, 'label' => $blockInstance->get('label'), 'isCustom' => $blockInstance->isCustomized(), 'beforeBlockId' => $beforeBlockId, 'isAddCustomFieldEnabled' => $blockInstance->isAddCustomFieldEnabled(), 'success' => true];

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

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

                    //To give sequence one more than prev block

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

            try {

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

                $sequenceList = $request->get('sequence');

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

                return;

    Line exceeds 120 characters; contains 150 characters
    Open

                $response->setResult(['success' => false, 'message' => \App\Language::translate('LBL_DELETE_CUSTOM_BLOCKS', $request->getModule(false))]);

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

                $blockInstance->delete(false);

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

                $isDuplicate = false;

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

                $blockInstance = new Settings_LayoutEditor_Block_Model();

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

                $response->setError($e->getCode(), $e->getMessage());

    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

                    Vtiger_Block_Model::pushDown($beforeBlockSequence, $modueInstance->getId());

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

                try {

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

                $response->setResult(['success' => false, 'message' => \App\Language::translate('LBL_FIELDS_EXISTS_IN_BLOCK', $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

            $this->exposeMethod('save');

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

                $blockInstance = Settings_LayoutEditor_Block_Model::getInstance($blockId);

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

                $beforeBlockId = $request->get('beforeBlockId');

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

                ]);

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

            }

    Line exceeds 120 characters; contains 152 characters
    Open

                $response->setResult(['success' => false, 'message' => \App\Language::translate('LBL_FIELDS_EXISTS_IN_BLOCK', $request->getModule(false))]);

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

            $this->exposeMethod('delete');

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

            Settings_Vtiger_Tracker_Model::addBasic('save');

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

                    if (empty($blockId)) {

    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 = new Vtiger_Response();

    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

            } catch (Exception $e) {

    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

                    $beforeBlockSequence = $beforeBlockInstance->get('sequence');

    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

                    $responseInfo = ['id' => $id, 'label' => $blockInstance->get('label'), 'isCustom' => $blockInstance->isCustomized(), 'beforeBlockId' => $beforeBlockId, 'isAddCustomFieldEnabled' => $blockInstance->isAddCustomFieldEnabled(), 'success' => true];

    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

                Vtiger_Block_Model::updateSequenceNumber($sequenceList);

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

        public function delete(App\Request $request)

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

            if ($checkIfFieldsExists) {

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

            }

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

            } catch (Exception $e) {

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

    class Settings_LayoutEditor_Block_Action extends Settings_Vtiger_Index_Action

    There are no issues that match your filters.

    Category
    Status