YetiForceCompany/YetiForceCRM

View on GitHub
modules/Vtiger/actions/ExportData.php

Summary

Maintainability
B
6 hrs
Test Coverage
F
0%

Method setDataFromRequest has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function setDataFromRequest(App\Request $request)
    {
        if ($request->has('xmlExportType')) {
            $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
        }
Severity: Major
Found in modules/Vtiger/actions/ExportData.php - About 2 hrs to fix

    Function setDataFromRequest has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        public function setDataFromRequest(App\Request $request)
        {
            if ($request->has('xmlExportType')) {
                $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
            }
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.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 setDataFromRequest() has an NPath complexity of 2016. The configured NPath complexity threshold is 200.
    Open

        public function setDataFromRequest(App\Request $request)
        {
            if ($request->has('xmlExportType')) {
                $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
            }
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    NPathComplexity

    Since: 0.1

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

    Example

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

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

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

        public function setDataFromRequest(App\Request $request)
        {
            if ($request->has('xmlExportType')) {
                $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
            }
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    CyclomaticComplexity

    Since: 0.1

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

    Example

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

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

    Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed.
    Open

        public function setDataFromRequest(App\Request $request)
    Severity: Critical
    Found in modules/Vtiger/actions/ExportData.php by sonar-php

    Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

    See

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

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

    MissingImport

    Since: 2.7.0

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

    Example

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

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

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

                        $pagingModel = new \Vtiger_Paging_Model();
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    MissingImport

    Since: 2.7.0

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

    Example

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

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

    Missing class import via use statement (line '116', column '16').
    Open

                        throw new \App\Exceptions\IllegalValue('ERR_FIELD_NOT_FOUND||mode');
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    MissingImport

    Since: 2.7.0

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

    Example

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

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

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

            $searchParams = \App\Condition::validSearchParams($this->moduelName, $request->getArray('search_params'));
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

                $queryGenerator->setAdvancedConditions(\App\Condition::validAdvancedConditions($advancedConditions));
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid assigning values to variables in if clauses and the like (line '77', column '7').
    Open

        public function setDataFromRequest(App\Request $request)
        {
            if ($request->has('xmlExportType')) {
                $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
            }
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

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

            if ($operator && $searchValue = \App\Condition::validSearchValue($request->getByType('search_value', \App\Purifier::TEXT), $this->moduelName, $request->getByType('search_key', \App\Purifier::ALNUM), $operator)) {
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid assigning values to variables in if clauses and the like (line '108', column '10').
    Open

        public function setDataFromRequest(App\Request $request)
        {
            if ($request->has('xmlExportType')) {
                $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
            }
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    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\Config' in method 'setDataFromRequest'.
    Open

                        $exportLimit = \App\Config::performance('MAX_NUMBER_EXPORT_RECORDS');
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid assigning values to variables in if clauses and the like (line '71', column '20').
    Open

        public function setDataFromRequest(App\Request $request)
        {
            if ($request->has('xmlExportType')) {
                $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
            }
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    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\Config' in method 'process'.
    Open

                ->setLimit(\App\Config::performance('MAX_NUMBER_EXPORT_RECORDS'))
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

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

            $userPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Call to method exportData from undeclared class \App\Export\ExportRecords
    Open

            $this->exportModel->exportData();
    Severity: Critical
    Found in modules/Vtiger/actions/ExportData.php by phan

    Call to method getQueryGenerator from undeclared class \App\Export\ExportRecords
    Open

            $queryGenerator = $this->exportModel->getQueryGenerator();
    Severity: Critical
    Found in modules/Vtiger/actions/ExportData.php by phan

    Reference to instance property fullData from undeclared class \App\Export\ExportRecords
    Open

            $this->exportModel->fullData = true;
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phan

    Call to method setLimit from undeclared class \App\Export\ExportRecords
    Open

                        $this->exportModel->setLimit($limit);
    Severity: Critical
    Found in modules/Vtiger/actions/ExportData.php by phan

    Property \Vtiger_ExportData_Action->exportModel has undeclared type \App\Export\ExportRecords
    Open

        protected $exportModel;
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phan

    Call to method sendHttpHeader from undeclared class \App\Export\ExportRecords
    Open

            $this->exportModel->sendHttpHeader();
    Severity: Critical
    Found in modules/Vtiger/actions/ExportData.php by phan

    Call to method setTemplate from undeclared class \App\Export\ExportRecords
    Open

                $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));
    Severity: Critical
    Found in modules/Vtiger/actions/ExportData.php by phan

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

                    case 'ExportSelectedRecords':
                        $selectedIds = $request->getArray('selected_ids', \App\Purifier::ALNUM);
                        if ($selectedIds && 'all' !== $selectedIds[0]) {
                            $queryGenerator->addCondition('id', $selectedIds, 'e');
                        }
    Severity: Major
    Found in modules/Vtiger/actions/ExportData.php and 1 other location - About 2 hrs to fix
    modules/Users/actions/ExportData.php on lines 53..65

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 135.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    class Vtiger_ExportData_Action extends Vtiger_Mass_Action

    The class Vtiger_ExportData_Action is not named in CamelCase.
    Open

    class Vtiger_ExportData_Action extends Vtiger_Mass_Action
    {
        /** @var string Module name */
        protected $moduelName;
        /** @var \App\Export\ExportRecords Export model instance */
    Severity: Minor
    Found in modules/Vtiger/actions/ExportData.php by phpmd

    CamelCaseClassName

    Since: 0.2

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

    Example

    class class_name {
    }

    Source

    Terminating statement must be indented to the same level as the CASE body
    Open

                        break;

    Terminating statement must be indented to the same level as the CASE body
    Open

                        break;

    Terminating statement must be indented to the same level as the CASE body
    Open

                        break;

    Terminating statement must be indented to the same level as the CASE body
    Open

                        throw new \App\Exceptions\IllegalValue('ERR_FIELD_NOT_FOUND||mode');

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

         * @throws \App\Exceptions\NoPermitted

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

        /**

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

            $queryGenerator->setStateCondition($request->getByType('entityState'));

    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 (!$userPrivilegesModel->hasModuleActionPermission($this->moduelName, 'Export')) {

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

                ->setLimit(\App\Config::performance('MAX_NUMBER_EXPORT_RECORDS'))

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

        public function setDataFromRequest(App\Request $request)

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

            }

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

                    case 'ExportSelectedRecords':

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

                            $queryGenerator->addCondition('id', $excludedIds, 'n');

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

                        if ($operator && $searchValue && $searchKey) {

    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 220 characters
    Open

            if ($operator && $searchValue = \App\Condition::validSearchValue($request->getByType('search_value', \App\Purifier::TEXT), $this->moduelName, $request->getByType('search_key', \App\Purifier::ALNUM), $operator)) {

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

            $queryGenerator = $this->exportModel->getQueryGenerator();

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

                    case 'ExportCurrentPage':

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

                        $this->exportModel->setLimit($limit);

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

                            ->setLimit($limit)

    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->exportModel->sendHttpHeader();

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

         * Set condition data in export model.

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

                        $limit = $pagingModel->getPageLimit();

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

                            $queryGenerator->addCondition($searchKey, $searchValue, $operator);

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

                        }

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

        protected $moduelName;

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

         * @param \App\Request $request

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

            }

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

                        if ($excludedIds = $request->getArray('excluded_ids', \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

            }

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

            $this->setDataFromRequest($request);

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

                        $exportLimit = \App\Config::performance('MAX_NUMBER_EXPORT_RECORDS');

    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

            $this->moduelName = $request->getModule();

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

         *

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

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

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

                        $pagingModel = new \Vtiger_Paging_Model();

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

                            $limit = $exportLimit;

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

                        $offset = ($currentPage - 1) * $limit;

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

                        $selectedIds = $request->getArray('selected_ids', \App\Purifier::ALNUM);

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

                        if ($selectedIds && 'all' !== $selectedIds[0]) {

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

        {

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

            $userPrivilegesModel = 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);

    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 process(App\Request $request)

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

         *

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

            }

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

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

    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

         * Function to check permission.

    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 138 characters
    Open

            $this->exportModel = \App\Export\Records::getInstance($this->moduelName, $request->getByType('export_type', \App\Purifier::ALNUM))

    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

                        $queryGenerator

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

                ->setFormat(\App\Export\Records::EXPORT_FORMAT);

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

            $operator = $request->isEmpty('operator') ? '' : $request->getByType('operator');

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

                        if ($operator && $searchValue && $searchKey) {

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

                            $queryGenerator->addCondition($searchKey, $searchValue, $operator);

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

                        throw new \App\Exceptions\IllegalValue('ERR_FIELD_NOT_FOUND||mode');

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

            $this->exportModel->exportData();

    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

            $queryGenerator->initForCustomViewById($cvId);

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

                $queryGenerator->setAdvancedConditions(\App\Condition::validAdvancedConditions($advancedConditions));

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

         * Function is called by the controller.

    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

                $this->exportModel->setTemplate($request->getByType('xmlExportType', 'Text'));

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

                        if ($limit > $exportLimit) {

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

                        $queryGenerator->parseAdvFilter($queryGenerator->parseBaseSearchParamsToCondition($searchParams));

    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

        /** @var \App\Export\ExportRecords Export model instance */

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

        }

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

        protected $exportModel;

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

            $this->exportModel->fullData = true;

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

         * @return void

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

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

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

            $searchParams = \App\Condition::validSearchParams($this->moduelName, $request->getArray('search_params'));

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

                            ->parseAdvFilter($queryGenerator->parseBaseSearchParamsToCondition($searchParams));

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

                }

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

        /** @var string Module name */

    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

            $this->exportModel = \App\Export\Records::getInstance($this->moduelName, $request->getByType('export_type', \App\Purifier::ALNUM))

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

            switch ($request->getMode()) {

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

                    case 'ExportAllData':

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

                        $currentPage = $request->getInteger('page', 1) ?: 1;

    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

        public function checkPermission(App\Request $request)

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

        }

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

        {

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

            if ($operator && $searchValue = \App\Condition::validSearchValue($request->getByType('search_value', \App\Purifier::TEXT), $this->moduelName, $request->getByType('search_key', \App\Purifier::ALNUM), $operator)) {

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

                            ->setOffset($offset)

    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

                            $queryGenerator->addCondition('id', $selectedIds, 'e');

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        }

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    default:

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    case 'ExportCurrentPage':

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    case 'ExportSelectedRecords':

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

    class Vtiger_ExportData_Action extends Vtiger_Mass_Action

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        }

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        if ($operator && $searchValue && $searchKey) {

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        }

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        if ($limit > $exportLimit) {

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        }

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    case 'ExportAllData':

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        if ($excludedIds = $request->getArray('excluded_ids', \App\Purifier::INTEGER)) {

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        if ($operator && $searchValue && $searchKey) {

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        if ($selectedIds && 'all' !== $selectedIds[0]) {

    Line indented incorrectly; expected 16 spaces, found 20
    Open

                        }

    Closing brace indented incorrectly; expected 8 spaces, found 12
    Open

                }

    There are no issues that match your filters.

    Category
    Status