qcubed/framework

View on GitHub
includes/framework/QRssFeed.class.php

Summary

Maintainability
D
2 days
Test Coverage

Function GetXml has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

        public function GetXml() {
            $strToReturn = "<rss version=\"2.0\">\r\n<channel>\r\n";
            $strToReturn .= sprintf("    <title>%s</title>\r\n", $this->strTitle);
            $strToReturn .= sprintf("    <link>%s</link>\r\n", $this->strLink);
            $strToReturn .= sprintf("    <description>%s</description>\r\n", $this->strDescription);
Severity: Minor
Found in includes/framework/QRssFeed.class.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 GetXml has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function GetXml() {
            $strToReturn = "<rss version=\"2.0\">\r\n<channel>\r\n";
            $strToReturn .= sprintf("    <title>%s</title>\r\n", $this->strTitle);
            $strToReturn .= sprintf("    <link>%s</link>\r\n", $this->strLink);
            $strToReturn .= sprintf("    <description>%s</description>\r\n", $this->strDescription);
Severity: Minor
Found in includes/framework/QRssFeed.class.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

                        case 'PubDate': return ($this->dttPubDate = QType::Cast($mixValue, QType::DateTime));
    Severity: Major
    Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                          case 'Image': return ($this->objImage = QType::Cast($mixValue, 'QRssImage'));
      Severity: Major
      Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            case 'WebMaster': return $this->strWebMaster;
        Severity: Major
        Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              case 'LastBuildDate': return $this->dttLastBuildDate;
          Severity: Major
          Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                case 'Generator': return $this->strGenerator;
            Severity: Major
            Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  case 'Comments': return $this->strComments;
              Severity: Major
              Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                    case 'Copyright': return ($this->strCopyright = QType::Cast($mixValue, QType::String));
                Severity: Major
                Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      case 'PubDate': return ($this->dttPubDate = QType::Cast($mixValue, QType::DateTime));
                  Severity: Major
                  Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                        default: return parent::__set($strName, $mixValue);
                    Severity: Major
                    Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          default: return parent::__get($strName);
                      Severity: Major
                      Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                            case 'ManagingEditor': return ($this->strManagingEditor = QType::Cast($mixValue, QType::String));
                        Severity: Major
                        Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                              default: return parent::__set($strName, $mixValue);
                          Severity: Major
                          Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                case 'ManagingEditor': return $this->strManagingEditor;
                            Severity: Major
                            Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                  case 'Comments': return ($this->strComments = QType::Cast($mixValue, QType::String));
                              Severity: Major
                              Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                    case 'GuidPermaLink': return $this->blnGuidPermaLink;
                                Severity: Major
                                Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                      case 'Guid': return ($this->strGuid = QType::Cast($mixValue, QType::String));
                                  Severity: Major
                                  Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                        case 'WebMaster': return ($this->strWebMaster = QType::Cast($mixValue, QType::String));
                                    Severity: Major
                                    Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                          case 'Generator': return ($this->strGenerator = QType::Cast($mixValue, QType::String));
                                      Severity: Major
                                      Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                            case 'Guid': return $this->strGuid;
                                        Severity: Major
                                        Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                              case 'Ttl': return $this->strTtl;
                                          Severity: Major
                                          Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                                case 'LastBuildDate': return ($this->dttLastBuildDate = QType::Cast($mixValue, QType::DateTime));
                                            Severity: Major
                                            Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                                  case 'PubDate': return $this->dttPubDate;
                                              Severity: Major
                                              Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                    case 'Copyright': return $this->strCopyright;
                                                Severity: Major
                                                Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                      case 'Docs': return ($this->strDocs= QType::Cast($mixValue, QType::String));
                                                  Severity: Major
                                                  Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                        case 'PubDate': return $this->dttPubDate;
                                                    Severity: Major
                                                    Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                          case 'Docs': return $this->strDocs;
                                                      Severity: Major
                                                      Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                            default: return parent::__get($strName);
                                                        Severity: Major
                                                        Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                              case 'Ttl': return ($this->strTtl = QType::Cast($mixValue, QType::String));
                                                          Severity: Major
                                                          Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                case 'GuidPermaLink': return ($this->blnGuidPermaLink = QType::Cast($mixValue, QType::Boolean));
                                                            Severity: Major
                                                            Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                  case 'Image': return $this->objImage;
                                                              Severity: Major
                                                              Found in includes/framework/QRssFeed.class.php - About 30 mins to fix

                                                                The method GetXml() has an NPath complexity of 2048. The configured NPath complexity threshold is 200.
                                                                Open

                                                                        public function GetXml() {
                                                                            $strToReturn = "<rss version=\"2.0\">\r\n<channel>\r\n";
                                                                            $strToReturn .= sprintf("    <title>%s</title>\r\n", $this->strTitle);
                                                                            $strToReturn .= sprintf("    <link>%s</link>\r\n", $this->strLink);
                                                                            $strToReturn .= sprintf("    <description>%s</description>\r\n", $this->strDescription);
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                NPathComplexity

                                                                Since: 0.1

                                                                The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                                                Example

                                                                class Foo {
                                                                    function bar() {
                                                                        // lots of complicated code
                                                                    }
                                                                }

                                                                Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                                                The method __set() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
                                                                Open

                                                                        public function __set($strName, $mixValue) {
                                                                            try {
                                                                                switch ($strName) {
                                                                                    case 'Title': return ($this->strTitle = QType::Cast($mixValue, QType::String));
                                                                                    case 'Link': return ($this->strLink = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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

                                                                The method __get() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
                                                                Open

                                                                        public function __get($strName) {
                                                                            try {
                                                                                switch ($strName) {
                                                                                    case 'Title': return $this->strTitle;
                                                                                    case 'Link': return $this->strLink;
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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

                                                                The method GetXml() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
                                                                Open

                                                                        public function GetXml() {
                                                                            $strToReturn = "<rss version=\"2.0\">\r\n<channel>\r\n";
                                                                            $strToReturn .= sprintf("    <title>%s</title>\r\n", $this->strTitle);
                                                                            $strToReturn .= sprintf("    <link>%s</link>\r\n", $this->strLink);
                                                                            $strToReturn .= sprintf("    <description>%s</description>\r\n", $this->strDescription);
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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

                                                                The method __get() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
                                                                Open

                                                                        public function __get($strName) {
                                                                            try {
                                                                                switch ($strName) {
                                                                                    case 'Title': return $this->strTitle;
                                                                                    case 'Link': return $this->strLink;
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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

                                                                The method __set() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
                                                                Open

                                                                        public function __set($strName, $mixValue) {
                                                                            try {
                                                                                switch ($strName) {
                                                                                    case 'Title': return ($this->strTitle = QType::Cast($mixValue, QType::String));
                                                                                    case 'Link': return ($this->strLink = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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

                                                                Avoid using static access to class 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Language': return ($this->strLanguage = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Image': return ($this->objImage = QType::Cast($mixValue, 'QRssImage'));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QString' in method 'GetXml'.
                                                                Open

                                                                            $strToReturn .= sprintf("        <title>%s</title>\r\n", QString::XmlEscape($this->strTitle));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Comments': return ($this->strComments = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Link': return ($this->strLink = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'ManagingEditor': return ($this->strManagingEditor = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Ttl': return ($this->strTtl = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QString' in method 'GetXml'.
                                                                Open

                                                                                $strToReturn .= sprintf("        <author>%s</author>\r\n", QString::XmlEscape($this->strAuthor));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'GuidPermaLink': return ($this->blnGuidPermaLink = QType::Cast($mixValue, QType::Boolean));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'WebMaster': return ($this->strWebMaster = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'PubDate': return ($this->dttPubDate = QType::Cast($mixValue, QType::DateTime));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Generator': return ($this->strGenerator = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Copyright': return ($this->strCopyright = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QString' in method 'GetXml'.
                                                                Open

                                                                            $strToReturn .= sprintf("        <description>%s</description>\r\n", QString::XmlEscape($this->strDescription));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QString' in method 'GetXml'.
                                                                Open

                                                                                $strToReturn .= sprintf("        <comments>%s</comments>\r\n", QString::XmlEscape($this->strComments));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Title': return ($this->strTitle = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Description': return ($this->strDescription = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Description': return ($this->strDescription = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'LastBuildDate': return ($this->dttLastBuildDate = QType::Cast($mixValue, QType::DateTime));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Link': return ($this->strLink = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Author': return ($this->strAuthor = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Guid': return ($this->strGuid = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'PubDate': return ($this->dttPubDate = QType::Cast($mixValue, QType::DateTime));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Title': return ($this->strTitle = QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QString' in method 'GetXml'.
                                                                Open

                                                                            $strToReturn .= sprintf("        <link>%s</link>\r\n", QString::XmlEscape($this->strLink));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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 'QType' in method '__set'.
                                                                Open

                                                                                    case 'Docs': return ($this->strDocs= QType::Cast($mixValue, QType::String));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                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

                                                                TODO found
                                                                Open

                                                                        // TODO: Fields that are commented out are currently not supported because they are either
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by fixme

                                                                TODO found
                                                                Open

                                                                        // TODO: Fields that are commented out are currently not supported because they are either
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by fixme

                                                                The method AddItem is not named in camelCase.
                                                                Open

                                                                        public function AddItem(QRssItem $objItem) {
                                                                            array_push($this->objItemArray, $objItem);
                                                                        }
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                CamelCaseMethodName

                                                                Since: 0.2

                                                                It is considered best practice to use the camelCase notation to name methods.

                                                                Example

                                                                class ClassName {
                                                                    public function get_name() {
                                                                    }
                                                                }

                                                                Source

                                                                The method AddCategory is not named in camelCase.
                                                                Open

                                                                        public function AddCategory(QRssCategory $objCategory) {
                                                                            array_push($this->objCategoryArray, $objCategory);
                                                                        }
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                CamelCaseMethodName

                                                                Since: 0.2

                                                                It is considered best practice to use the camelCase notation to name methods.

                                                                Example

                                                                class ClassName {
                                                                    public function get_name() {
                                                                    }
                                                                }

                                                                Source

                                                                The method GetXml is not named in camelCase.
                                                                Open

                                                                        public function GetXml($strTitle, $strLink) {
                                                                            $strToReturn = "    <image>\r\n";
                                                                            $strToReturn .= sprintf("        <url>%s</url>\r\n", $this->strUrl);
                                                                            $strToReturn .= sprintf("        <title>%s</title>\r\n", ($this->strTitle) ? $this->strTitle : $strTitle);
                                                                            $strToReturn .= sprintf("        <link>%s</link>\r\n", ($this->strLink) ? $this->strLink : $strLink);
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                CamelCaseMethodName

                                                                Since: 0.2

                                                                It is considered best practice to use the camelCase notation to name methods.

                                                                Example

                                                                class ClassName {
                                                                    public function get_name() {
                                                                    }
                                                                }

                                                                Source

                                                                The method GetXml is not named in camelCase.
                                                                Open

                                                                        public function GetXml() {
                                                                            if ($this->strDomain)
                                                                                return sprintf("        <category domain=\"%s\">%s</category>\r\n", $this->strDomain, $this->strCategory);
                                                                            else
                                                                                return sprintf("        <category>%s</category>\r\n", $this->strCategory);
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                CamelCaseMethodName

                                                                Since: 0.2

                                                                It is considered best practice to use the camelCase notation to name methods.

                                                                Example

                                                                class ClassName {
                                                                    public function get_name() {
                                                                    }
                                                                }

                                                                Source

                                                                The method GetXml is not named in camelCase.
                                                                Open

                                                                        public function GetXml() {
                                                                            $strToReturn = "    <item>\r\n";
                                                                            $strToReturn .= sprintf("        <title>%s</title>\r\n", QString::XmlEscape($this->strTitle));
                                                                            $strToReturn .= sprintf("        <link>%s</link>\r\n", QString::XmlEscape($this->strLink));
                                                                            $strToReturn .= sprintf("        <description>%s</description>\r\n", QString::XmlEscape($this->strDescription));
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                CamelCaseMethodName

                                                                Since: 0.2

                                                                It is considered best practice to use the camelCase notation to name methods.

                                                                Example

                                                                class ClassName {
                                                                    public function get_name() {
                                                                    }
                                                                }

                                                                Source

                                                                The method GetXml is not named in camelCase.
                                                                Open

                                                                        public function GetXml() {
                                                                            $strToReturn = "<rss version=\"2.0\">\r\n<channel>\r\n";
                                                                            $strToReturn .= sprintf("    <title>%s</title>\r\n", $this->strTitle);
                                                                            $strToReturn .= sprintf("    <link>%s</link>\r\n", $this->strLink);
                                                                            $strToReturn .= sprintf("    <description>%s</description>\r\n", $this->strDescription);
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                CamelCaseMethodName

                                                                Since: 0.2

                                                                It is considered best practice to use the camelCase notation to name methods.

                                                                Example

                                                                class ClassName {
                                                                    public function get_name() {
                                                                    }
                                                                }

                                                                Source

                                                                The method Run is not named in camelCase.
                                                                Open

                                                                        public function Run() {
                                                                            ob_clean();
                                                                            QApplication::$ContentType = 'text/xml';
                                                                
                                                                            if (QApplication::$EncodingType)
                                                                Severity: Minor
                                                                Found in includes/framework/QRssFeed.class.php by phpmd

                                                                CamelCaseMethodName

                                                                Since: 0.2

                                                                It is considered best practice to use the camelCase notation to name methods.

                                                                Example

                                                                class ClassName {
                                                                    public function get_name() {
                                                                    }
                                                                }

                                                                Source

                                                                There are no issues that match your filters.

                                                                Category
                                                                Status