YetiForceCompany/YetiForceCRM

View on GitHub
modules/Import/views/List.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

Method initializeListViewContents has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function initializeListViewContents(App\Request $request, Vtiger_Viewer $viewer)
    {
        $moduleName = $request->getByType('forModule');
        $cvId = $request->getByType('viewname', 2);
        $pageNumber = $request->getInteger('page');
Severity: Minor
Found in modules/Import/views/List.php - About 2 hrs to fix

    Function initializeListViewContents has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        public function initializeListViewContents(App\Request $request, Vtiger_Viewer $viewer)
        {
            $moduleName = $request->getByType('forModule');
            $cvId = $request->getByType('viewname', 2);
            $pageNumber = $request->getInteger('page');
    Severity: Minor
    Found in modules/Import/views/List.php - About 45 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

                throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
    Severity: Minor
    Found in modules/Import/views/List.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 '82', column '22').
    Open

            $pagingModel = new Vtiger_Paging_Model();
    Severity: Minor
    Found in modules/Import/views/List.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 'Vtiger_Module_Model' in method 'initializeListViewContents'.
    Open

            $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
    Severity: Minor
    Found in modules/Import/views/List.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    The method initializeListViewContents uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $nextSortOrder = 'ASC';
                $sortImage = 'upArrowSmall.png';
            }
    Severity: Minor
    Found in modules/Import/views/List.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

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

    Avoid using static access to class 'Users_Record_Model' in method 'initializeListViewContents'.
    Open

            $viewer->assign('CURRENT_USER_MODEL', Users_Record_Model::getCurrentUserModel());
    Severity: Minor
    Found in modules/Import/views/List.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

            $currentUserPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
    Severity: Minor
    Found in modules/Import/views/List.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Vtiger_RecordStructure_Model' in method 'initializeListViewContents'.
    Open

            $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
    Severity: Minor
    Found in modules/Import/views/List.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 'Import_Data_Action' in method 'getImportDetails'.
    Open

            $importRecords = Import_Data_Action::getImportDetails(\App\User::getCurrentUserModel(), $forModule);
    Severity: Minor
    Found in modules/Import/views/List.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 'CRMEntity' in method 'initializeListViewContents'.
    Open

                $moduleInstance = CRMEntity::getInstance($moduleName);
    Severity: Minor
    Found in modules/Import/views/List.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 'Import_ListView_Model' in method 'initializeListViewContents'.
    Open

            $listViewModel = Import_ListView_Model::getInstance($moduleName, $cvId);
    Severity: Minor
    Found in modules/Import/views/List.php by phpmd

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    The method process uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $this->initializeListViewContents($request, $viewer);
                $moduleName = $request->getByType('forModule');
                $viewer->assign('MODULE_NAME', $moduleName);
                $viewer->view('ImportPreview.tpl', 'Import');
    Severity: Minor
    Found in modules/Import/views/List.php by phpmd

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

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

    Avoid using static access to class '\App\User' in method 'getImportDetails'.
    Open

            $importRecords = Import_Data_Action::getImportDetails(\App\User::getCurrentUserModel(), $forModule);
    Severity: Minor
    Found in modules/Import/views/List.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

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

            if (!$currentUserPrivilegesModel->hasModulePermission($request->getByType('forModule'))) {
    Severity: Critical
    Found in modules/Import/views/List.php by sonar-php

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Call to undeclared method \Vtiger_Viewer::assign
    Open

                $viewer->assign('MODULE_NAME', $moduleName);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Argument 1 (var) is false but \count() takes \Countable|array
    Open

            $noOfEntries = \count($this->listViewEntries);
    Severity: Minor
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('MODULE', $moduleName);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('PAGING_MODEL', $pagingModel);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Reference to undeclared property \CRMEntity->default_order_by
    Open

                $orderBy = $moduleInstance->default_order_by;
    Severity: Minor
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('PAGE_NUMBER', $pageNumber);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('LISTVIEW_ENTRIES_COUNT', $noOfEntries);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('LISTVIEW_ENTRIES', $this->listViewEntries);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('IMPORT_RECORDS', $importRecords);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('MODULE', $moduleName);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('CURRENT_USER_MODEL', Users_Record_Model::getCurrentUserModel());
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('LISTVIEW_HEADERS', $this->listViewHeaders);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('TYPE', $request->get('type'));
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('SORT_IMAGE', $sortImage);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Assigning \Vtiger_Record_Model[] to property but \Import_List_View->listViewEntries is false
    Open

                $this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);
    Severity: Minor
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('COLUMN_NAME', $orderBy);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('FOR_MODULE', $forModule);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Reference to undeclared property \CRMEntity->default_sort_order
    Open

                $sortOrder = $moduleInstance->default_sort_order;
    Severity: Minor
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('ORDER_BY', $orderBy);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('NEXT_SORT_ORDER', $nextSortOrder);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to method getCurrentUserModel from undeclared class \App\User (Did you mean class \Tests\App\User)
    Open

            $importRecords = Import_Data_Action::getImportDetails(\App\User::getCurrentUserModel(), $forModule);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Assigning \Vtiger_Field_Model[] to property but \Import_List_View->listViewHeaders is false
    Open

                $this->listViewHeaders = $listViewModel->getListViewHeaders();
    Severity: Minor
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('SORT_ORDER', $sortOrder);
    Severity: Critical
    Found in modules/Import/views/List.php by phan

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

            $currentUserPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
    Severity: Minor
    Found in modules/Import/views/List.php by phpmd

    LongVariable

    Since: 0.2

    Detects when a field, formal or local variable is declared with a long name.

    Example

    class Something {
        protected $reallyLongIntName = -3; // VIOLATION - Field
        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
            $otherReallyLongName = -5; // VIOLATION - Local
            for ($interestingIntIndex = 0; // VIOLATION - For
                 $interestingIntIndex < 10;
                 $interestingIntIndex++ ) {
            }
        }
    }

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

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

            $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
    Severity: Minor
    Found in modules/Import/views/List.php by phpmd

    LongVariable

    Since: 0.2

    Detects when a field, formal or local variable is declared with a long name.

    Example

    class Something {
        protected $reallyLongIntName = -3; // VIOLATION - Field
        public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
            $otherReallyLongName = -5; // VIOLATION - Local
            for ($interestingIntIndex = 0; // VIOLATION - For
                 $interestingIntIndex < 10;
                 $interestingIntIndex++ ) {
            }
        }
    }

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

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

    class Import_List_View extends \App\Controller\View\Page

    The class Import_List_View is not named in CamelCase.
    Open

    class Import_List_View extends \App\Controller\View\Page
    {
        use \App\Controller\ExposeMethod;
    
        protected $listViewEntries = false;
    Severity: Minor
    Found in modules/Import/views/List.php by phpmd

    CamelCaseClassName

    Since: 0.2

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

    Example

    class class_name {
    }

    Source

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

        {

    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

            if (empty($pageNumber)) {

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

            $viewer->assign('MODULE', $moduleName);

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

        public function initializeListViewContents(App\Request $request, Vtiger_Viewer $viewer)

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

            $moduleName = $request->getByType('forModule');

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

            $orderBy = $request->getForSql('orderby');

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

                $nextSortOrder = 'ASC';

    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

        protected $listViewEntries = false;

    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

            $viewer = $this->getViewer($request);

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

                $sortOrder = $moduleInstance->default_sort_order;

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

            $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);

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

            $moduleName = $request->getModule();

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

            $viewer->assign('TYPE', $request->get('type'));

    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

            $this->exposeMethod('getImportDetails');

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

            }

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

            $mode = $request->getMode();

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

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

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

            $viewer->assign('NEXT_SORT_ORDER', $nextSortOrder);

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

            $viewer = $this->getViewer($request);

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

            $importRecords = Import_Data_Action::getImportDetails(\App\User::getCurrentUserModel(), $forModule);

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

            $viewer->assign('IMPORT_RECORDS', $importRecords);

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

         */

    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

                $this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);

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

            $viewer->assign('COLUMN_NAME', $orderBy);

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

            $viewer->view('ImportDetails.tpl', 'Import');

    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->initializeListViewContents($request, $viewer);

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

            $sortOrder = $request->getForSql('sortorder');

    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

                $pageNumber = 1;

    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

            $viewer->assign('PAGE_NUMBER', $pageNumber);

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

                $viewer->view('ImportPreview.tpl', 'Import');

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

            $viewer->assign('CURRENT_USER_MODEL', Users_Record_Model::getCurrentUserModel());

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

            $pageNumber = $request->getInteger('page');

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

            $viewer->assign('SORT_ORDER', $sortOrder);

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

            $viewer->assign('LISTVIEW_HEADERS', $this->listViewHeaders);

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

            $forModule = $request->getByType('forModule');

    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

         * Process.

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

            }

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

            $noOfEntries = \count($this->listViewEntries);

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

        {

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

            $viewer->assign('FOR_MODULE', $forModule);

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

                $moduleName = $request->getByType('forModule');

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

        {

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

                $sortImage = 'upArrowSmall.png';

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

                $listViewModel->set('orderby', $orderBy);

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

            $viewer->assign('SORT_IMAGE', $sortImage);

    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

            if (!empty($orderBy)) {

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

        protected $listViewHeaders = false;

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

                $orderBy = $moduleInstance->default_order_by;

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

            $moduleModel = Vtiger_Module_Model::getInstance($moduleName);

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

            if (!$this->listViewEntries) {

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

            $viewer->assign('PAGING_MODEL', $pagingModel);

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

            $viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());

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

        }

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

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

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

        // Function to initialize the required data in smarty to display the List View Contents

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

            }

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

                $listViewModel->set('sortorder', $sortOrder);

    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->listViewHeaders = $listViewModel->getListViewHeaders();

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

            $viewer->assign('LISTVIEW_ENTRIES', $this->listViewEntries);

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

        public function getImportDetails(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

                $viewer->assign('MODULE_NAME', $moduleName);

    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

                $moduleInstance = CRMEntity::getInstance($moduleName);

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

            $viewer->assign('MODULE', $moduleName);

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

        {

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

                $sortImage = 'downArrowSmall.png';

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

            $listViewModel = Import_ListView_Model::getInstance($moduleName, $cvId);

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

            $pagingModel->set('page', $pageNumber);

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

        use \App\Controller\ExposeMethod;

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

            }

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

                $nextSortOrder = 'DESC';

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

            if (!$this->listViewHeaders) {

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

            $viewer->assign('ORDER_BY', $orderBy);

    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

            if (!$currentUserPrivilegesModel->hasModulePermission($request->getByType('forModule'))) {

    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 (!empty($mode)) {

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

                $this->invokeExposedMethod($mode, $request);

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

            if (empty($orderBy) && empty($sortOrder)) {

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

            if ('ASC' == $sortOrder) {

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

            $viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);

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

            $viewer->assign('LISTVIEW_ENTRIES_COUNT', $noOfEntries);

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

    class Import_List_View extends \App\Controller\View\Page

    There are no issues that match your filters.

    Category
    Status