railpage/railpagecore

View on GitHub
lib/RSS/Consume.php

Summary

Maintainability
F
4 days
Test Coverage

Function parse has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
Open

        public function parse() {
            if (empty($this->feeds)) {
                throw new Exception("No scraped RSS data was found (hint: Consume::scrape())");
            }
            
Severity: Minor
Found in lib/RSS/Consume.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

Function process has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
Open

        private function process(array $item) {
            
            /**
             * Process the description field
             */
Severity: Minor
Found in lib/RSS/Consume.php - About 4 hrs 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

The class Consume has an overall complexity of 61 which is very high. The configured complexity threshold is 50.
Open

    class Consume extends AppCore {
        
        /**
         * RSS scraper user agent
         * @since Version 3.9.1
Severity: Minor
Found in lib/RSS/Consume.php by phpmd

Method parse has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function parse() {
            if (empty($this->feeds)) {
                throw new Exception("No scraped RSS data was found (hint: Consume::scrape())");
            }
            
Severity: Major
Found in lib/RSS/Consume.php - About 2 hrs to fix

    Method process has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private function process(array $item) {
                
                /**
                 * Process the description field
                 */
    Severity: Major
    Found in lib/RSS/Consume.php - About 2 hrs to fix

      Function createSummary has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

              private function createSummary($str, $n = 1024, $end_char = '…') {
                  
                  $str = strip_tags($str, "<ul><li><ol>");
                  
                  $str = explode("\n", $str); 
      Severity: Minor
      Found in lib/RSS/Consume.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

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

              private function stripSummaryFromBody($summary, $body) {
                  
                  $body = explode("\n", $body); 
                  
                  if (count($body) <= 3) {
      Severity: Minor
      Found in lib/RSS/Consume.php - About 35 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

      The method process() has 113 lines of code. Current threshold is set to 100. Avoid really long methods.
      Open

              private function process(array $item) {
                  
                  /**
                   * Process the description field
                   */
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      The method parse() has an NPath complexity of 57606. The configured NPath complexity threshold is 200.
      Open

              public function parse() {
                  if (empty($this->feeds)) {
                      throw new Exception("No scraped RSS data was found (hint: Consume::scrape())");
                  }
                  
      Severity: Minor
      Found in lib/RSS/Consume.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 process() has an NPath complexity of 2304. The configured NPath complexity threshold is 200.
      Open

              private function process(array $item) {
                  
                  /**
                   * Process the description field
                   */
      Severity: Minor
      Found in lib/RSS/Consume.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 parse() has 126 lines of code. Current threshold is set to 100. Avoid really long methods.
      Open

              public function parse() {
                  if (empty($this->feeds)) {
                      throw new Exception("No scraped RSS data was found (hint: Consume::scrape())");
                  }
                  
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

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

              public function parse() {
                  if (empty($this->feeds)) {
                      throw new Exception("No scraped RSS data was found (hint: Consume::scrape())");
                  }
                  
      Severity: Minor
      Found in lib/RSS/Consume.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 process() has a Cyclomatic Complexity of 17. The configured cyclomatic complexity threshold is 10.
      Open

              private function process(array $item) {
                  
                  /**
                   * Process the description field
                   */
      Severity: Minor
      Found in lib/RSS/Consume.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

      Remove error control operator '@' on line 283.
      Open

              private function process(array $item) {
                  
                  /**
                   * Process the description field
                   */
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      ErrorControlOperator

      Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

      Example

      function foo($filePath) {
          $file = @fopen($filPath); // hides exceptions
          $key = @$array[$notExistingKey]; // assigns null to $key
      }

      Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

      The method addFeed has a boolean flag argument $url, which is a certain sign of a Single Responsibility Principle violation.
      Open

              public function addFeed($url = false) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      The method __construct has a boolean flag argument $url, which is a certain sign of a Single Responsibility Principle violation.
      Open

              public function __construct($url = false) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      BooleanArgumentFlag

      Since: 1.4.0

      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

      Example

      class Foo {
          public function bar($flag = true) {
          }
      }

      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

      The method createSummary uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                      } else {
                          break;
                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      ElseExpression

      Since: 1.4.0

      An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

      Source https://phpmd.org/rules/cleancode.html#elseexpression

      The method parse uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                      } else {
                          $type = "atom";
                          $loop = $xml->entry;
                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      ElseExpression

      Since: 1.4.0

      An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

      Source https://phpmd.org/rules/cleancode.html#elseexpression

      The method parse uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

                                  } else {
                                      $item['extra'][$key] = $data->__toString();
                                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      ElseExpression

      Since: 1.4.0

      An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

      Source https://phpmd.org/rules/cleancode.html#elseexpression

      Avoid unused local variables such as '$items'.
      Open

                  $items = array(); 
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      UnusedLocalVariable

      Since: 0.2

      Detects when a local variable is declared and/or assigned, but not used.

      Example

      class Foo {
          public function doSomething()
          {
              $i = 5; // Unused
          }
      }

      Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

      Avoid unused local variables such as '$type'.
      Open

                      $type = "rss";
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      UnusedLocalVariable

      Since: 0.2

      Detects when a local variable is declared and/or assigned, but not used.

      Example

      class Foo {
          public function doSomething()
          {
              $i = 5; // Unused
          }
      }

      Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

      Avoid unused parameters such as '$end_char'.
      Open

              private function createSummary($str, $n = 1024, $end_char = '&#8230;') {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      UnusedFormalParameter

      Since: 0.2

      Avoid passing parameters to methods or constructors and then not using those parameters.

      Example

      class Foo
      {
          private function bar($howdy)
          {
              // $howdy is not used
          }
      }

      Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

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

                          if (count($node->category) > 0) {
                              $tags = array(); 
                              
                              foreach ($node->category as $tag) {
                                  $tags[] = $tag->__toString();
      Severity: Major
      Found in lib/RSS/Consume.php and 1 other location - About 3 hrs to fix
      lib/RSS/Consume.php on lines 218..228

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 86.

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

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

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

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

      Refactorings

      Further Reading

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

                          if (count($node->tag) > 0) {
                              $tags = array(); 
                              
                              foreach ($node->tag as $tag) {
                                  $tags[] = $tag->__toString();
      Severity: Major
      Found in lib/RSS/Consume.php and 1 other location - About 3 hrs to fix
      lib/RSS/Consume.php on lines 230..240

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 86.

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

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

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

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

      Refactorings

      Further Reading

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

                          $node->nodeValue = htmlentities(str_replace("\n", " ", str_replace("\r\n", " ", $node->nodeValue))); # Without htmlentities() DOMDocument whinges and bitches something unforgivable
      Severity: Major
      Found in lib/RSS/Consume.php and 1 other location - About 1 hr to fix
      lib/RSS/Consume.php on lines 307..307

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 44.

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

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

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

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

      Refactorings

      Further Reading

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

                              $node->nodeValue = htmlentities(str_replace("\n", " ", str_replace("\r\n", " ", $node->nodeValue))); # Without htmlentities() DOMDocument whinges and bitches something unforgivable
      Severity: Major
      Found in lib/RSS/Consume.php and 1 other location - About 1 hr to fix
      lib/RSS/Consume.php on lines 322..322

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 44.

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

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

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

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

      Refactorings

      Further Reading

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

                  if (is_object($item['tags'])) {
                      $item['tags'] = $item['tags']->__toString(); 
                  }
      Severity: Major
      Found in lib/RSS/Consume.php and 1 other location - About 1 hr to fix
      lib/RSS/Consume.php on lines 380..382

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 34.

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

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

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

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

      Refactorings

      Further Reading

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

                  if (is_object($item['link'])) {
                      $item['link'] = $item['link']->__toString(); 
                  }
      Severity: Major
      Found in lib/RSS/Consume.php and 1 other location - About 1 hr to fix
      lib/RSS/Consume.php on lines 376..378

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 34.

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

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

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

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

      Refactorings

      Further Reading

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

                  $item['description'] = str_replace('<meta http-equiv="content-type" content="text/html; charset=utf-8">', "", $item['description']);
      Severity: Major
      Found in lib/RSS/Consume.php and 6 other locations - About 55 mins to fix
      lib/Newsletters/Weekly.php on lines 408..408
      lib/Prerender/Home.php on lines 153..153
      lib/PrivateMessages/Folder.php on lines 126..126
      lib/RSS/Consume.php on lines 279..279
      lib/RSS/Consume.php on lines 280..280
      lib/Template.php on lines 292..292

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 28.

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

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

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

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

      Refactorings

      Further Reading

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

                  $item['description'] = preg_replace('#<br\s*/?>#i', "\n", $item['description']);
      Severity: Major
      Found in lib/RSS/Consume.php and 6 other locations - About 55 mins to fix
      lib/Newsletters/Weekly.php on lines 408..408
      lib/Prerender/Home.php on lines 153..153
      lib/PrivateMessages/Folder.php on lines 126..126
      lib/RSS/Consume.php on lines 280..280
      lib/RSS/Consume.php on lines 364..364
      lib/Template.php on lines 292..292

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 28.

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

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

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

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

      Refactorings

      Further Reading

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

                  $item['description'] = str_replace("&nbsp;", " ", $item['description']);
      Severity: Major
      Found in lib/RSS/Consume.php and 6 other locations - About 55 mins to fix
      lib/Newsletters/Weekly.php on lines 408..408
      lib/Prerender/Home.php on lines 153..153
      lib/PrivateMessages/Folder.php on lines 126..126
      lib/RSS/Consume.php on lines 279..279
      lib/RSS/Consume.php on lines 364..364
      lib/Template.php on lines 292..292

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 28.

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

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

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

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

      Refactorings

      Further Reading

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

                              "description" => !empty($node->content->__toString()) ? $node->content->__toString() : $node->description->__toString(),
      Severity: Minor
      Found in lib/RSS/Consume.php and 1 other location - About 45 mins to fix
      lib/RSS/Consume.php on lines 173..173

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 26.

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

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

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

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

      Refactorings

      Further Reading

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

                          $date = !empty($node->date->__toString()) ? $node->date->__toString() : $node->pubDate->__toString();
      Severity: Minor
      Found in lib/RSS/Consume.php and 1 other location - About 45 mins to fix
      lib/RSS/Consume.php on lines 190..190

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 26.

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

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

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

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

      Refactorings

      Further Reading

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

                              if ($link['type'] == "text/html" || $link['rel'] == "alternate") {
      Severity: Minor
      Found in lib/RSS/Consume.php and 1 other location - About 30 mins to fix
      lib/Images/Exif.php on lines 400..400

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 21.

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

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

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

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

      Refactorings

      Further Reading

      The parameter $end_char is not named in camelCase.
      Open

              private function createSummary($str, $n = 1024, $end_char = '&#8230;') {
                  
                  $str = strip_tags($str, "<ul><li><ol>");
                  
                  $str = explode("\n", $str); 
      Severity: Minor
      Found in lib/RSS/Consume.php by phpmd

      CamelCaseParameterName

      Since: 0.2

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

      Example

      class ClassName {
          public function doSomething($user_name) {
          }
      }

      Source

      Blank line found at start of control structure
      Open

                              foreach ($node->children($namespace) as $key => $data) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Blank line found at start of control structure
      Open

                      foreach ($Doc->getElementsByTagName("p") as $node) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Blank line found at start of control structure
      Open

                  foreach ($str as $v) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Function closing brace must go on the next line following the body; found 1 blank lines before brace
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              public function addFeed($url = false) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      } else {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 24
      Open

                              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  foreach ($str as $k => $v) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      if ($xml->channel->item != NULL) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          if (empty($date) && !empty($node->updated->__toString())) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          if (empty(trim($node->nodeValue))) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              private function stripSummaryFromBody($summary, $body) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 0 spaces, found 4
      Open

          class Consume extends AppCore {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              public function __construct($url = false) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 24
      Open

                              if (empty(trim($node->nodeValue))) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  foreach ($this->feeds as $feedsrc => $feed) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              if (!empty(implode(",", $tags))) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          if (is_object($el) && $el->nodeName == "#text") {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if ($url) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if ($Doc->getElementsByTagName("p")->length == 1) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if ($Doc->getElementsByTagName("img")->length > 0) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      foreach ($Doc->getElementsByTagName("img") as $node) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if (count($str) < 3) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          if (strip_tags(trim($bline)) == trim($sline)) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              private $feeds = array();
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      if (trim($v) == "") {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      foreach ($loop as $node) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              private $GuzzleClient;
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if (is_object($item['tags'])) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 16
      Open

                      if ($response->getStatusCode() != 200) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          foreach ($node->link as $link) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 24
      Open

                              if ($link['type'] == "text/html" || $link['rel'] == "alternate") {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 28
      Open

                                  } elseif ($key == "encoded") {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      if (trim($v) != "") {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if (is_object($item['link'])) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      } else {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if (count($body) <= 3) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      foreach ($body as $k => $bline) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              public $name;
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              foreach ($node->category as $tag) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      foreach ($Doc->getElementsByTagName("p") as $node) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      foreach ($Doc->getElementsByTagName("script") as $node) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              private function createSummary($str, $n = 1024, $end_char = '&#8230;') {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      if ($n == 2) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if (empty($this->feeds)) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              foreach ($node->tag as $tag) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if ($Doc->getElementsByTagName("li")->length > 0) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      foreach ($Doc->getElementsByTagName("li") as $node) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          if (substr($src, 0, 1) == "/") {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              public function scrape() {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              public function parse() {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              foreach ($node->children($namespace) as $key => $data) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              private function process(array $item) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if ($Doc->getElementsByTagName("script")->length > 0) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              public function getFeeds() {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 28
      Open

                                  } else {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  foreach (explode("\n\n", $summary) as $sline) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 0 spaces, found 4
      Open

          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  foreach ($this->feeds as $key => $feed) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if (!in_array($url, array_keys($this->feeds))) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 28
      Open

                                  if (isset($item[$key]) && !empty(trim($data->__toString()))) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 8
      Open

              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 20
      Open

                          foreach ($ns as $namespace) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 28
      Open

                                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 20
      Open

                          if (count($node->tag) > 0) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              if (!empty(implode(",", $tags))) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 24
      Open

                              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 20
      Open

                          if (count($node->category) > 0) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  if ($Doc->getElementsByTagName("p")->length > 1) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 20 spaces, found 24
      Open

                              }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 16 spaces, found 20
      Open

                          }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 12
      Open

                  foreach ($str as $v) {
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 16
      Open

                      }
      Severity: Minor
      Found in lib/RSS/Consume.php by phpcodesniffer

      There are no issues that match your filters.

      Category
      Status