importUserModuleStep2 accesses the super-global variable $_FILES. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Method importUserModuleStep2
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
Function importUserModuleStep2
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- 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
Method importUserModuleStep3
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function importUserModuleStep3(App\Request $request)
{
$viewer = $this->getViewer($request);
$qualifiedModuleName = $request->getModule(false);
$importModuleName = $request->get('module_import_name');
The method importUserModuleStep2() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed. Open
public function importUserModuleStep2(App\Request $request)
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Missing class import via use statement (line '93', column '19'). Open
$package = new vtlib\Package();
- 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
Missing class import via use statement (line '148', column '19'). Open
$package = new vtlib\Package();
- 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
Missing class import via use statement (line '41', column '14'). Open
throw new \App\Exceptions\AppException(\App\Language::translate('LBL_ERROR_IMPORT_IN_DEMO'));
- 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
Missing class import via use statement (line '145', column '19'). Open
$package = new vtlib\Layout();
- 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
Missing class import via use statement (line '181', column '19'). Open
$package = new vtlib\Language();
- 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
Missing class import via use statement (line '142', column '19'). Open
$package = new vtlib\Language();
- 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
Missing class import via use statement (line '183', column '19'). Open
$package = new vtlib\Package();
- 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
The method importUserModuleStep2 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$package = new vtlib\Package();
$importModuleName = $package->getModuleNameFromZip($uploadFileName);
$importModuleDepVtVersion = $package->getDependentVtigerVersion();
if (null === $importModuleName || $package->_errorText) {
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\vtlib\Deprecated' in method 'importUserModuleStep2'. Open
\vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);
- 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 'process'. Open
throw new \App\Exceptions\AppException(\App\Language::translate('LBL_ERROR_IMPORT_IN_DEMO'));
- 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\Deprecated' in method 'importUserModuleStep2'. Open
\vtlib\Deprecated::checkFileAccess($uploadDir);
- 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 'importUserModuleStep2'. Open
$moduleInstance = vtlib\Module::getInstance($importModuleName);
- 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 'updateUserModuleStep3'. Open
$package->update(vtlib\Module::getInstance($importModuleName), $uploadFileName);
- 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\Deprecated' in method 'updateUserModuleStep3'. Open
\vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);
- 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
The method importUserModuleStep2 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$uploadFile = 'usermodule_' . time() . '.zip';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Settings_ModuleManager_Module_Model' in method 'importUserModuleStep3'. Open
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
- 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
The method importUserModuleStep3 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$package = new vtlib\Package();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Settings_ModuleManager_Module_Model' in method 'importUserModuleStep2'. Open
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
- 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\Deprecated' in method 'importUserModuleStep3'. Open
\vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);
- 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
The method importUserModuleStep2 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$viewer->assign('MODULEIMPORT_EXISTS', false);
$viewer->assign('MODULEIMPORT_DIR_EXISTS', false);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'App\Purifier' in method 'importUserModuleStep2'. Open
$moduleLicence = App\Purifier::purify($package->getLicense());
- 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\Deprecated' in method 'updateUserModuleStep3'. Open
\vtlib\Deprecated::checkFileAccess($uploadFileName);
- 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
The method updateUserModuleStep3 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$package = new vtlib\Package();
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method updateUserModuleStep3 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$package->update(vtlib\Module::getInstance($importModuleName), $uploadFileName);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\Config' in method 'process'. Open
$systemMode = \App\Config::main('systemMode');
- 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
The method importUserModuleStep2 uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// We need these information to push for Update if module is detected to be present.
$moduleLicence = App\Purifier::purify($package->getLicense());
$viewer->assign('MODULEIMPORT_FILE', $uploadFile);
$viewer->assign('MODULEIMPORT_TYPE', $package->type());
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\vtlib\Deprecated' in method 'importUserModuleStep3'. Open
\vtlib\Deprecated::checkFileAccess($uploadFileName);
- 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_Module_Model' in method 'updateUserModuleStep3'. Open
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
- 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 "QUALIFIED_MODULE" 4 times. Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- 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 "language" 3 times. Open
if ('language' === strtolower($importType)) {
- 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 "upgradePackage" 3 times. Open
if ($request->has('upgradePackage')) {
- 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 \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_ERROR', $error);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('IMPORT_MODULE_TYPE', $importModuleType);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE_NAME', $request->getModule(false));
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_TYPE', $package->type());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_DIR_EXISTS', false);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_DIR', $moduleimport_dir_name);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_PACKAGE', $package);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_ERROR', $package->_errorText);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_NAME', $importModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_EXISTS', $moduleimport_exists);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_PARAMETERS', $package->getParameters());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_LABEL', (string) ($package->_modulexml->label ?? $package->_modulexml->name));
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_LICENSE', $moduleLicence);
- Exclude checks
Saw unextractable annotation for comment '* @return <array> - List of Vtiger_JsScript_Model instances'</array>
Open
* @return <Array> - List of Vtiger_JsScript_Model instances
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_DEP_VTVERSION', $importModuleDepVtVersion);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('IMPORT_MODULE_NAME', $importModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_FILE', $uploadFile);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ICONS', \App\YetiForce\Shop::PREMIUM_ICONS);
- Exclude checks
Reference to constant PREMIUM_ICONS
from undeclared class \App\YetiForce\Shop
Open
$viewer->assign('ICONS', \App\YetiForce\Shop::PREMIUM_ICONS);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('UPDATE_MODULE_NAME', $importModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_DIR_EXISTS', $moduleimport_dir_exists);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULEIMPORT_EXISTS', false);
- Exclude checks
Avoid excessively long variable names like $moduleimport_dir_name. Keep variable name length under 20. Open
$moduleimport_dir_name = "modules/$importModuleName";
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $moduleimport_dir_exists. Keep variable name length under 20. Open
$moduleimport_dir_exists = (is_dir($moduleimport_dir_name) ? 'true' : 'false');
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid excessively long variable names like $importModuleDepVtVersion. Keep variable name length under 20. Open
$importModuleDepVtVersion = $package->getDependentVtigerVersion();
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Settings_ModuleManager_ModuleImport_View extends Settings_Vtiger_Index_View
- Exclude checks
The class Settings_ModuleManager_ModuleImport_View is not named in CamelCase. Open
class Settings_ModuleManager_ModuleImport_View extends Settings_Vtiger_Index_View
{
use \App\Controller\ExposeMethod;
/**
- Read upRead up
- Exclude checks
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
$this->exposeMethod('importUserModuleStep1');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->invokeExposedMethod($mode, $request);
- 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
\vtlib\Deprecated::checkFileAccess($uploadDir);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$error = 'LBL_ERROR_MOVE_UPLOADED_FILE';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$package->isLanguageType() && !$package->isUpdateType() && !$package->isModuleBundle()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_EXISTS', false);
- 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
$qualifiedModuleName = $request->getModule(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('language' === strtolower($importType)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package = new vtlib\Layout();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('' != $package->_errorText) {
- 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
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unlink($uploadFileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_EXISTS', $moduleimport_exists);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$qualifiedModuleName = $request->getModule(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$qualifiedModuleName = $request->getModule(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function importUserModuleStep2(App\Request $request)
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
if (!$request->has('upgradePackage') && !move_uploaded_file($_FILES['moduleZip']['tmp_name'], $uploadFileName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleLicence = App\Purifier::purify($package->getLicense());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_DEP_VTVERSION', $importModuleDepVtVersion);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importType = $request->getByType('module_import_type');
- 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
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importType = $request->get('module_import_type');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package->update(vtlib\Module::getInstance($importModuleName), $uploadFileName);
- 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
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$error = $package->_errorText;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_TYPE', $package->type());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_PARAMETERS', $package->getParameters());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uploadFileName = "$uploadDir/$uploadFile";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package->import($uploadFileName);
- 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
unlink($uploadFileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mode = $request->getMode();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('ImportUserModuleStep1.tpl', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$qualifiedModuleName = $request->getModule(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// We need these information to push for Update if module is detected to be present.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_LICENSE', $moduleLicence);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importModuleType = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif ('layout' === strtolower($importType)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package = new vtlib\Package();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\vtlib\Deprecated::checkFileAccess($uploadFileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package->initParameters($request);
- 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
public function getFooterScripts(App\Request $request)
- 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 ($request->has('upgradePackage')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package = new vtlib\Package();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_LABEL', (string) ($package->_modulexml->label ?? $package->_modulexml->name));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::__construct();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getViewer(App\Request $request)
- 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
public function importUserModuleStep1(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$request->has('upgradePackage') && !move_uploaded_file($_FILES['moduleZip']['tmp_name'], $uploadFileName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_DIR', $moduleimport_dir_name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('ImportUserModuleStep2.tpl', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function importUserModuleStep3(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($package->packageType) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uploadFile = $request->get('module_import_file');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package->import($uploadFileName);
- 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
* @return <Array> - List of Vtiger_JsScript_Model instances
- 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
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_DIR_EXISTS', $moduleimport_dir_exists);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_ERROR', $error);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importModuleName = $request->get('module_import_name');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\vtlib\Deprecated::checkFileAccess($uploadFileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unlink($uploadFileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exposeMethod('importUserModuleStep3');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $viewer;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\AppException(\App\Language::translate('LBL_ERROR_IMPORT_IN_DEMO'));
- 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
\vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_PACKAGE', $package);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_DIR_EXISTS', false);
- 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
$importModuleType = 'Layout';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package->initParameters($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('IMPORT_MODULE_TYPE', $importModuleType);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('UPDATE_MODULE_NAME', $importModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('UpdateUserModuleStep3.tpl', $qualifiedModuleName);
- 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
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importModuleDepVtVersion = $package->getDependentVtigerVersion();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleInstance = vtlib\Module::getInstance($importModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uploadFileName = "$uploadDir/$uploadFile";
- 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
\vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uploadFile = $request->getByType('upgradePackage', 'Alnum') . '.zip';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uploadFile = 'usermodule_' . time() . '.zip';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uploadFileName = "$uploadDir/$uploadFile";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_FILE', $uploadFile);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importModuleType = 'Language';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Settings_ModuleManager_ModuleImport_View constructor.
- 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
$viewer->assign('MODULE_NAME', $request->getModule(false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function process(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('importUserModuleStep1.tpl', $qualifiedModuleName);
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleimport_exists = ($moduleInstance) ? 'true' : 'false';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleimport_dir_exists = (is_dir($moduleimport_dir_name) ? 'true' : 'false');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uploadFile = $request->get('module_import_file');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package = new vtlib\Language();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importModuleType = $package->packageType;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function updateUserModuleStep3(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$qualifiedModuleName = $request->getModule(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importModuleName = $request->get('module_import_name');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package = new vtlib\Package();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('language' == strtolower($importType)) {
- 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
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to get the list of Script models to be included.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\Request $request
- 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
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$importModuleName = $package->getModuleNameFromZip($uploadFileName);
- 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
$viewer->assign('ICONS', \App\YetiForce\Shop::PREMIUM_ICONS);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('IMPORT_MODULE_NAME', $importModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('language' == strtolower($importType)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('demo' == $systemMode) {
- 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
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
use \App\Controller\ExposeMethod;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->exposeMethod('importUserModuleStep2');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = parent::getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$systemMode = \App\Config::main('systemMode');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($mode)) {
- 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
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$error = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_NAME', $importModuleName);
- 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
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULEIMPORT_ERROR', $package->_errorText);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- 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
} else {
- 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
$this->exposeMethod('updateUserModuleStep3');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array_merge(parent::getFooterScripts($request), $this->checkAndConvertJsScripts([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
"modules.Settings.{$request->getModule()}.resources.ModuleImport",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (null === $importModuleName || $package->_errorText) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleimport_dir_name = "modules/$importModuleName";
- 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
$viewer->view('ImportUserModuleStep3.tpl', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$package = new vtlib\Language();
- Exclude checks
Class name "Settings_ModuleManager_ModuleImport_View" is not in camel caps format Open
class Settings_ModuleManager_ModuleImport_View extends Settings_Vtiger_Index_View
- Exclude checks
The variable $moduleimport_dir_exists is not named in camelCase. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- 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 $moduleimport_exists is not named in camelCase. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- 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 $moduleimport_dir_name is not named in camelCase. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- 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 $moduleimport_dir_exists is not named in camelCase. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- 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 $moduleimport_dir_name is not named in camelCase. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- 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 $moduleimport_exists is not named in camelCase. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- 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 $moduleimport_dir_name is not named in camelCase. Open
public function importUserModuleStep2(App\Request $request)
{
$viewer = $this->getViewer($request);
$uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();
$qualifiedModuleName = $request->getModule(false);
- 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();
}
}