YetiForceCompany/YetiForceCRM

View on GitHub
modules/OpenStreetMap/actions/GetMarkers.php

Summary

Maintainability
A
3 hrs
Test Coverage
C
76%

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

    public function process(App\Request $request)
    {
        $data = [];
        $sourceModule = $request->getByType('srcModule');
        $srcModuleModel = Vtiger_Module_Model::getInstance($sourceModule);
Severity: Minor
Found in modules/OpenStreetMap/actions/GetMarkers.php - About 1 hr to fix

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

        public function process(App\Request $request)
        {
            $data = [];
            $sourceModule = $request->getByType('srcModule');
            $srcModuleModel = Vtiger_Module_Model::getInstance($sourceModule);
    Severity: Minor
    Found in modules/OpenStreetMap/actions/GetMarkers.php - About 1 hr to fix

    Cognitive Complexity

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

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

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

    Further reading

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

        public function process(App\Request $request)
        {
            $data = [];
            $sourceModule = $request->getByType('srcModule');
            $srcModuleModel = Vtiger_Module_Model::getInstance($sourceModule);

    NPathComplexity

    Since: 0.1

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

    Example

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

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

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

        public function process(App\Request $request)
        {
            $data = [];
            $sourceModule = $request->getByType('srcModule');
            $srcModuleModel = Vtiger_Module_Model::getInstance($sourceModule);

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

                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 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 '21', column '14').
    Open

                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 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 '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

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

                        'value' => \App\Language::translate($key, $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 'OpenStreetMap_Coordinate_Model' in method 'process'.
    Open

            $coordinatesModel = OpenStreetMap_Coordinate_Model::getInstance();

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Users_Privileges_Model' in method 'checkPermission'.
    Open

            $currentUserPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();

    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

            $srcModuleModel = 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 'App\Condition' in method 'process'.
    Open

            $coordinatesModel->set('search_value', App\Condition::validSearchValue($request->getByType('search_value', 'Text'), $sourceModule, $request->getByType('search_key', 'Alnum'), $request->getByType('operator')));

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                $coordinatesModel->set('advancedConditions', \App\Condition::validAdvancedConditions($advancedConditions));

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

    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

                    $coordinatesCenter = ['error' => \App\Language::translate('LBL_NOT_FOUND_PLACE', 'OpenStreetMap')];

    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 assigning values to variables in if clauses and the like (line '46', column '7').
    Open

        public function process(App\Request $request)
        {
            $data = [];
            $sourceModule = $request->getByType('srcModule');
            $srcModuleModel = Vtiger_Module_Model::getInstance($sourceModule);

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

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

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

            $coordinatesModel->set('search_params', App\Condition::validSearchParams($sourceModule, $request->getArray('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

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

            $coordinatesModel->set('radius', $request->isEmpty('radius', true) ? 0 : $request->getInteger('radius', 0));

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

            $coordinatesModel->set('cache', $request->get('cache'));

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

            $coordinatesModel->set('operator', $request->getByType('operator'));

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

            $coordinatesModel->set('selectedIds', $request->getArray('selected_ids', '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 "srcModule" 3 times.
    Open

            if (!$request->isEmpty('srcModule') && !$currentUserPrivilegesModel->hasModulePermission($request->getByType('srcModule'))) {

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

            $coordinatesModel->set('viewname', $request->getByType('viewname', '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 "groupBy" 3 times.
    Open

            $coordinatesModel->set('groupBy', $request->getByType('groupBy', '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 "searchValue" 3 times.
    Open

            $coordinatesModel->set('searchValue', $request->get('searchValue'));

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

            if ($advancedConditions = $request->has('advancedConditions') ? $request->getArray('advancedConditions') : []) {

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Call to undeclared method \Vtiger_Module_Model::isAllowModules
    Open

            if ($moduleModel->isAllowModules($sourceModule) && !$request->isEmpty('viewname')) {

    Argument 1 (mixed) is string but \Users_Privileges_Model::hasModulePermission() takes int defined at /code/modules/Users/models/Privileges.php:101
    Open

            if (!$currentUserPrivilegesModel->hasModulePermission($request->getModule())) {

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

            $currentUserPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();

    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 OpenStreetMap_GetMarkers_Action extends Vtiger_BasicAjax_Action

    The class OpenStreetMap_GetMarkers_Action is not named in CamelCase.
    Open

    class OpenStreetMap_GetMarkers_Action extends Vtiger_BasicAjax_Action
    {
        /** {@inheritdoc} */
        public function checkPermission(App\Request $request)
        {

    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

            $coordinatesModel->set('search_value', App\Condition::validSearchValue($request->getByType('search_value', 'Text'), $sourceModule, $request->getByType('search_key', 'Alnum'), $request->getByType('operator')));

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

        /** {@inheritdoc} */

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

            if (!$currentUserPrivilegesModel->hasModulePermission($request->getModule())) {

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

        {

    Line exceeds 120 characters; contains 217 characters
    Open

            $coordinatesModel->set('search_value', App\Condition::validSearchValue($request->getByType('search_value', 'Text'), $sourceModule, $request->getByType('search_key', 'Alnum'), $request->getByType('operator')));

    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

                $data['coordinates'] = $coordinatesModel->getCoordinatesCustomView();

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

                        'color' => $value,

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

                $data['cache'] = $coordinatesModel->readCoordinatesCache();

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

                        'value' => \App\Language::translate($key, $sourceModule),

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

        {

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

            $coordinatesModel->set('selectedIds', $request->getArray('selected_ids', 'Alnum'));

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

                    $legend[] = [

    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

            if ($request->has('groupBy')) {

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

                $legend = [];

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

            $coordinatesModel->set('lat', $request->get('lat'));

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

            $moduleModel = Vtiger_Module_Model::getInstance($request->getModule());

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

                $data['legend'] = $legend;

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

                if (empty($coordinatesCenter['lat']) && empty($coordinatesCenter['lon'])) {

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

            $response->setResult($data);

    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

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

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

            $coordinatesModel->set('excludedIds', $request->getArray('excluded_ids', 'Alnum'));

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

            $coordinatesModel->set('lon', $request->get('lon'));

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

            if ($moduleModel->isAllowModules($sourceModule) && !$request->isEmpty('viewname')) {

    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

            $sourceModule = $request->getByType('srcModule');

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

            $coordinatesModel->set('cache', $request->get('cache'));

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

            if (!$request->isEmpty('cache')) {

    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

        public function checkPermission(App\Request $request)

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

            $currentUserPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();

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

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

    Line exceeds 120 characters; contains 134 characters
    Open

            $coordinatesModel->set('search_params', App\Condition::validSearchParams($sourceModule, $request->getArray('search_params')));

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

            $coordinatesCenter = $coordinatesModel->getCoordinatesCenter();

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

                foreach (OpenStreetMap_Coordinate_Model::$colors as $key => $value) {

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

                $data['coordinatesCenter'] = $coordinatesCenter;

    Line exceeds 120 characters; contains 133 characters
    Open

            if (!$request->isEmpty('srcModule') && !$currentUserPrivilegesModel->hasModulePermission($request->getByType('srcModule'))) {

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

            $coordinatesModel = OpenStreetMap_Coordinate_Model::getInstance();

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

            $coordinatesModel->set('operator', $request->getByType('operator'));

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

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

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

            }

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

            if (!empty($coordinatesCenter) || !$request->isEmpty('searchValue')) {

    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

            $coordinatesModel->set('srcModuleModel', $srcModuleModel);

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

            $coordinatesModel->set('viewname', $request->getByType('viewname', 'Alnum'));

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

            $coordinatesModel->set('groupBy', $request->getByType('groupBy', 'Alnum'));

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

            $coordinatesModel->set('searchValue', $request->get('searchValue'));

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

            if ($advancedConditions = $request->has('advancedConditions') ? $request->getArray('advancedConditions') : []) {

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

            }

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

            $coordinatesModel->set('searchKey', $request->getByType('search_key', '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

            $coordinatesModel->set('radius', $request->isEmpty('radius', true) ? 0 : $request->getInteger('radius', 0));

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

            $coordinatesModel->set('search_params', App\Condition::validSearchParams($sourceModule, $request->getArray('search_params')));

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

                $coordinatesModel->set('advancedConditions', \App\Condition::validAdvancedConditions($advancedConditions));

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

            }

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

                    $coordinatesCenter = ['error' => \App\Language::translate('LBL_NOT_FOUND_PLACE', 'OpenStreetMap')];

    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 (!$request->isEmpty('srcModule') && !$currentUserPrivilegesModel->hasModulePermission($request->getByType('srcModule'))) {

    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

            $coordinatesModel->set('request', $request);

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

            }

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

    class OpenStreetMap_GetMarkers_Action extends Vtiger_BasicAjax_Action

    There are no issues that match your filters.

    Category
    Status