railpage/railpagecore

View on GitHub
lib/News/Base.php

Summary

Maintainability
F
6 days
Test Coverage

Function latest has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

        public function latest($number = 5, $offset = 0) {
            $return = false;
            $mckey = "railpage:news.latest.count=" . $number .".offset=" . $offset;
            $mcexp = strtotime("+5 minutes"); // Store for five minutes
            
Severity: Minor
Found in lib/News/Base.php - About 3 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

Method latest has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function latest($number = 5, $offset = 0) {
            $return = false;
            $mckey = "railpage:news.latest.count=" . $number .".offset=" . $offset;
            $mcexp = strtotime("+5 minutes"); // Store for five minutes
            
Severity: Major
Found in lib/News/Base.php - About 2 hrs to fix

    Method createSlug has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public function createSlug($story_id = false) {
                if (RP_DEBUG) {
                    global $site_debug;
                    $debug_timer_start = microtime(true);
                }
    Severity: Major
    Found in lib/News/Base.php - About 2 hrs to fix

      Function createSlug has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

              public function createSlug($story_id = false) {
                  if (RP_DEBUG) {
                      global $site_debug;
                      $debug_timer_start = microtime(true);
                  }
      Severity: Minor
      Found in lib/News/Base.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 mostReadThisWeek has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

              public function mostReadThisWeek($limit = 5) {
                  $return = false;
                  
                  $params = array(); 
                  
      Severity: Minor
      Found in lib/News/Base.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 mostReadThisWeek has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public function mostReadThisWeek($limit = 5) {
                  $return = false;
                  
                  $params = array(); 
                  
      Severity: Minor
      Found in lib/News/Base.php - About 1 hr to fix

        Method getPending has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function getPending() {
                    
                    #$query = "SELECT s.*, t.topicname, t.topicimage, t.topictext, u.username FROM nuke_stories AS s, nuke_topics AS t, nuke_users AS u WHERE s.user_id = u.user_id AND s.topic = t.topicid";
                    $query = "SELECT s.*, t.topicname, t.topictext, u.username, 'newqueue' AS queue
                        FROM nuke_stories AS s
        Severity: Minor
        Found in lib/News/Base.php - About 1 hr to fix

          Function getPending has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

                  public function getPending() {
                      
                      #$query = "SELECT s.*, t.topicname, t.topicimage, t.topictext, u.username FROM nuke_stories AS s, nuke_topics AS t, nuke_users AS u WHERE s.user_id = u.user_id AND s.topic = t.topicid";
                      $query = "SELECT s.*, t.topicname, t.topictext, u.username, 'newqueue' AS queue
                          FROM nuke_stories AS s
          Severity: Minor
          Found in lib/News/Base.php - About 25 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Function makePermaLink has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

                  public function makePermaLink($entity = false) {
                      if (!$entity) {
                          return false;
                      }
                      
          Severity: Minor
          Found in lib/News/Base.php - About 25 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 createSlug() has an NPath complexity of 384. The configured NPath complexity threshold is 200.
          Open

                  public function createSlug($story_id = false) {
                      if (RP_DEBUG) {
                          global $site_debug;
                          $debug_timer_start = microtime(true);
                      }
          Severity: Minor
          Found in lib/News/Base.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 mostReadThisWeek() has an NPath complexity of 390. The configured NPath complexity threshold is 200.
          Open

                  public function mostReadThisWeek($limit = 5) {
                      $return = false;
                      
                      $params = array(); 
                      
          Severity: Minor
          Found in lib/News/Base.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 latest() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
          Open

                  public function latest($number = 5, $offset = 0) {
                      $return = false;
                      $mckey = "railpage:news.latest.count=" . $number .".offset=" . $offset;
                      $mcexp = strtotime("+5 minutes"); // Store for five minutes
                      
          Severity: Minor
          Found in lib/News/Base.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 mostReadThisWeek() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
          Open

                  public function mostReadThisWeek($limit = 5) {
                      $return = false;
                      
                      $params = array(); 
                      
          Severity: Minor
          Found in lib/News/Base.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 createSlug() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
          Open

                  public function createSlug($story_id = false) {
                      if (RP_DEBUG) {
                          global $site_debug;
                          $debug_timer_start = microtime(true);
                      }
          Severity: Minor
          Found in lib/News/Base.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 undefined variables such as '$poposal' which will lead to PHP notices.
          Open

                          $proposal = substr($poposal, 0, 200); 
          Severity: Minor
          Found in lib/News/Base.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

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

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

                  public function topics($id = false) {
          Severity: Minor
          Found in lib/News/Base.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 getTopics has a boolean flag argument $id, which is a certain sign of a Single Responsibility Principle violation.
          Open

                  public function getTopics($id = false) {
          Severity: Minor
          Found in lib/News/Base.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 makePermaLink has a boolean flag argument $entity, which is a certain sign of a Single Responsibility Principle violation.
          Open

                  public function makePermaLink($entity = false) {
          Severity: Minor
          Found in lib/News/Base.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 createSlug has a boolean flag argument $story_id, which is a certain sign of a Single Responsibility Principle violation.
          Open

                  public function createSlug($story_id = false) {
          Severity: Minor
          Found in lib/News/Base.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

          Avoid assigning values to variables in if clauses and the like (line '231', column '17').
          Open

                  public function mostReadThisWeek($limit = 5) {
                      $return = false;
                      
                      $params = array(); 
                      
          Severity: Minor
          Found in lib/News/Base.php by phpmd

          IfStatementAssignment

          Since: 2.7.0

          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($foo = 'bar') { // possible typo
                      // ...
                  }
                  if ($baz = 0) { // always false
                      // ...
                  }
              }
          }

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

          Avoid assigning values to variables in if clauses and the like (line '123', column '21').
          Open

                  public function latest($number = 5, $offset = 0) {
                      $return = false;
                      $mckey = "railpage:news.latest.count=" . $number .".offset=" . $offset;
                      $mcexp = strtotime("+5 minutes"); // Store for five minutes
                      
          Severity: Minor
          Found in lib/News/Base.php by phpmd

          IfStatementAssignment

          Since: 2.7.0

          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($foo = 'bar') { // possible typo
                      // ...
                  }
                  if ($baz = 0) { // always false
                      // ...
                  }
              }
          }

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

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

                      } else {
                          $topic_sql = NULL;
                      }
          Severity: Minor
          Found in lib/News/Base.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 mostReadThisWeek uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                              } else {
                                  $row['time_relative'] = $row['time'];
                              }
          Severity: Minor
          Found in lib/News/Base.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 createSlug uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                      } else {
                          return false;
                      }
          Severity: Minor
          Found in lib/News/Base.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 assigning values to variables in if clauses and the like (line '110', column '18').
          Open

                  public function latest($number = 5, $offset = 0) {
                      $return = false;
                      $mckey = "railpage:news.latest.count=" . $number .".offset=" . $offset;
                      $mcexp = strtotime("+5 minutes"); // Store for five minutes
                      
          Severity: Minor
          Found in lib/News/Base.php by phpmd

          IfStatementAssignment

          Since: 2.7.0

          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($foo = 'bar') { // possible typo
                      // ...
                  }
                  if ($baz = 0) { // always false
                      // ...
                  }
              }
          }

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

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

                      } else {
                          $slug = $entity;
                      }
          Severity: Minor
          Found in lib/News/Base.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 createSlug uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                          } else {
                              $site_debug[] = "Zend_DB: SUCCESS create url slug for story ID " . $story_id . " in " . round(microtime(true) - $debug_timer_start, 5) . "s";
                          }
          Severity: Minor
          Found in lib/News/Base.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 latest uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                                  } else {
                                      $row['time_relative'] = $row['time'];
                                  }
          Severity: Minor
          Found in lib/News/Base.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 topics uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                      } else {
                          $query = "SELECT * FROM nuke_topics ORDER BY topictext";
                      }
          Severity: Minor
          Found in lib/News/Base.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 '$item'.
          Open

                      foreach ($find as $item) {
          Severity: Minor
          Found in lib/News/Base.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 '$poposal'.
          Open

                          $proposal = substr($poposal, 0, 200); 
          Severity: Minor
          Found in lib/News/Base.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 '$data'.
          Open

                      if (!$data = $this->Memcached->fetch($mckey)) {
          Severity: Minor
          Found in lib/News/Base.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

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

                      if (RP_DEBUG) {
                          if ($rs === false) {
                              $site_debug[] = "Zend_DB: FAILED create url slug for story ID " . $story_id . " in " . round(microtime(true) - $debug_timer_start, 5) . "s";
                          } else {
                              $site_debug[] = "Zend_DB: SUCCESS create url slug for story ID " . $story_id . " in " . round(microtime(true) - $debug_timer_start, 5) . "s";
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 5 hrs to fix
          lib/Links/Links.php on lines 344..350

          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 121.

          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

                  public function makePermaLink($entity = false) {
                      if (!$entity) {
                          return false;
                      }
                      
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 5 hrs to fix
          lib/Organisations/Base.php on lines 178..196

          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 117.

          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 ($story_id) {
                          $title = $this->db->fetchOne("SELECT title FROM nuke_stories WHERE sid = ?", $story_id); 
                      } elseif (isset($this->title) && !empty($this->title)) {
                          $title = $this->title;
                          $story_id = $this->id;
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 2 hrs to fix
          lib/Links/Links.php on lines 296..303

          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 68.

          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

                              $line = explode("\n", str_replace("\r\n", "\n", !empty($row['story_lead']) ? $row['story_lead'] : $row['story_blurb']));
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 2 hrs to fix
          lib/News/Base.php on lines 242..242

          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 52.

          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

                              $line = explode("\n", str_replace("\r\n", "\n", !empty($row['lead']) ? $row['lead'] : $row['hometext']));
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 2 hrs to fix
          lib/News/Base.php on lines 86..86

          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 52.

          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

                      foreach ($this->db_readonly->fetchAll($query) as $row) {
                          if ($row['title'] == "") {
                              $row['title'] = "No subject";
                          }
                          
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 1 hr to fix
          lib/News/Base.php on lines 178..184

          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 47.

          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

                      foreach ($this->db_readonly->fetchAll($query) as $row) {
                          if ($row['title'] == "") {
                              $row['title'] = "No subject";
                          }
                          
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 1 hr to fix
          lib/News/Base.php on lines 197..203

          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 47.

          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

                              $row['bodytext'] = wpautop(process_bbcode(!empty($row['paragraphs']) ? $row['paragraphs'] : $row['bodytext']));
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 1 hr to fix
          lib/News/Base.php on lines 248..248

          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 47.

          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

                              $row['hometext'] = wpautop(process_bbcode(!empty($row['lead']) ? $row['lead'] : $row['hometext']));
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 1 hr to fix
          lib/News/Base.php on lines 249..249

          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 47.

          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

                      $find = array(
                          "(",
                          ")",
                          "-",
                          "?",
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 1 hr to fix
          lib/Images/Utility/Tagger.php on lines 77..91

          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 47.

          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 5 locations. Consider refactoring.
          Open

                  public function __construct() {
                      parent::__construct(); 
                      
                      $this->Module = new Module("news");
                      $this->namespace = $this->Module->namespace;
          Severity: Major
          Found in lib/News/Base.php and 4 other locations - About 1 hr to fix
          lib/Events/Events.php on lines 48..53
          lib/Locations/Locations.php on lines 48..53
          lib/Organisations/Base.php on lines 35..40
          lib/Railcams/Railcams.php on lines 30..35

          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 40.

          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

                      if (strlen($proposal) >= 256) {
                          $proposal = substr($poposal, 0, 200); 
                      }
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 1 hr to fix
          lib/Links/Links.php on lines 312..314

          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 36.

          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

                              $row['story_body'] = !empty($row['paragraphs']) ? $row['paragraphs'] : $row['bodytext'];
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 1 hr to fix
          lib/News/Base.php on lines 245..245

          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 33.

          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

                              $row['story_lead'] = !empty($row['lead']) ? $row['lead'] : $row['hometext'];
          Severity: Major
          Found in lib/News/Base.php and 1 other location - About 1 hr to fix
          lib/News/Base.php on lines 246..246

          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 33.

          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 5 locations. Consider refactoring.
          Open

                              if (empty($row['slug'])) {
                                  $row['slug'] = $this->createSlug($row['story_id']); 
                              }
          Severity: Major
          Found in lib/News/Base.php and 4 other locations - About 1 hr to fix
          lib/News/Base.php on lines 140..142
          lib/News/Base.php on lines 252..254
          lib/News/Topic.php on lines 239..241
          lib/News/Topic.php on lines 298..300

          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 32.

          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 5 locations. Consider refactoring.
          Open

                                  if (empty($row['slug'])) {
                                      $row['slug'] = $this->createSlug($row['sid']); 
                                  }
          Severity: Major
          Found in lib/News/Base.php and 4 other locations - About 1 hr to fix
          lib/News/Base.php on lines 94..96
          lib/News/Base.php on lines 252..254
          lib/News/Topic.php on lines 239..241
          lib/News/Topic.php on lines 298..300

          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 32.

          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 5 locations. Consider refactoring.
          Open

                              if (empty($row['slug'])) {
                                  $row['slug'] = $this->createSlug($row['sid']); 
                              }
          Severity: Major
          Found in lib/News/Base.php and 4 other locations - About 1 hr to fix
          lib/News/Base.php on lines 94..96
          lib/News/Base.php on lines 140..142
          lib/News/Topic.php on lines 239..241
          lib/News/Topic.php on lines 298..300

          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 32.

          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 12 locations. Consider refactoring.
          Open

                      if (RP_DEBUG) {
                          global $site_debug;
                          $debug_timer_start = microtime(true);
                      }
          Severity: Major
          Found in lib/News/Base.php and 11 other locations - About 55 mins to fix
          lib/Events/Event.php on lines 341..344
          lib/Events/Event.php on lines 381..384
          lib/Forums/Post.php on lines 434..437
          lib/Forums/Thread.php on lines 209..212
          lib/Images/Image.php on lines 611..614
          lib/Links/Links.php on lines 278..281
          lib/News/Article.php on lines 365..368
          lib/PrivateMessages/Folder.php on lines 86..89
          lib/API.php on lines 128..131
          lib/API.php on lines 260..263
          lib/Template.php on lines 332..335

          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 4 locations. Consider refactoring.
          Open

                      $result = $this->db_readonly->fetchAll("SELECT sid FROM nuke_stories WHERE slug = ? AND sid != ?", array($proposal, $story_id)); 
          Severity: Major
          Found in lib/News/Base.php and 3 other locations - About 45 mins to fix
          lib/Images/Images.php on lines 109..109
          lib/Links/Links.php on lines 320..320
          lib/Organisations/Base.php on lines 138..138

          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 25.

          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 4 locations. Consider refactoring.
          Open

                      $query = $Sphinx->select("*")
                              ->from("idx_news_article")
                              ->orderBy("story_time_unix", "DESC")
                              ->where("story_active", "=", 1)
          Severity: Major
          Found in lib/News/Base.php and 3 other locations - About 40 mins to fix
          lib/News/Article.php on lines 1008..1011
          lib/News/Scraper.php on lines 232..235
          lib/News/Topic.php on lines 266..269

          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 23.

          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 5 locations. Consider refactoring.
          Open

                  public function getTopics($id = false) {
                      return $this->topics($id); 
                  }
          Severity: Major
          Found in lib/News/Base.php and 4 other locations - About 35 mins to fix
          lib/Locos/Correction.php on lines 373..377
          lib/Locos/Correction.php on lines 387..391
          lib/Memcached.php on lines 192..194
          lib/Submenu.php on lines 212..214

          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 22.

          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

                              $row['firstline']   = strip_tags($line[0]);
          Severity: Minor
          Found in lib/News/Base.php and 1 other location - About 35 mins to fix
          lib/News/Base.php on lines 135..135

          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 22.

          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

                                  $row['firstline']   = strip_tags($line[0]);
          Severity: Minor
          Found in lib/News/Base.php and 1 other location - About 35 mins to fix
          lib/News/Base.php on lines 87..87

          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 22.

          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 5 locations. Consider refactoring.
          Open

                      $rs = $this->db->update("nuke_stories", $data, $where); 
          Severity: Major
          Found in lib/News/Base.php and 4 other locations - About 30 mins to fix
          lib/Links/Link.php on lines 194..194
          lib/Links/Links.php on lines 342..342
          lib/Locos/Locomotive.php on lines 687..687
          lib/Organisations/Base.php on lines 160..160

          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

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

                      $name = str_replace($find, $replace, $title);
          Severity: Major
          Found in lib/News/Base.php and 7 other locations - About 30 mins to fix
          lib/Formatting/BbcodeUtility.php on lines 109..109
          lib/Formatting/BbcodeUtility.php on lines 124..124
          lib/Formatting/MultimediaUtility.php on lines 191..191
          lib/Images/Exif.php on lines 230..230
          lib/Links/Links.php on lines 305..305
          lib/News/Utility/ArticleUtility.php on lines 97..97
          lib/AppCore.php on lines 700..700

          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 20.

          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 3 locations. Consider refactoring.
          Open

                      if (is_array($matches) && count($matches)) {
                          
                          foreach ($matches as $id => $row) {
                              $row['time_relative'] = time2str($row['story_time_unix']);
                              $row['time'] = time2str($row['story_time']);
          Severity: Minor
          Found in lib/News/Base.php and 2 other locations - About 30 mins to fix
          lib/Images/Utility/Finder.php on lines 698..710
          lib/News/Topic.php on lines 279..312

          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 20.

          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 $story_id is not named in camelCase.
          Open

                  public function createSlug($story_id = false) {
                      if (RP_DEBUG) {
                          global $site_debug;
                          $debug_timer_start = microtime(true);
                      }
          Severity: Minor
          Found in lib/News/Base.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

                      if (!$data = $this->Memcached->fetch($mckey)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Blank line found at start of control structure
          Open

                      if (is_array($matches) && count($matches)) {
          Severity: Minor
          Found in lib/News/Base.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/News/Base.php by phpcodesniffer

          Blank line found at end of control structure
          Open

                          
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public function mostReadThisWeek($limit = 5) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (RP_DEBUG) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              foreach ($result as $row) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          foreach ($result as $row) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public function createSlug($story_id = false) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      } elseif (isset($this->title) && !empty($this->title)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          if ($rs === false) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (!$entity) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          if ($row['title'] == "") {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              if (empty($row['slug'])) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (filter_var($id, FILTER_VALIDATE_INT)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              if (empty($row['slug'])) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          if ($slug === false || empty($slug)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (!$data = $this->Memcached->fetch($mckey)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          if ($result = $this->db_readonly->fetchAll($query, array("1", $offset, $number))) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 20 spaces, found 24
          Open

                                  if (empty($row['slug'])) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          } else {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          foreach ($matches as $id => $row) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 20 spaces, found 24
          Open

                                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              } else {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      } else {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public function getTopics($id = false) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      } else {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (count($result)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (isset($this->slug)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      } else {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 20 spaces, found 24
          Open

                                  } else {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (isset($this->id) && filter_var($this->id, FILTER_VALIDATE_INT)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if ($result = $this->db_readonly->fetchAll($query, $params)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public function topics($id = false) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      foreach ($this->db_readonly->fetchAll($query, $params) as $row) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 0 spaces, found 4
          Open

              }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          if ($row['title'] == "") {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      } else {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              if (function_exists("relative_date")) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public function latest($number = 5, $offset = 0) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      foreach ($find as $item) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public function getPending() {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (RP_DEBUG) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      foreach ($this->db_readonly->fetchAll($query) as $row) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if ($story_id) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (filter_var($entity, FILTER_VALIDATE_INT)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 0 spaces, found 4
          Open

              class Base extends AppCore {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 20 spaces, found 24
          Open

                                  }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public function __construct() {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (strlen($proposal) >= 256) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 20 spaces, found 24
          Open

                                  if (function_exists("relative_date")) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }   
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      if (is_array($matches) && count($matches)) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 16 spaces, found 20
          Open

                              }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 12 spaces, found 16
          Open

                          }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      foreach ($this->db_readonly->fetchAll($query) as $row) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public $user = false;
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 8 spaces, found 12
          Open

                      }
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          Line indented incorrectly; expected 4 spaces, found 8
          Open

                  public function makePermaLink($entity = false) {
          Severity: Minor
          Found in lib/News/Base.php by phpcodesniffer

          There are no issues that match your filters.

          Category
          Status