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';
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';
- Read upRead up
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')));
- Read upRead up
- Exclude checks
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')));
- Read upRead up
- Exclude checks
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')));
- Read upRead up
- Exclude checks
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');
- Read upRead up
- Exclude checks
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')) {
- Read upRead up
- Exclude checks
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',
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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');
- Read upRead up
- Exclude checks
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();
- Read upRead up
- Exclude checks
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();
- Exclude checks
Argument 1 (ver1)
is int
but \version_compare()
takes string
Open
if (version_compare($OSSMail->version, '1.39', '>')) {
- Exclude checks
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();
}
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class OSSMail
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Module name.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (Settings_ModuleManager_Library_Model::checkLibrary('roundcube')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'linkto' => 'index.php?module=OSSMail&parent=Settings&view=index',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @throws \App\Exceptions\NotAllowedMethod
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ('module.disabled' === $eventType) {
- Exclude checks
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();
- Exclude checks
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();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$displayLabel = 'OSSMail';
- Exclude checks
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();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $moduleName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
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();
- Exclude checks
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')));
- Exclude checks
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();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'iconpath' => 'adminIcon-mail-download-history',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dbCommand = App\Db::getInstance()->createCommand();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'name' => 'Mail',
- Exclude checks
Line exceeds 120 characters; contains 172 characters Open
$dbCommand->insert('vtiger_ossmails_logs', ['action' => 'Action_InstallModule', 'info' => $moduleName . ' ' . $Module->version, 'user' => $user_id])->execute();
- Exclude checks
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')));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $eventType
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function moduleHandler($moduleName, $eventType)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$dbCommand->update('vtiger_tab', ['customized' => 0], ['name' => $displayLabel])->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ('module.postupdate' === $eventType) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'description' => 'LBL_OSSMAIL_DESCRIPTION',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
]);
- Exclude checks
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();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (version_compare($OSSMail->version, '1.39', '>')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Settings_Vtiger_Module_Model::addSettingsField('LBL_MAIL_TOOLS', [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$Module = vtlib\Module::getInstance($moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$user_id = Users_Record_Model::getCurrentUserModel()->get('user_name');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$OSSMail = vtlib\Module::getInstance('OSSMail');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('module.postinstall' === $eventType) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ('module.enabled' === $eventType) {
- Exclude checks
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();
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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';
- Read upRead up
- Exclude checks
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();
}
}