YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/ModuleManager/views/ModuleImport.php

Summary

Maintainability
B
4 hrs
Test Coverage
F
0%

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);

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);
Severity: Minor
Found in modules/Settings/ModuleManager/views/ModuleImport.php - About 1 hr to fix

    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);
    Severity: Minor
    Found in modules/Settings/ModuleManager/views/ModuleImport.php - About 1 hr 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

    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');
    Severity: Minor
    Found in modules/Settings/ModuleManager/views/ModuleImport.php - About 1 hr to fix

      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);

      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)

      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();

      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();

      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'));

      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();

      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();

      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();

      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();

      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) {

      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);

      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'));

      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);

      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);

      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);

      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);

      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';
              }

      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();

      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();
              }

      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();

      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);

      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);
                      }

      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());

      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);

      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();
              }

      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);
              }

      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');

      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());

      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);

      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();

      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);

      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)) {

      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')) {

      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);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('IMPORT_MODULE_TYPE', $importModuleType);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('MODULE_NAME', $request->getModule(false));

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                      $viewer->assign('MODULEIMPORT_TYPE', $package->type());

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                          $viewer->assign('MODULEIMPORT_DIR_EXISTS', false);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                          $viewer->assign('MODULEIMPORT_DIR', $moduleimport_dir_name);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                      $viewer->assign('MODULEIMPORT_PACKAGE', $package);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('MODULEIMPORT_ERROR', $package->_errorText);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                      $viewer->assign('MODULEIMPORT_NAME', $importModuleName);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                          $viewer->assign('MODULEIMPORT_EXISTS', $moduleimport_exists);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                      $viewer->assign('MODULEIMPORT_PARAMETERS', $package->getParameters());

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('MODULEIMPORT_LABEL', (string) ($package->_modulexml->label ?? $package->_modulexml->name));

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                      $viewer->assign('MODULEIMPORT_LICENSE', $moduleLicence);

      Saw unextractable annotation for comment '* @return <array> - List of Vtiger_JsScript_Model instances'</array>
      Open

           * @return <Array> - List of Vtiger_JsScript_Model instances

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                      $viewer->assign('MODULEIMPORT_DEP_VTVERSION', $importModuleDepVtVersion);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('IMPORT_MODULE_NAME', $importModuleName);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                      $viewer->assign('MODULEIMPORT_FILE', $uploadFile);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('ICONS', \App\YetiForce\Shop::PREMIUM_ICONS);

      Reference to constant PREMIUM_ICONS from undeclared class \App\YetiForce\Shop
      Open

              $viewer->assign('ICONS', \App\YetiForce\Shop::PREMIUM_ICONS);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('UPDATE_MODULE_NAME', $importModuleName);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                          $viewer->assign('MODULEIMPORT_DIR_EXISTS', $moduleimport_dir_exists);

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                          $viewer->assign('MODULEIMPORT_EXISTS', false);

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

                          $moduleimport_dir_name = "modules/$importModuleName";

      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');

      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();

      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

      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;
      
          /**

      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');

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

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

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

           *

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

              \vtlib\Deprecated::checkFileAccess($uploadDir);

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

                  $error = 'LBL_ERROR_MOVE_UPLOADED_FILE';

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

                      if (!$package->isLanguageType() && !$package->isUpdateType() && !$package->isModuleBundle()) {

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

                          $viewer->assign('MODULEIMPORT_EXISTS', false);

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

              }

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

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

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

              if ('language' === strtolower($importType)) {

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

                  $package = new vtlib\Layout();

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

              if ('' != $package->_errorText) {

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

          {

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

                  return;

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

                      unlink($uploadFileName);

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

                          $viewer->assign('MODULEIMPORT_EXISTS', $moduleimport_exists);

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

          public function __construct()

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

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

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

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

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

          public function importUserModuleStep2(App\Request $request)

      Line exceeds 120 characters; contains 121 characters
      Open

              if (!$request->has('upgradePackage') && !move_uploaded_file($_FILES['moduleZip']['tmp_name'], $uploadFileName)) {

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

              } else {

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

                      $moduleLicence = App\Purifier::purify($package->getLicense());

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

                      $viewer->assign('MODULEIMPORT_DEP_VTVERSION', $importModuleDepVtVersion);

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

              $importType = $request->getByType('module_import_type');

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

              }

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

          }

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

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

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

              $importType = $request->get('module_import_type');

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

                  $package->update(vtlib\Module::getInstance($importModuleName), $uploadFileName);

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

          {

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

           *

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

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

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

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

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

                      $error = $package->_errorText;

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

                      $viewer->assign('MODULEIMPORT_TYPE', $package->type());

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

                      $viewer->assign('MODULEIMPORT_PARAMETERS', $package->getParameters());

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

              $uploadFileName = "$uploadDir/$uploadFile";

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

              $package->import($uploadFileName);

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

              }

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

              unlink($uploadFileName);

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

              $mode = $request->getMode();

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

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

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

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

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

                      // We need these information to push for Update if module is detected to be present.

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

                      $viewer->assign('MODULEIMPORT_LICENSE', $moduleLicence);

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

              $importModuleType = false;

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

              } elseif ('layout' === strtolower($importType)) {

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

                  $package = new vtlib\Package();

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

              \vtlib\Deprecated::checkFileAccess($uploadFileName);

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

              $package->initParameters($request);

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

              }

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

          public function getFooterScripts(App\Request $request)

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

          }

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

              if ($request->has('upgradePackage')) {

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

                  $package = new vtlib\Package();

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

              $viewer->assign('MODULEIMPORT_LABEL', (string) ($package->_modulexml->label ?? $package->_modulexml->name));

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

              parent::__construct();

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

          public function getViewer(App\Request $request)

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

              }

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

          public function importUserModuleStep1(App\Request $request)

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

              if (!$request->has('upgradePackage') && !move_uploaded_file($_FILES['moduleZip']['tmp_name'], $uploadFileName)) {

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

                  } else {

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

                          $viewer->assign('MODULEIMPORT_DIR', $moduleimport_dir_name);

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

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

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

          public function importUserModuleStep3(App\Request $request)

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

              if ($package->packageType) {

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

              $uploadFile = $request->get('module_import_file');

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

                  $package->import($uploadFileName);

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

          }

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

          {

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

           * @return <Array> - List of Vtiger_JsScript_Model instances

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

          {

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

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

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

                          $viewer->assign('MODULEIMPORT_DIR_EXISTS', $moduleimport_dir_exists);

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

              $viewer->assign('MODULEIMPORT_ERROR', $error);

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

              $importModuleName = $request->get('module_import_name');

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

              \vtlib\Deprecated::checkFileAccess($uploadFileName);

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

              \vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);

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

              unlink($uploadFileName);

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

              $this->exposeMethod('importUserModuleStep3');

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

              return $viewer;

      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'));

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

          /**

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

                      \vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);

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

                      $viewer->assign('MODULEIMPORT_PACKAGE', $package);

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

                      } else {

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

                          $viewer->assign('MODULEIMPORT_DIR_EXISTS', false);

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

                  }

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

                  $importModuleType = 'Layout';

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

              $package->initParameters($request);

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

              $viewer->assign('IMPORT_MODULE_TYPE', $importModuleType);

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

              $viewer->assign('UPDATE_MODULE_NAME', $importModuleName);

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

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

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

          }

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

          /** {@inheritdoc} */

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

                  $importModuleDepVtVersion = $package->getDependentVtigerVersion();

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

                          $moduleInstance = vtlib\Module::getInstance($importModuleName);

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

              $uploadFileName = "$uploadDir/$uploadFile";

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

              }

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

              \vtlib\Deprecated::checkFileAccessForDeletion($uploadFileName);

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

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

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

                  $uploadFile = $request->getByType('upgradePackage', 'Alnum') . '.zip';

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

              } else {

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

                  $uploadFile = 'usermodule_' . time() . '.zip';

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

              $uploadFileName = "$uploadDir/$uploadFile";

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

                      $viewer->assign('MODULEIMPORT_FILE', $uploadFile);

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

                  $importModuleType = 'Language';

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

           * Settings_ModuleManager_ModuleImport_View constructor.

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

          }

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

              $viewer->assign('MODULE_NAME', $request->getModule(false));

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

          public function process(App\Request $request)

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

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

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

          }

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

          {

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

              }

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

                          $moduleimport_exists = ($moduleInstance) ? 'true' : 'false';

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

                          $moduleimport_dir_exists = (is_dir($moduleimport_dir_name) ? 'true' : 'false');

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

              $uploadFile = $request->get('module_import_file');

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

                  $package = new vtlib\Language();

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

                  $importModuleType = $package->packageType;

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

          public function updateUserModuleStep3(App\Request $request)

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

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

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

              $importModuleName = $request->get('module_import_name');

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

                  $package = new vtlib\Package();

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

              if ('language' == strtolower($importType)) {

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

          /**

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

          /** {@inheritdoc} */

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

           * Function to get the list of Script models to be included.

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

           * @param \App\Request $request

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

              ]));

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

          }

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

          {

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

                  $importModuleName = $package->getModuleNameFromZip($uploadFileName);

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

                      }

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

              $viewer->assign('ICONS', \App\YetiForce\Shop::PREMIUM_ICONS);

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

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

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

              $viewer->assign('IMPORT_MODULE_NAME', $importModuleName);

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

              if ('language' == strtolower($importType)) {

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

              } else {

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

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

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

              if ('demo' == $systemMode) {

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

              }

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

              $uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();

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

              $uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();

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

          use \App\Controller\ExposeMethod;

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

              $this->exposeMethod('importUserModuleStep2');

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

              $viewer = parent::getViewer($request);

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

              $systemMode = \App\Config::main('systemMode');

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

              if (!empty($mode)) {

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

           */

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

              $uploadDir = Settings_ModuleManager_Module_Model::getUploadDirectory();

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

              $error = '';

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

                      $viewer->assign('MODULEIMPORT_NAME', $importModuleName);

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

          }

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

          {

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

              } else {

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

                  $viewer->assign('MODULEIMPORT_ERROR', $package->_errorText);

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

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

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

          {

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

              } else {

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

           */

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

              $this->exposeMethod('updateUserModuleStep3');

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

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

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

              return array_merge(parent::getFooterScripts($request), $this->checkAndConvertJsScripts([

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

                  "modules.Settings.{$request->getModule()}.resources.ModuleImport",

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

                  if (null === $importModuleName || $package->_errorText) {

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

                          $moduleimport_dir_name = "modules/$importModuleName";

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

              }

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

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

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

                  $package = new vtlib\Language();

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

      class Settings_ModuleManager_ModuleImport_View extends Settings_Vtiger_Index_View

      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);

      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);

      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);

      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);

      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);

      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);

      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);

      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