YetiForceCompany/YetiForceCRM

View on GitHub
modules/OSSMail/OSSMail.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method moduleHandler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function moduleHandler($moduleName, $eventType)
    {
        $dbCommand = App\Db::getInstance()->createCommand();
        if ('module.postinstall' === $eventType) {
            $displayLabel = 'OSSMail';
Severity: Minor
Found in modules/OSSMail/OSSMail.php - About 1 hr to fix

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

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.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 '42', column '15').
    Open

                    throw new \App\Exceptions\NotAllowedMethod(\App\Language::translateArgs('ERR_NO_REQUIRED_LIBRARY_FEATURES_DOWNLOAD', 'Settings:Base', 'roundcube', \App\Language::translate('VTLIB_LBL_MODULE_MANAGER', 'Settings:Base')));
    Severity: Minor
    Found in modules/OSSMail/OSSMail.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\Language' in method 'moduleHandler'.
    Open

                    throw new \App\Exceptions\NotAllowedMethod(\App\Language::translateArgs('ERR_NO_REQUIRED_LIBRARY_FEATURES_DOWNLOAD', 'Settings:Base', 'roundcube', \App\Language::translate('VTLIB_LBL_MODULE_MANAGER', 'Settings:Base')));
    Severity: Minor
    Found in modules/OSSMail/OSSMail.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\Language' in method 'moduleHandler'.
    Open

                    throw new \App\Exceptions\NotAllowedMethod(\App\Language::translateArgs('ERR_NO_REQUIRED_LIBRARY_FEATURES_DOWNLOAD', 'Settings:Base', 'roundcube', \App\Language::translate('VTLIB_LBL_MODULE_MANAGER', 'Settings:Base')));
    Severity: Minor
    Found in modules/OSSMail/OSSMail.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 'vtlib\Module' in method 'moduleHandler'.
    Open

                $OSSMail = vtlib\Module::getInstance('OSSMail');
    Severity: Minor
    Found in modules/OSSMail/OSSMail.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 'Settings_ModuleManager_Library_Model' in method 'moduleHandler'.
    Open

                if (Settings_ModuleManager_Library_Model::checkLibrary('roundcube')) {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.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 'Settings_Vtiger_Module_Model' in method 'moduleHandler'.
    Open

                Settings_Vtiger_Module_Model::addSettingsField('LBL_MAIL_TOOLS', [
                    'name' => 'Mail',
                    'iconpath' => 'adminIcon-mail-download-history',
                    'description' => 'LBL_OSSMAIL_DESCRIPTION',
                    'linkto' => 'index.php?module=OSSMail&parent=Settings&view=index',
    Severity: Minor
    Found in modules/OSSMail/OSSMail.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 'vtlib\Module' in method 'moduleHandler'.
    Open

                $Module = vtlib\Module::getInstance($moduleName);
    Severity: Minor
    Found in modules/OSSMail/OSSMail.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 "vtiger_ossmails_logs" 4 times.
    Open

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_InstallModule', 'info' => $moduleName . ' ' . $Module->version, 'user' => $user_id])->execute();
    Severity: Critical
    Found in modules/OSSMail/OSSMail.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.

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

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_DisabledModule', 'info' => $moduleName, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
    Severity: Critical
    Found in modules/OSSMail/OSSMail.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.

    Define a constant instead of duplicating this literal "Y-m-d H:i:s" 3 times.
    Open

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_DisabledModule', 'info' => $moduleName, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
    Severity: Critical
    Found in modules/OSSMail/OSSMail.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.

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

                $user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
    Severity: Critical
    Found in modules/OSSMail/OSSMail.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.

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

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_InstallModule', 'info' => $moduleName . ' ' . $Module->version, 'user' => $user_id])->execute();
    Severity: Critical
    Found in modules/OSSMail/OSSMail.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 \App\Db::createCommand
    Open

            $dbCommand = App\Db::getInstance()->createCommand();
    Severity: Critical
    Found in modules/OSSMail/OSSMail.php by phan

    Argument 1 (ver1) is int but \version_compare() takes string
    Open

                if (version_compare($OSSMail->version, '1.39', '>')) {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phan

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

                if (version_compare($OSSMail->version, '1.39', '>')) {
                    $user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
                    $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_UpdateModule', 'info' => $moduleName . ' ' . $OSSMail->version, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
                }
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php and 1 other location - About 30 mins to fix
    modules/OSSMailScanner/OSSMailScanner.php on lines 54..57

    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 90.

    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 OSSMail
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

         * Module name.
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                if (Settings_ModuleManager_Library_Model::checkLibrary('roundcube')) {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                    'linkto' => 'index.php?module=OSSMail&parent=Settings&view=index',
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                    $user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

         * @throws \App\Exceptions\NotAllowedMethod
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

            } elseif ('module.disabled' === $eventType) {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                    $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_UpdateModule', 'info' => $moduleName . ' ' . $OSSMail->version, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

    Line exceeds 120 characters; contains 213 characters
    Open

                    $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_UpdateModule', 'info' => $moduleName . ' ' . $OSSMail->version, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_InstallModule', 'info' => $moduleName . ' ' . $Module->version, 'user' => $user_id])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

         * @param string $moduleName
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

    Line exceeds 120 characters; contains 185 characters
    Open

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_DisabledModule', 'info' => $moduleName, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                    throw new \App\Exceptions\NotAllowedMethod(\App\Language::translateArgs('ERR_NO_REQUIRED_LIBRARY_FEATURES_DOWNLOAD', 'Settings:Base', 'roundcube', \App\Language::translate('VTLIB_LBL_MODULE_MANAGER', 'Settings:Base')));
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

    Line exceeds 120 characters; contains 184 characters
    Open

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_EnabledModule', 'info' => $moduleName, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                    'iconpath' => 'adminIcon-mail-download-history',
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

            $dbCommand = App\Db::getInstance()->createCommand();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                    'name' => 'Mail',
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

    Line exceeds 120 characters; contains 172 characters
    Open

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_InstallModule', 'info' => $moduleName . ' ' . $Module->version, 'user' => $user_id])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

    Line exceeds 120 characters; contains 235 characters
    Open

                    throw new \App\Exceptions\NotAllowedMethod(\App\Language::translateArgs('ERR_NO_REQUIRED_LIBRARY_FEATURES_DOWNLOAD', 'Settings:Base', 'roundcube', \App\Language::translate('VTLIB_LBL_MODULE_MANAGER', 'Settings:Base')));
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

         * @param string $eventType
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

        public function moduleHandler($moduleName, $eventType)
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $dbCommand->update('vtiger_tab', ['customized' => 0], ['name' => $displayLabel])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

            } elseif ('module.postupdate' === $eventType) {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                    'description' => 'LBL_OSSMAIL_DESCRIPTION',
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                ]);
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_DisabledModule', 'info' => $moduleName, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                }
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                if (version_compare($OSSMail->version, '1.39', '>')) {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                Settings_Vtiger_Module_Model::addSettingsField('LBL_MAIL_TOOLS', [
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $Module = vtlib\Module::getInstance($moduleName);
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $OSSMail = vtlib\Module::getInstance('OSSMail');
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

            if ('module.postinstall' === $eventType) {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

            } elseif ('module.enabled' === $eventType) {
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

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

                $dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_EnabledModule', 'info' => $moduleName, 'user' => $user_id, 'start_time' => date('Y-m-d H:i:s')])->execute();
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpcodesniffer

    The variable $Module is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $user_id is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $OSSMail is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $user_id is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $user_id is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $user_id is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $OSSMail is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $user_id is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $user_id is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $user_id is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $user_id is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $Module is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $OSSMail is not named in camelCase.
    Open

        public function moduleHandler($moduleName, $eventType)
        {
            $dbCommand = App\Db::getInstance()->createCommand();
            if ('module.postinstall' === $eventType) {
                $displayLabel = 'OSSMail';
    Severity: Minor
    Found in modules/OSSMail/OSSMail.php by phpmd

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status