spotweb/spotweb

View on GitHub

Showing 668 of 850 total issues

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

    public function sendMessage($type, $title, $body, $sourceUrl, $smtp)
Severity: Minor
Found in lib/notifications/Notifications_Twitter.php - About 35 mins to fix

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

        public function sendMessage($type, $title, $body, $sourceUrl, $smtp)
    Severity: Minor
    Found in lib/notifications/Notifications_Email.php - About 35 mins to fix

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

          public function sendMessage($type, $title, $body, $sourceUrl, $smtp)
      Severity: Minor
      Found in lib/notifications/Notifications_Growl.php - About 35 mins to fix

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

            abstract public function sendMessage($type, $title, $body, $sourceUrl, $smtp);
        Severity: Minor
        Found in lib/notifications/Notifications_abs.php - About 35 mins to fix

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

              public function addNewNotification($userId, $objectId, $type, $title, $body);
          Severity: Minor
          Found in lib/dao/Dao_Notification.php - About 35 mins to fix

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

                public function addAuditEntry($userid, $perm, $objectid, $allowed, $ipaddr)
            Severity: Minor
            Found in lib/dao/Base/Dao_Base_Audit.php - About 35 mins to fix

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

                  public function addAuditEntry($userid, $perm, $objectid, $allowed, $ipaddr);
              Severity: Minor
              Found in lib/dao/Dao_Audit.php - About 35 mins to fix

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

                    public function addNewNotification($userId, $objectId, $type, $title, $body)
                Severity: Minor
                Found in lib/dao/Base/Dao_Base_Notification.php - About 35 mins to fix

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

                      public static function ownWarning($number, $message, $file, $line, array $context = [])
                  Severity: Minor
                  Found in lib/SpotInstall.php - About 35 mins to fix

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

                        protected function saveCache($resourceid, $cachetype, $metadata, $ttl, $content)
                    Severity: Minor
                    Found in lib/dao/Base/Dao_Base_Cache.php - About 35 mins to fix

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

                      function toggleSidebarPanel(id) {
                          if($(id).is(":visible")) {
                              $(id).fadeOut();
                          } else {
                              if($(".sidebarPanel").is(":visible")) {
                      Severity: Minor
                      Found in templates/we1rdo/js/scripts.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 initializeCategoryTree has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          function initializeCategoryTree() {
                              // Attach the dynatree widget to an existing <div id="tree"> element
                              // and pass the tree options as an argument to the dynatree() function:
                              $("div#tree").hide();
                              $("div#tree").dynatree({
                      Severity: Minor
                      Found in templates/we1rdo/js/treehelper.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 render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function render()
                          {
                              // Check users' permissions
                              $this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_blacklist_spotter, '');
                      
                      
                      Severity: Minor
                      Found in lib/page/SpotPage_blacklistspotter.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 render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function render()
                          {
                              $result = new Dto_FormResult('notsubmitted');
                      
                              // check the users' permissions
                      Severity: Minor
                      Found in lib/page/SpotPage_editspot.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 parseAndWriteLine has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function parseAndWriteLine($line, $handle, $outputFile)
                      {
                          // if the line starts with (#|"|msgid_plural |msgid )
                          // then we just write the line to the output file verbatim
                          $pattern = '/^(#|"|msgid_plural |msgid )/';
                      Severity: Minor
                      Found in utils/transifex/messagesToPO.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 render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function render()
                          {
                              // Make sure the result is set to 'not comitted' per default
                              $result = new Dto_FormResult('notsubmitted');
                      
                      
                      Severity: Minor
                      Found in lib/page/SpotPage_postcomment.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 escape has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function escape($var, $escapeType)
                          {
                              if (is_array($var)) {
                                  foreach ($var as $key => $value) {
                                      $var[$key] = self::escape($value, $escapeType);
                      Severity: Minor
                      Found in lib/SpotReq.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 caps has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function caps($outputtype)
                          {
                              $doc = new DOMDocument('1.0', 'utf-8');
                              $doc->formatOutput = true;
                      
                      
                      Severity: Minor
                      Found in lib/page/SpotPage_newznabapi.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 factory has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function factory()
                          {
                              /*
                               * Trigger the autoloader to load Crypt_RSA as
                               * we need it for
                      Severity: Minor
                      Found in lib/services/Signing/Services_Signing_Base.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 displayLine has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private static function displayLine($values)
                          {
                              if (isset($values['start'])) {
                                  if (self::$_useHtml) {
                                      try {
                      Severity: Minor
                      Found in lib/SpotTiming.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