YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/Vtiger/views/Index.php

Summary

Maintainability
A
1 hr
Test Coverage
F
0%

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

    public function process(App\Request $request)
    {
        $viewer = $this->getViewer($request);
        $userModel = \App\User::getCurrentUserModel();
        $warnings = \App\SystemWarnings::getWarnings('all');
Severity: Minor
Found in modules/Settings/Vtiger/views/Index.php - About 1 hr to fix

    The class Settings_Vtiger_Index_View has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13.
    Open

    class Settings_Vtiger_Index_View extends \App\Controller\View\Page
    {
        use \App\Controller\ExposeMethod;
        use \App\Controller\Traits\SettingsPermission;
    
    

    CouplingBetweenObjects

    Since: 1.1.0

    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

    Example

    class Foo {
        /**
         * @var \foo\bar\X
         */
        private $x = null;
    
        /**
         * @var \foo\bar\Y
         */
        private $y = null;
    
        /**
         * @var \foo\bar\Z
         */
        private $z = null;
    
        public function setFoo(\Foo $foo) {}
        public function setBar(\Bar $bar) {}
        public function setBaz(\Baz $baz) {}
    
        /**
         * @return \SplObjectStorage
         * @throws \OutOfRangeException
         * @throws \InvalidArgumentException
         * @throws \ErrorException
         */
        public function process(\Iterator $it) {}
    
        // ...
    }

    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

    The method preProcess has a boolean flag argument $display, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function preProcess(App\Request $request, $display = true)

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

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

    The method postProcess has a boolean flag argument $display, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function postProcess(App\Request $request, $display = true)

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

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

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

                    'VALUE' => Users_Record_Model::getCount(true),

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

            $warnings = \App\SystemWarnings::getWarnings('all');

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

            $viewer->assign('WARNINGS', $userModel->isAdmin() && !App\Session::has('SystemWarnings') ? $warnings : []);

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

            if (\App\Security\AdminAccess::isPermitted('Log')) {

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_Vtiger_Menu_Model' in method 'preProcessSettings'.
    Open

            $viewer->assign('MENUS', Settings_Vtiger_Menu_Model::getMenu($moduleName, $view, $request->getMode(), $selected));

    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\Log' in method 'getSecurityCount'.
    Open

            $count += App\Log::getLogs('access_for_api', 'oneDay', true);

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

            if (\App\Security\AdminAccess::isPermitted('Users')) {

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_ModuleManager_Module_Model' in method 'process'.
    Open

                    'VALUE' => Settings_ModuleManager_Module_Model::getModulesCount(true),

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_Workflows_Record_Model' in method 'process'.
    Open

                    'VALUE' => Settings_Workflows_Record_Model::getAllAmountWorkflowsAmount(),

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

            if (\App\Security\AdminAccess::isPermitted('Workflows')) {

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

            if (\App\Security\AdminAccess::isPermitted('ModuleManager')) {

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_Vtiger_MenuItem_Model' in method 'process'.
    Open

            $viewer->assign('SETTINGS_SHORTCUTS', Settings_Vtiger_MenuItem_Model::getPinnedItems());

    StaticAccess

    Since: 1.4.0

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

    Example

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

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

    Avoid using static access to class 'Settings_Vtiger_Tracker_Model' in method '__construct'.
    Open

            Settings_Vtiger_Tracker_Model::addBasic('view');

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

            if (\App\Security\AdminAccess::isPermitted('Logs')) {

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

            $userModel = \App\User::getCurrentUserModel();

    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\Log' in method 'getSecurityCount'.
    Open

            $count = App\Log::getLogs('access_for_admin', 'oneDay', true);

    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\Log' in method 'getSecurityCount'.
    Open

            $count += App\Log::getLogs('access_to_record', 'oneDay', true);

    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\Log' in method 'getSecurityCount'.
    Open

            return $count + App\Log::getLogs('access_for_user', 'oneDay', true);

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

            $count = App\Log::getLogs('access_for_admin', 'oneDay', true);

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Define a constant instead of duplicating this literal "VALUE" 5 times.
    Open

                    'VALUE' => \count($warnings),

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

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

    Noncompliant Code Example

    With the default threshold of 3:

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

    Compliant Solution

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

    Exceptions

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

    Define a constant instead of duplicating this literal "LABEL" 5 times.
    Open

                    'LABEL' => 'PLU_SYSTEM_WARNINGS',

    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('WARNINGS', $userModel->isAdmin() && !App\Session::has('SystemWarnings') ? $warnings : []);
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

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

            $userModel = \App\User::getCurrentUserModel();
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

    Argument 1 (folders) is 'all' but \App\SystemWarnings::getWarnings() takes array defined at /code/app/SystemWarnings.php:60
    Open

            $warnings = \App\SystemWarnings::getWarnings('all');

    Call to method getLogs from undeclared class \App\Log
    Open

            $count += App\Log::getLogs('access_to_record', 'oneDay', true);
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

    Call to method getLogs from undeclared class \App\Log
    Open

            $count += App\Log::getLogs('access_for_api', 'oneDay', true);
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

    Call to method getLogs from undeclared class \App\Log
    Open

            return $count + App\Log::getLogs('access_for_user', 'oneDay', true);
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('MENUS', Settings_Vtiger_Menu_Model::getMenu($moduleName, $view, $request->getMode(), $selected));
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

    Return type of getFooterScripts() is undeclared type \App\Controller\View\Vtiger_JsScript_Model[]
    Open

        public function getFooterScripts(App\Request $request)

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('SETTINGS_SHORTCUTS', Settings_Vtiger_MenuItem_Model::getPinnedItems());
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

    Call to method getLogs from undeclared class \App\Log
    Open

            $count = App\Log::getLogs('access_for_admin', 'oneDay', true);
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('SELECTED_PAGE', $selected);
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

    Return type of getHeaderCss() is undeclared type \App\Controller\View\Vtiger_CssScript_Model[]
    Open

        public function getHeaderCss(App\Request $request)

    Call to undeclared method \Vtiger_Viewer::assign
    Open

            $viewer->assign('SYSTEM_MONITORING', $monitoringData);
    Severity: Critical
    Found in modules/Settings/Vtiger/views/Index.php by phan

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

    class Settings_Vtiger_Index_View extends \App\Controller\View\Page

    The class Settings_Vtiger_Index_View is not named in CamelCase.
    Open

    class Settings_Vtiger_Index_View extends \App\Controller\View\Page
    {
        use \App\Controller\ExposeMethod;
        use \App\Controller\Traits\SettingsPermission;
    
    

    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

        use \App\Controller\ExposeMethod;

    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

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

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

                    'HREF' => 'index.php?module=Log&parent=Settings&module=Log&view=LogsOwasp',

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

                $monitoringData['USERS_COUNT'] = [

    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 function getMenu()

    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

         * @param \App\Request $request

    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

            $userModel = \App\User::getCurrentUserModel();

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

                $monitoringData['WARNINGS_COUNT'] = [

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

         */

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

         * @return int

    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

        }

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

            $viewer->assign('SYSTEM_MONITORING', $monitoringData);

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

            $viewer->assign('SETTINGS_SHORTCUTS', Settings_Vtiger_MenuItem_Model::getPinnedItems());

    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 function getSecurityCount()

    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->preProcessSettings($request);

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

        public function postProcess(App\Request $request, $display = true)

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

                    'ICON' => 'yfi yfi-users-2',

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

         *

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

            return [];

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

                    '~vendor/ckeditor/ckeditor/ckeditor.js',

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

                    'modules.Settings.Vtiger.resources.Index',

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

        {

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

                    'ICON' => 'yfi yfi-security-errors-2',

    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

            $moduleName = $request->getModule();

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

            return array_merge($this->checkAndConvertCssStyles([

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

        }

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

        /** {@inheritdoc} */

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

            $viewer->view('SettingsMenuStart.tpl', $qualifiedModuleName);

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

                    'VALUE' => \count($warnings),

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

                    'HREF' => 'index.php?module=Logs&parent=Settings&view=SystemWarnings',

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

                ];

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

                    'VALUE' => Settings_Workflows_Record_Model::getAllAmountWorkflowsAmount(),

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

        /**

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

                    '~libraries/datatables.net-responsive/js/dataTables.responsive.js',

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

        }

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

        /** {@inheritdoc} */

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

            $this->postProcessSettings($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

            $warnings = \App\SystemWarnings::getWarnings('all');

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

                    'LABEL' => 'PLU_SYSTEM_WARNINGS',

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

                    'LABEL' => 'PLU_USERS',

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

                    'modules.Settings.Vtiger.resources.List',

    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

        /** {@inheritdoc} */

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

        {

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

            $view = $request->getByType('view', \App\Purifier::STANDARD, '');

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

            if (\App\Security\AdminAccess::isPermitted('Users')) {

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

                    'VALUE' => Users_Record_Model::getCount(true),

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

                ];

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

        public function postProcessSettings(App\Request $request)

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

            return $count + App\Log::getLogs('access_for_user', 'oneDay', true);

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

         */

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

        public function preProcessSettings(App\Request $request)

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

            $viewer->assign('WARNINGS', $userModel->isAdmin() && !App\Session::has('SystemWarnings') ? $warnings : []);

    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 (\App\Security\AdminAccess::isPermitted('ModuleManager')) {

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

            $this->getViewer($request)->view('SettingsMenuEnd.tpl', $request->getModule(false));

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

         */

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

                parent::getFooterScripts($request),

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

                    'modules.Vtiger.resources.Vtiger',

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

                    '~libraries/datatables.net-responsive-bs4/js/responsive.bootstrap4.js',

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

        public function preProcess(App\Request $request, $display = true)

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

            parent::postProcess($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

            $qualifiedModuleName = $request->getModule(false);

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

                    'ICON' => 'yfi yfi-system-warnings-2',

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

            }

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

                    'HREF' => 'index.php?module=ModuleManager&parent=Settings&view=List',

    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

        {

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

            Settings_Vtiger_Tracker_Model::addBasic('view');

    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('MENUS', Settings_Vtiger_Menu_Model::getMenu($moduleName, $view, $request->getMode(), $selected));

    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

                    'VALUE' => Settings_ModuleManager_Module_Model::getModulesCount(true),

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

                    'HREF' => 'index.php?module=Workflows&parent=Settings&view=List',

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

        }

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

         * Post process settings.

    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

                '~libraries/datatables.net-bs4/css/dataTables.bootstrap4.css',

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

        use \App\Controller\Traits\SettingsPermission;

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

         * Pre process settings.

    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

            $selected = null;

    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 (\App\Security\AdminAccess::isPermitted('Workflows')) {

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

                    '~vendor/ckeditor/ckeditor/adapters/jquery.js',

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

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

                    'LABEL' => 'PLU_SECURITY',

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

            }

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

                    'HREF' => 'index.php?module=Users&parent=Settings&view=List',

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

                    'LABEL' => 'PLU_WORKFLOWS_ACTIVE',

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

            $count += App\Log::getLogs('access_for_api', 'oneDay', true);

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

            $type = \App\Process::$processName;

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

                    '~libraries/jstree/dist/jstree.js',

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

                    '~libraries/datatables.net/js/jquery.dataTables.js',

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

                    'modules.Settings.Vtiger.resources.Edit',

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

                    "modules.Settings.$moduleName.resources.$moduleName",

    Line exceeds 120 characters; contains 122 characters
    Open

            $viewer->assign('MENUS', Settings_Vtiger_Menu_Model::getMenu($moduleName, $view, $request->getMode(), $selected));

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

                $monitoringData['SECURITY_COUNT'] = [

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

                $monitoringData['ACTIVE_MODULES'] = [

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

            }

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

                $monitoringData['ALL_WORKFLOWS'] = [

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

            $viewer->view('Index.tpl', $request->getModule(false));

    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

        {

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

            $count = App\Log::getLogs('access_for_admin', 'oneDay', true);

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

        public function getFooterScripts(App\Request $request)

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

                $this->checkAndConvertJsScripts([

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

                    'modules.Settings.YetiForce.resources.Shop',

    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 (\App\Security\AdminAccess::isPermitted('Logs')) {

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

                    'VALUE' => $this->getSecurityCount(),

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

                    'LABEL' => 'PLU_MODULES',

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

                    'ICON' => 'yfi yfi-workflows-2',

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

         * Get security alerts count.

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

            $count += App\Log::getLogs('access_to_record', 'oneDay', true);

    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

                '~libraries/jstree-bootstrap-theme/dist/themes/proton/style.css',

    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

            parent::preProcess($request, false);

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

            $viewer->assign('SELECTED_PAGE', $selected);

    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

            $monitoringData = [];

    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 (\App\Security\AdminAccess::isPermitted('Log')) {

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

                    'ICON' => 'yfi yfi-modules-2',

    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

            return array_merge(

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

                    'modules.Vtiger.resources.List',

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

                    "modules.Settings.$moduleName.resources.Index",

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

                    "modules.Settings.$moduleName.resources.$type",

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

                '~libraries/datatables.net-responsive-bs4/css/responsive.bootstrap4.css',

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

            ]), parent::getHeaderCss($request));

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

                    '~libraries/datatables.net-bs4/js/dataTables.bootstrap4.js',

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

                    'modules.Settings.Vtiger.resources.Vtiger',

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

    class Settings_Vtiger_Index_View extends \App\Controller\View\Page

    There are no issues that match your filters.

    Category
    Status