mambax7/publisher

View on GitHub

Showing 3,032 of 3,032 total issues

Function easeOutCubic has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        easeOutCubic: function (x, t, b, c, d) {
Severity: Minor
Found in assets/js/jquery.easing.js - About 35 mins to fix

    Function easeInOutQuart has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            easeInOutQuart: function (x, t, b, c, d) {
    Severity: Minor
    Found in assets/js/jquery.easing.js - About 35 mins to fix

      Function easeInSine has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              easeInSine: function (x, t, b, c, d) {
      Severity: Minor
      Found in assets/js/jquery.easing.js - About 35 mins to fix

        Function easeInOutBounce has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                easeInOutBounce: function (x, t, b, c, d) {
        Severity: Minor
        Found in assets/js/jquery.easing.js - About 35 mins to fix

          Function easeOutQuad has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  easeOutQuad: function (x, t, b, c, d) {
          Severity: Minor
          Found in assets/js/jquery.easing.js - About 35 mins to fix

            Method openCollapsableBar has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public static function openCollapsableBar($tablename = '', $iconname = '', $tabletitle = '', $tabledsc = '', $open = true): void
            Severity: Minor
            Found in class/Utility.php - About 35 mins to fix

              Method createCategorySelect has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public static function createCategorySelect($selectedId = 0, $parentcategory = 0, $allCatOption = true, $selectname = 'options[1]', $multiple = true)
              Severity: Minor
              Found in class/Utility.php - About 35 mins to fix

                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function __construct(array $hiddens, string $action, string $object, string $title = '', string $label = '')
                Severity: Minor
                Found in class/Common/Confirm.php - About 35 mins to fix

                  Method truncateHtml has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          string $text,
                          ?int $length = 100,
                          string $ending = '...',
                          bool $exact = false,
                          bool $considerHtml = true
                  Severity: Minor
                  Found in class/Common/SysUtility.php - About 35 mins to fix

                    Method checkRight has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public function checkRight($gpermName, $gpermItemId, $gpermGroupId, $gpermModId = 1, $trueifadmin = true) //checkRight($gpermName, $gpermItemId, $gpermGroupId, $gpermModId = 1)
                    Severity: Minor
                    Found in class/GroupPermHandler.php - About 35 mins to fix

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

                              try {
                                  if (!\is_dir($folder)) {
                                      if (!\is_dir($folder) && !\mkdir($folder) && !\is_dir($folder)) {
                                          throw new \RuntimeException(\sprintf('Unable to create the %s directory', $folder));
                                      }
                      Severity: Minor
                      Found in class/Utility.php and 1 other location - About 35 mins to fix
                      class/Common/FilesManagement.php on lines 31..41

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 92.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

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

                              $pattern = [
                                  '/%09/', // Tab
                                  '/%20/', // Space
                                  '/%21/', // !
                                  '/%22/', // "
                      Severity: Major
                      Found in class/Metagen.php and 3 other locations - About 35 mins to fix
                      class/Metagen.php on lines 307..307
                      class/Seo.php on lines 52..81
                      class/Seo.php on lines 82..82

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 92.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

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

                              $repPat  = ['-', '-', '-', '-', '-', '-100', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-', '-at-', '-', '-', '-', '-', '-', '-', '-', '-', '-'];
                      Severity: Major
                      Found in class/Metagen.php and 3 other locations - About 35 mins to fix
                      class/Metagen.php on lines 277..306
                      class/Seo.php on lines 52..81
                      class/Seo.php on lines 82..82

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 92.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

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

                              $pattern    = [
                                  '/%09/', // Tab
                                  '/%20/', // Space
                                  '/%21/', // !
                                  '/%22/', // "
                      Severity: Major
                      Found in class/Seo.php and 3 other locations - About 35 mins to fix
                      class/Metagen.php on lines 277..306
                      class/Metagen.php on lines 307..307
                      class/Seo.php on lines 82..82

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 92.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

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

                              $repPattern = ['-', '-', '', '', '', '-100', '', '-', '', '', '', '-', '', '', '', '-', '', '', '-at-', '', '-', '', '-', '', '-', '', '-', ''];
                      Severity: Major
                      Found in class/Seo.php and 3 other locations - About 35 mins to fix
                      class/Metagen.php on lines 277..306
                      class/Metagen.php on lines 307..307
                      class/Seo.php on lines 52..81

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 92.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

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

                              try {
                                  if (!\is_dir($folder)) {
                                      if (!\is_dir($folder) && !\mkdir($folder) && !\is_dir($folder)) {
                                          throw new \RuntimeException(\sprintf('Unable to create the %s directory', $folder));
                                      }
                      Severity: Minor
                      Found in class/Common/FilesManagement.php and 1 other location - About 35 mins to fix
                      class/Utility.php on lines 39..48

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 92.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Function toggle has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function toggle(id) {
                          if (document.getElementById) {
                              obj = document.getElementById(id);
                          }
                          if (document.all) {
                      Severity: Minor
                      Found in assets/js/funcs.js - About 35 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function publisher_pagewrap_upload has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function publisher_pagewrap_upload(&$errors)
                      {
                          //    require_once PUBLISHER_ROOT_PATH . '/class/uploader.php';
                          xoops_load('XoopsMediaUploader');
                      
                      
                      Severity: Minor
                      Found in admin/pw_upload_file.php - About 35 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function myXMLHttpRequest has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function myXMLHttpRequest() {
                          var xmlhttplocal;
                          try {
                              xmlhttplocal = new ActiveXObject("Msxml2.XMLHTTP")
                          } catch (e) {
                      Severity: Minor
                      Found in assets/js/rating.js - About 35 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function loadSampleData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function loadSampleData(): void
                      {
                          global $xoopsConfig;
                          $moduleDirName      = \basename(\dirname(__DIR__));
                          $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
                      Severity: Minor
                      Found in testdata/index.php - About 35 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Severity
                      Category
                      Status
                      Source
                      Language