XoopsModules25x/xoopspoll

View on GitHub
extras/newbb_5x/irmtfan/class/PostHandler.php

Summary

Maintainability
F
1 wk
Test Coverage

_delete accesses the super-global variable $GLOBALS.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

_delete accesses the super-global variable $GLOBALS.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

_delete accesses the super-global variable $GLOBALS.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

_delete accesses the super-global variable $GLOBALS.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

_delete accesses the super-global variable $GLOBALS.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

delete accesses the super-global variable $GLOBALS.
Open

    public function delete($post, $isDeleteOne = true, $force = false)
    {
        $retVal = false;
        if (($post instanceof Post) && ($post->getVar('post_id') > 0)) {
            if ($isDeleteOne) {

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

_delete accesses the super-global variable $GLOBALS.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

_delete accesses the super-global variable $GLOBALS.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

_delete accesses the super-global variable $GLOBALS.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Function _delete has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
Open

    private function _delete($post, $force = false)
    {
        if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
            return false;
        }
Severity: Minor
Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 1 day to fix

Cognitive Complexity

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

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

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

Further reading

File PostHandler.php has 417 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php declare(strict_types=1);

namespace XoopsModules\Newbb;

/*
Severity: Minor
Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 6 hrs to fix

    Function insert has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
    Open

        public function insert(\XoopsObject $post, $force = true)
        {
            // Set the post time
            // The time should be 'publish' time. To be adjusted later
            if (!$post->getVar('post_time')) {
    Severity: Minor
    Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 5 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 _delete has 106 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function _delete($post, $force = false)
        {
            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                return false;
            }
    Severity: Major
    Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 4 hrs to fix

      Method insert has 89 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function insert(\XoopsObject $post, $force = true)
          {
              // Set the post time
              // The time should be 'publish' time. To be adjusted later
              if (!$post->getVar('post_time')) {
      Severity: Major
      Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 3 hrs to fix

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

        class PostHandler extends \XoopsPersistableObjectHandler
        {
            /**
             * @param null|\XoopsDatabase $db
             */

        Function delete has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
        Open

            public function delete($post, $isDeleteOne = true, $force = false)
            {
                $retVal = false;
                if (($post instanceof Post) && ($post->getVar('post_id') > 0)) {
                    if ($isDeleteOne) {
        Severity: Minor
        Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 2 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 approve has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function approve(&$post, $force = false)
            {
                if (empty($post)) {
                    return false;
                }
        Severity: Minor
        Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 1 hr to fix

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

              public function approve(&$post, $force = false)
              {
                  if (empty($post)) {
                      return false;
                  }
          Severity: Minor
          Found in extras/newbb_5x/irmtfan/class/PostHandler.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 delete has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function delete($post, $isDeleteOne = true, $force = false)
              {
                  $retVal = false;
                  if (($post instanceof Post) && ($post->getVar('post_id') > 0)) {
                      if ($isDeleteOne) {
          Severity: Minor
          Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 1 hr to fix

            Function getPostsByLimit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                public function &getPostsByLimit($criteria = null, $limit = 1, $start = 0, $join = null)
                {
                    $ret = [];
                    $sql = 'SELECT p.*, t.* ' . 'FROM ' . $this->db->prefix('bb_posts') . ' AS p ' . 'LEFT JOIN ' . $this->db->prefix('bb_posts_text') . ' AS t ON t.post_id = p.post_id';
                    if (!empty($join)) {
            Severity: Minor
            Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 45 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

            Avoid too many return statements within this method.
            Open

                    return $post->getVar('post_id');
            Severity: Major
            Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  return false;
              Severity: Major
              Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return false;
                Severity: Major
                Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return false;
                  Severity: Major
                  Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 30 mins to fix

                    The method approve() has an NPath complexity of 1536. The configured NPath complexity threshold is 200.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    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 _delete() has 131 lines of code. Current threshold is set to 100. Avoid really long methods.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    The method insert() has an NPath complexity of 1632. The configured NPath complexity threshold is 200.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    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 _delete() has an NPath complexity of 19929. The configured NPath complexity threshold is 200.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 insert() has 113 lines of code. Current threshold is set to 100. Avoid really long methods.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

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

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    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 insert() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    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 _delete() has a Cyclomatic Complexity of 30. The configured cyclomatic complexity threshold is 10.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 '$myObjtree' which will lead to PHP notices.
                    Open

                                    $arr       = $myObjtree->getAllChild(); // get all children of this object

                    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 class PostHandler has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
                    Open

                    class PostHandler extends \XoopsPersistableObjectHandler
                    {
                        /**
                         * @param null|\XoopsDatabase $db
                         */

                    CouplingBetweenObjects

                    Since: 1.1.0

                    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

                    Example

                    class Foo {
                        /**
                         * @var \foo\bar\X
                         */
                        private $x = null;
                    
                        /**
                         * @var \foo\bar\Y
                         */
                        private $y = null;
                    
                        /**
                         * @var \foo\bar\Z
                         */
                        private $z = null;
                    
                        public function setFoo(\Foo $foo) {}
                        public function setBar(\Bar $bar) {}
                        public function setBaz(\Baz $baz) {}
                    
                        /**
                         * @return \SplObjectStorage
                         * @throws \OutOfRangeException
                         * @throws \InvalidArgumentException
                         * @throws \ErrorException
                         */
                        public function process(\Iterator $it) {}
                    
                        // ...
                    }

                    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

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

                        public function approve(&$post, $force = false)

                    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

                    Missing class import via use statement (line '314', column '40').
                    Open

                                        $criteria->add(new \Criteria('approved', 1));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '619', column '28').
                    Open

                            $crit_expire = new \CriteriaCompo(new \Criteria('approved', 0, '<='));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

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

                        public function delete($post, $isDeleteOne = true, $force = false)

                    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

                    Missing class import via use statement (line '315', column '40').
                    Open

                                        $criteria->add(new \Criteria('pid', 0, '>'));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '427', column '45').
                    Open

                                                    $poll = new \Umfrage($poll_id);

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '430', column '42').
                    Open

                                                        (new \UmfrageLog())->deleteByPollId($poll_id);

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '313', column '56').
                    Open

                                        $criteria = new \CriteriaCompo(new \Criteria('topic_id', $post->getVar('topic_id')));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '411', column '71').
                    Open

                                                if (false !== $pollHandler->deleteAll(new \Criteria('poll_id', $poll_id, '='))) {

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '415', column '60').
                    Open

                                                    $logHandler->deleteAll(new \Criteria('poll_id', $poll_id, '='));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '429', column '42').
                    Open

                                                        (new \UmfrageOption())->deleteByPollId($poll_id);

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

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

                        public function delete($post, $isDeleteOne = true, $force = false)

                    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

                    Missing class import via use statement (line '619', column '47').
                    Open

                            $crit_expire = new \CriteriaCompo(new \Criteria('approved', 0, '<='));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

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

                        private function _delete($post, $force = false)

                    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

                    Missing class import via use statement (line '326', column '34').
                    Open

                                    $myObjTree = new \XoopsObjectTree($this->getAll(), 'post_id', 'pid', $post->getVar('post_id'));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '313', column '37').
                    Open

                                        $criteria = new \CriteriaCompo(new \Criteria('topic_id', $post->getVar('topic_id')));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

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

                        public function insert(\XoopsObject $post, $force = true)

                    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

                    Missing class import via use statement (line '413', column '63').
                    Open

                                                    $optionHandler->deleteAll(new \Criteria('poll_id', $poll_id, '='));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '621', column '31').
                    Open

                            $crit_expire->add(new \Criteria('post_time', \time() - (int)$expire, '<'));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

                    Missing class import via use statement (line '578', column '30').
                    Open

                            $this->deleteAll(new \Criteria('post_time', 0), true, true);

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

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

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

                            } else {
                                $topic_obj->setVar('topic_replies', $topic_obj->getVar('topic_replies') + 1);
                            }

                    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 insert uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else {
                                if ($post->isTopic()) {
                                    if ($post->getVar('subject') !== $topic_obj->getVar('topic_title')) {
                                        $topic_obj->setVar('topic_title', $post->getVar('subject', 'n'));
                                    }

                    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 '245', column '18').
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    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 '284', column '18').
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    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 _delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                            } else {
                                                $poll_moduleHandler = $moduleHandler->getByDirname('umfrage');
                                                if (($poll_moduleHandler instanceof \XoopsModuleHandler)
                                                    && $poll_moduleHandler->isactive()) {
                                                    require_once $GLOBALS['xoops']->path('modules/umfrage/class/umfrage.php');

                    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 delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                } else { // want to delete multiple posts
                                    //@TODO: test replacement of XoopsTree with XoopsObjectTree
                                    require_once $GLOBALS['xoops']->path('class/tree.php');
                                    // get tree with this object as the root
                                    $myObjTree = new \XoopsObjectTree($this->getAll(), 'post_id', 'pid', $post->getVar('post_id'));

                    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 '443', column '22').
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 '513', column '14').
                    Open

                        public function getPostCount($criteria = null, $join = null)
                        {
                            // If not join get the count from XOOPS/class/model/stats as before
                            if (empty($join)) {
                                return $this->getCount($criteria);

                    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 _delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else { /* delete pending post directly */
                                $sql = \sprintf('DELETE FROM `%s` WHERE post_id = %u', $this->db->prefix('bb_posts'), $post->getVar('post_id'));
                                if (!$result = $this->db->queryF($sql)) {
                                    $post->setErrors('delte post error: ' . $sql);
                    
                    

                    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 _delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                } else {
                                    if (\is_object($topic_obj)) {
                                        if ($topic_obj->getVar('approved') > 0) {
                                            \xoops_notification_deletebyitem($GLOBALS['xoopsModule']->getVar('mid'), 'thread', $post->getVar('topic_id'));
                                        }

                    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 '374', column '18').
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 '382', column '18').
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 '224', column '22').
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    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 '271', column '22').
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    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 _delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else {
                                $sql = 'UPDATE '
                                       . $this->db->prefix('bb_topics')
                                       . ' t '
                                       . 'LEFT JOIN '

                    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 '594', column '14').
                    Open

                        public function cleanOrphan()
                        {
                            $this->deleteAll(new \Criteria('post_time', 0), true, true);
                            parent::cleanOrphan($this->db->prefix('bb_topics'), 'topic_id');
                            parent::cleanOrphan($this->db->prefix('bb_posts_text'), 'post_id');

                    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 cleanOrphan uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                            } else { /* for 4.0+ */
                                $sql = 'DELETE ' . $this->db->prefix('bb_posts_text') . ' FROM ' . $this->db->prefix('bb_posts_text') . ' ' . 'LEFT JOIN ' . $this->table . ' AS aa ON ' . $this->db->prefix('bb_posts_text') . '.post_id = aa.post_id ' . ' ' . 'WHERE (aa.post_id IS NULL)';
                    
                                // Alternative for 4.1+
                                /*

                    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 delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                    } else {
                                        $retVal = $this->_delete($post, $force);
                                    }

                    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 delete uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                    Open

                                    } else {
                                        // did not successfully delete all children so don't delete this post
                                        $retVal = false;
                                    }

                    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 '369', column '18').
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 '462', column '18').
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 '439', column '22').
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 '216', column '18').
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    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 '483', column '22').
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    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 unused parameters such as '$fields'.
                    Open

                        public function get($id = null, $fields = null)

                    UnusedFormalParameter

                    Since: 0.2

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

                    Example

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

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

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

                            $post_id = $post->getVar('post_id');

                    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 '$res'.
                    Open

                                    $res = $memberHandler->insertUser($poster, true);

                    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 '$topiccount_toupdate'.
                    Open

                                    $topiccount_toupdate = 1;

                    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 '$result'.
                    Open

                                    if (!$result = $topicHandler->insert($topic_obj, $force)) {

                    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 '$myObjTree'.
                    Open

                                    $myObjTree = new \XoopsObjectTree($this->getAll(), 'post_id', 'pid', $post->getVar('post_id'));

                    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 '$res'.
                    Open

                                        $res = $memberHandler->insertUser($poster, true);

                    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 '$result'.
                    Open

                            if (!$result = $this->db->queryF($sql)) {

                    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 '$result'.
                    Open

                                if (!$result = $this->db->queryF($sql)) {

                    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 '$myObjtree'.
                    Open

                                    $arr       = $myObjtree->getAllChild(); // get all children of this object

                    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

                    TODO found
                    Open

                                    //@TODO: add error checking here

                    TODO found
                    Open

                                    //@TODO: add error check here

                    TODO found
                    Open

                                    //@TODO: test replacement of XoopsTree with XoopsObjectTree

                    TODO found
                    Open

                         *@TODO: combining viewtopic.php

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

                                if (!$topic_id = $post->getVar('topic_id')) {
                                    $topic_obj->setVar('topic_title', $post->getVar('subject', 'n'));
                                    $topic_obj->setVar('topic_poster', $post->getVar('uid'));
                                    $topic_obj->setVar('forum_id', $post->getVar('forum_id'));
                                    $topic_obj->setVar('topic_time', $post->getVar('post_time'));
                    Severity: Major
                    Found in extras/newbb_5x/irmtfan/class/PostHandler.php and 1 other location - About 1 day to fix
                    extras/newbb_5x/trunk_5_00/class/Post.php on lines 790..810

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

                    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

                        public function &getByLimit($topic_id, $limit, $approved = 1)
                        {
                            $sql    = 'SELECT p.*, t.*, tp.topic_status FROM '
                                      . $this->db->prefix('bb_posts')
                                      . ' p LEFT JOIN '
                    Severity: Major
                    Found in extras/newbb_5x/irmtfan/class/PostHandler.php and 1 other location - About 5 hrs to fix
                    extras/newbb_5x/trunk_5_00/class/Post.php on lines 638..664

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

                    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

                        public function get($id = null, $fields = null)
                        {
                            $id    = (int)$id;
                            $post  = null;
                            $sql   = 'SELECT p.*, t.* FROM ' . $this->db->prefix('bb_posts') . ' p LEFT JOIN ' . $this->db->prefix('bb_posts_text') . ' t ON p.post_id=t.post_id WHERE p.post_id=' . $id;
                    Severity: Major
                    Found in extras/newbb_5x/irmtfan/class/PostHandler.php and 1 other location - About 2 hrs to fix
                    extras/newbb_5x/trunk_5_00/class/Post.php on lines 618..630

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

                    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

                    Avoid variables with short names like $db. Configured minimum length is 3.
                    Open

                        public function __construct(\XoopsDatabase $db = null)

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    Avoid variables with short names like $id. Configured minimum length is 3.
                    Open

                        public function get($id = null, $fields = null)

                    ShortVariable

                    Since: 0.2

                    Detects when a field, local, or parameter has a very short name.

                    Example

                    class Something {
                        private $q = 15; // VIOLATION - Field
                        public static function main( array $as ) { // VIOLATION - Formal
                            $r = 20 + $this->q; // VIOLATION - Local
                            for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                $r += $this->q;
                            }
                        }
                    }

                    Source https://phpmd.org/rules/naming.html#shortvariable

                    The parameter $topic_id is not named in camelCase.
                    Open

                        public function &getByLimit($topic_id, $limit, $approved = 1)
                        {
                            $sql    = 'SELECT p.*, t.*, tp.topic_status FROM '
                                      . $this->db->prefix('bb_posts')
                                      . ' p LEFT JOIN '

                    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

                    A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 31 and the first side effect is on line 24.
                    Open

                    <?php declare(strict_types=1);

                    Method name "_delete" should not be prefixed with an underscore to indicate visibility
                    Open

                        private function _delete($post, $force = false)

                    Line exceeds 120 characters; contains 174 characters
                    Open

                            $sql = 'SELECT p.*, t.* ' . 'FROM ' . $this->db->prefix('bb_posts') . ' AS p ' . 'LEFT JOIN ' . $this->db->prefix('bb_posts_text') . ' AS t ON t.post_id = p.post_id';

                    Line exceeds 120 characters; contains 126 characters
                    Open

                                    \xoops_notification_deletebyitem($GLOBALS['xoopsModule']->getVar('mid'), 'thread', $post->getVar('topic_id'));

                    Line exceeds 120 characters; contains 133 characters
                    Open

                                    $sql = \sprintf('DELETE FROM `%s` WHERE topic_id = %u', $this->db->prefix('bb_votedata'), $post->getVar('topic_id'));

                    Line exceeds 120 characters; contains 129 characters
                    Open

                        //    public function &getByLimit($limit = 0, $start = 0, CriteriaElement $criteria = null, $fields = null, $asObject = true)

                    Line exceeds 120 characters; contains 124 characters
                    Open

                                $sql = \sprintf('DELETE FROM `%s` WHERE post_id = %u', $this->db->prefix('bb_posts'), $post->getVar('post_id'));

                    Line exceeds 120 characters; contains 181 characters
                    Open

                            $sql   = 'SELECT p.*, t.* FROM ' . $this->db->prefix('bb_posts') . ' p LEFT JOIN ' . $this->db->prefix('bb_posts_text') . ' t ON p.post_id=t.post_id WHERE p.post_id=' . $id;

                    Line exceeds 120 characters; contains 158 characters
                    Open

                                $sql = 'DELETE FROM ' . $this->db->prefix('bb_posts_text') . ' ' . 'WHERE (post_id NOT IN ( SELECT DISTINCT post_id FROM ' . $this->table . ') )';

                    Line exceeds 120 characters; contains 266 characters
                    Open

                                $sql = 'DELETE ' . $this->db->prefix('bb_posts_text') . ' FROM ' . $this->db->prefix('bb_posts_text') . ' ' . 'LEFT JOIN ' . $this->table . ' AS aa ON ' . $this->db->prefix('bb_posts_text') . '.post_id = aa.post_id ' . ' ' . 'WHERE (aa.post_id IS NULL)';

                    Line exceeds 120 characters; contains 134 characters
                    Open

                                            \xoops_notification_deletebyitem($GLOBALS['xoopsModule']->getVar('mid'), 'thread', $post->getVar('topic_id'));

                    Line exceeds 120 characters; contains 129 characters
                    Open

                                $sql = \sprintf('DELETE FROM `%s` WHERE post_id = %u', $this->db->prefix('bb_posts_text'), $post->getVar('post_id'));

                    Line exceeds 120 characters; contains 162 characters
                    Open

                                    $sql = 'UPDATE ' . $this->db->prefix('bb_posts') . ' SET pid = ' . $post->getVar('pid') . ' WHERE approved=1 AND pid=' . $post->getVar('post_id');

                    Line exceeds 120 characters; contains 128 characters
                    Open

                                $sql = 'UPDATE ' . $this->db->prefix('bb_posts') . ' SET approved = -1 WHERE post_id = ' . $post->getVar('post_id');

                    Line exceeds 120 characters; contains 131 characters
                    Open

                                    $sql = \sprintf('DELETE FROM `%s` WHERE topic_id = %u', $this->db->prefix('bb_topics'), $post->getVar('topic_id'));

                    Line exceeds 120 characters; contains 198 characters
                    Open

                            $sql = 'SELECT COUNT(*) AS count' . ' ' . 'FROM ' . $this->db->prefix('bb_posts') . ' AS p' . ' ' . 'LEFT JOIN ' . $this->db->prefix('bb_posts_text') . ' ' . 'AS t ON t.post_id = p.post_id';

                    The variable $post_id is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $forum_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $forum_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $forum_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function &getByLimit($topic_id, $limit, $approved = 1)
                        {
                            $sql    = 'SELECT p.*, t.*, tp.topic_status FROM '
                                      . $this->db->prefix('bb_posts')
                                      . ' p LEFT JOIN '

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $forum_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $forum_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $forum_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $forum_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $forum_obj is not named in camelCase.
                    Open

                        public function approve(&$post, $force = false)
                        {
                            if (empty($post)) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_moduleHandler is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_moduleHandler is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_text_vars is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $crit_expire is not named in camelCase.
                    Open

                        public function cleanExpires($expire = 0)
                        {
                            // irmtfan if 0 no cleanup look include/plugin.php
                            if (!\func_num_args()) {
                                $newbbConfig = newbb_load_config();

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_moduleHandler is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_text_vars is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $crit_expire is not named in camelCase.
                    Open

                        public function cleanExpires($expire = 0)
                        {
                            // irmtfan if 0 no cleanup look include/plugin.php
                            if (!\func_num_args()) {
                                $newbbConfig = newbb_load_config();

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $text_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $crit_expire is not named in camelCase.
                    Open

                        public function cleanExpires($expire = 0)
                        {
                            // irmtfan if 0 no cleanup look include/plugin.php
                            if (!\func_num_args()) {
                                $newbbConfig = newbb_load_config();

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $text_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $text_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_text_vars is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topiccount_toupdate is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $postcount_toupdate is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $text_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $text_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $text_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_text_vars is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_moduleHandler is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_moduleHandler is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_moduleHandler is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $postcount_toupdate is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_text_vars is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $text_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $text_obj is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $topic_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $post_id is not named in camelCase.
                    Open

                        public function insert(\XoopsObject $post, $force = true)
                        {
                            // Set the post time
                            // The time should be 'publish' time. To be adjusted later
                            if (!$post->getVar('post_time')) {

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The variable $poll_id is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseVariableName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function doSomething() {
                            $data_module = new DataModule();
                        }
                    }

                    Source

                    The method _delete is not named in camelCase.
                    Open

                        private function _delete($post, $force = false)
                        {
                            if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                                return false;
                            }

                    CamelCaseMethodName

                    Since: 0.2

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

                    Example

                    class ClassName {
                        public function get_name() {
                        }
                    }

                    Source

                    There are no issues that match your filters.

                    Category
                    Status