CORE-POS/Common-Bundle

View on GitHub
src/BasicModel.php

Summary

Maintainability
F
1 wk
Test Coverage

File BasicModel.php has 1065 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*******************************************************************************

    Copyright 2013 Whole Foods Co-op

Severity: Major
Found in src/BasicModel.php - About 2 days to fix

    Function normalize has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
    Open

        public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
        {
            if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                echo "Error: Unknown mode ($mode)\n";
                return false;
    Severity: Minor
    Found in src/BasicModel.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

    BasicModel has 51 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class BasicModel 
    {
        /**
          Name of the table
        */
    Severity: Major
    Found in src/BasicModel.php - About 7 hrs to fix

      Method normalize has 110 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
          {
              if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                  echo "Error: Unknown mode ($mode)\n";
                  return false;
      Severity: Major
      Found in src/BasicModel.php - About 4 hrs to fix

        Function find has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            public function find($sort='', $reverse=false)
            {
                if (!is_array($sort)) {
                    $sort = array($sort);
                }
        Severity: Minor
        Found in src/BasicModel.php - About 4 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function cli has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            public function cli($argc, $argv)
            {
                if ($argc > 2 && $argv[1] == '--doc') {
                    array_shift($argv);
                    array_shift($argv);
        Severity: Minor
        Found in src/BasicModel.php - About 4 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        The class BasicModel has 20 public methods. Consider refactoring BasicModel to keep number of public methods under 10.
        Open

        class BasicModel 
        {
            /**
              Name of the table
            */
        Severity: Minor
        Found in src/BasicModel.php by phpmd

        TooManyPublicMethods

        Since: 0.1

        A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

        By default it ignores methods starting with 'get' or 'set'.

        Example

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

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

        class BasicModel 
        {
            /**
              Name of the table
            */
        Severity: Minor
        Found in src/BasicModel.php by phpmd

        The class BasicModel has 35 non-getter- and setter-methods. Consider refactoring BasicModel to keep number of methods under 25.
        Open

        class BasicModel 
        {
            /**
              Name of the table
            */
        Severity: Minor
        Found in src/BasicModel.php by phpmd

        TooManyMethods

        Since: 0.1

        A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

        By default it ignores methods starting with 'get' or 'set'.

        The default was changed from 10 to 25 in PHPMD 2.3.

        Example

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

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

            private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
            {
                $current = $this->connection->detailedDefinition($this->name);
                $recase_columns = array();
                $redo_pk = false;
        Severity: Minor
        Found in src/BasicModel.php - About 3 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function insertRecord has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
        Open

            protected function insertRecord()
            {
                $sql = 'INSERT INTO '.$this->fq_name;
                $cols = '(';
                $vals = '(';
        Severity: Minor
        Found in src/BasicModel.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

        Function create has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
        Open

            public function create()
            {
                if ($this->connection->tableExists($this->fq_name)) {
                    return true;
                }
        Severity: Minor
        Found in src/BasicModel.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 cli has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function cli($argc, $argv)
            {
                if ($argc > 2 && $argv[1] == '--doc') {
                    array_shift($argv);
                    array_shift($argv);
        Severity: Major
        Found in src/BasicModel.php - About 2 hrs to fix

          Method find has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function find($sort='', $reverse=false)
              {
                  if (!is_array($sort)) {
                      $sort = array($sort);
                  }
          Severity: Major
          Found in src/BasicModel.php - About 2 hrs to fix

            Function normalizeRename has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

                private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                {
                    $current = $this->connection->detailedDefinition($this->name);
                    $recase_columns = array();
                    foreach ($this->columns as $col_name => $definition) {
            Severity: Minor
            Found in src/BasicModel.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

            Function load has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

                public function load()
                {
                    if (empty($this->unique)) {
                        return false;
                    }
            Severity: Minor
            Found in src/BasicModel.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

            Function updateRecord has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

                protected function updateRecord()
                {
                    $sql = 'UPDATE '.$this->fq_name;
                    $sets = '';
                    $where = '1=1';
            Severity: Minor
            Found in src/BasicModel.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

            Function save has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
            Open

                public function save()
                {
                    if (!is_array($this->hooks) || empty($this->hooks)) {
                        $this->loadHooks();
                    }
            Severity: Minor
            Found in src/BasicModel.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

            Function __call has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
            Open

                public function __call($name, $arguments)
                {
                    if (!isset($this->columns[$name])) {
                        foreach ($this->columns as $col => $info) {
                            if (isset($info['replaces']) && $info['replaces'] == $name) {
            Severity: Minor
            Found in src/BasicModel.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 create has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function create()
                {
                    if ($this->connection->tableExists($this->fq_name)) {
                        return true;
                    }
            Severity: Minor
            Found in src/BasicModel.php - About 1 hr to fix

              Function arrayToSQL has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected function arrayToSQL($definition, $dbms)
                  {
                      $sql = '';
                      $type = $definition['type'];
                      if (isset($this->meta_types[strtoupper($type)])) {
              Severity: Minor
              Found in src/BasicModel.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 normalizeColumnAttributes has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                  {
                      $current = $this->connection->detailedDefinition($this->name);
                      $recase_columns = array();
                      $redo_pk = false;
              Severity: Minor
              Found in src/BasicModel.php - About 1 hr to fix

                Method printMarkdown has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function printMarkdown($files)
                    {
                        $tables = array();
                        $tables = array_reduce($files,
                            function ($carry, $file) {
                Severity: Minor
                Found in src/BasicModel.php - About 1 hr to fix

                  Function normalizeChangeCase has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                      {
                          $current = $this->connection->detailedDefinition($this->name);
                          $lowercase_current = array();
                          $casemap = array();
                  Severity: Minor
                  Found in src/BasicModel.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

                  The class BasicModel has 16 fields. Consider redesigning BasicModel to keep the number of fields under 15.
                  Open

                  class BasicModel 
                  {
                      /**
                        Name of the table
                      */
                  Severity: Minor
                  Found in src/BasicModel.php by phpmd

                  TooManyFields

                  Since: 0.1

                  Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

                  Example

                  class Person {
                     protected $one;
                     private $two;
                     private $three;
                     [... many more fields ...]
                  }

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

                  Method save has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function save()
                      {
                          if (!is_array($this->hooks) || empty($this->hooks)) {
                              $this->loadHooks();
                          }
                  Severity: Minor
                  Found in src/BasicModel.php - About 1 hr to fix

                    Method load has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function load()
                        {
                            if (empty($this->unique)) {
                                return false;
                            }
                    Severity: Minor
                    Found in src/BasicModel.php - About 1 hr to fix

                      Method normalizeChangeCase has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                          {
                              $current = $this->connection->detailedDefinition($this->name);
                              $lowercase_current = array();
                              $casemap = array();
                      Severity: Minor
                      Found in src/BasicModel.php - About 1 hr to fix

                        Method insertRecord has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function insertRecord()
                            {
                                $sql = 'INSERT INTO '.$this->fq_name;
                                $cols = '(';
                                $vals = '(';
                        Severity: Minor
                        Found in src/BasicModel.php - About 1 hr to fix

                          Method updateRecord has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              protected function updateRecord()
                              {
                                  $sql = 'UPDATE '.$this->fq_name;
                                  $sets = '';
                                  $where = '1=1';
                          Severity: Minor
                          Found in src/BasicModel.php - About 1 hr to fix

                            Method normalizeRename has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                {
                                    $current = $this->connection->detailedDefinition($this->name);
                                    $recase_columns = array();
                                    foreach ($this->columns as $col_name => $definition) {
                            Severity: Minor
                            Found in src/BasicModel.php - About 1 hr to fix

                              Method arrayToSQL has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function arrayToSQL($definition, $dbms)
                                  {
                                      $sql = '';
                                      $type = $definition['type'];
                                      if (isset($this->meta_types[strtoupper($type)])) {
                              Severity: Minor
                              Found in src/BasicModel.php - About 1 hr to fix

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

                                    public function toOptions($selected=0, $id_as_label=false)
                                    {
                                        if (count($this->unique) != 1) {
                                            return '';
                                        }
                                Severity: Minor
                                Found in src/BasicModel.php - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                          if (($argc < 3 || $argc > 4) || ($argc == 3 && $argv[1] != "--new" && $argv[1] != '--new-view') || ($argc == 4 && $argv[1] != '--update')) {
                                              echo "Create new Model: php BasicModel.php --new <Model Name>\n";
                                              echo "Create new View Model: php BasicModel.php --new-view <Model Name>\n";
                                              echo "Update Table Structure: php BasicModel.php --update <Database name> <Subclass Filename>\n";
                                              echo "Generate markdown documentation: php BasicModel.php --doc <Model Filename(s)>\n";
                                  Severity: Major
                                  Found in src/BasicModel.php - About 1 hr to fix

                                    Function columnsDoc has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function columnsDoc()
                                        {
                                            $ret = str_pad('Name', 25, ' ') . '|' . str_pad('Type', 15, ' ') . '|Info' . "\n";
                                            $ret .= str_repeat('-', 25) . '|' . str_repeat('-', 15) . '|' . str_repeat('-', 10) . "\n";
                                            foreach ($this->columns as $name => $info) {
                                    Severity: Minor
                                    Found in src/BasicModel.php - About 55 mins to fix

                                    Cognitive Complexity

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

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

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

                                    Further reading

                                    Function toOptions has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function toOptions($selected=0, $id_as_label=false)
                                        {
                                            if (count($this->unique) != 1) {
                                                return '';
                                            }
                                    Severity: Minor
                                    Found in src/BasicModel.php - About 55 mins to fix

                                    Cognitive Complexity

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

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

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

                                    Further reading

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

                                        private function normalizeReplacePK($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                        {
                                            $current = $this->connection->detailedDefinition($this->name);
                                            echo ($mode==BasicModel::NORMALIZE_MODE_CHECK)?"Need to set primary key":"Setting primary key";
                                            $sql = 'ALTER TABLE ' . $this->connection->identifierEscape($this->name);
                                    Severity: Minor
                                    Found in src/BasicModel.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 $carry;
                                    Severity: Major
                                    Found in src/BasicModel.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                  return $alters;
                                      Severity: Major
                                      Found in src/BasicModel.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                    return -1*count($unknown);
                                        Severity: Major
                                        Found in src/BasicModel.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                          return 1;
                                          Severity: Major
                                          Found in src/BasicModel.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                                return false;
                                            Severity: Major
                                            Found in src/BasicModel.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                      return 0;
                                              Severity: Major
                                              Found in src/BasicModel.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                return $carry . $item . "\n";
                                                Severity: Major
                                                Found in src/BasicModel.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                  return $carry . '* [' . $item . '](#' . strtolower($item) . ')' . "\n";
                                                  Severity: Major
                                                  Found in src/BasicModel.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                        return true;
                                                    Severity: Major
                                                    Found in src/BasicModel.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                              return 0;
                                                      Severity: Major
                                                      Found in src/BasicModel.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                    return 1;
                                                        Severity: Major
                                                        Found in src/BasicModel.php - About 30 mins to fix

                                                          The class BasicModel has 1488 lines of code. Current threshold is 1000. Avoid really long classes.
                                                          Open

                                                          class BasicModel 
                                                          {
                                                              /**
                                                                Name of the table
                                                              */
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          The method normalize() has an NPath complexity of 46020096. The configured NPath complexity threshold is 200.
                                                          Open

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          NPathComplexity

                                                          Since: 0.1

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

                                                          Example

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

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

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          The method create() has an NPath complexity of 10080. The configured NPath complexity threshold is 200.
                                                          Open

                                                              public function create()
                                                              {
                                                                  if ($this->connection->tableExists($this->fq_name)) {
                                                                      return true;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          NPathComplexity

                                                          Since: 0.1

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

                                                          Example

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

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

                                                          The method find() has an NPath complexity of 4800. The configured NPath complexity threshold is 200.
                                                          Open

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          NPathComplexity

                                                          Since: 0.1

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

                                                          Example

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

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

                                                          The method save() has an NPath complexity of 540. The configured NPath complexity threshold is 200.
                                                          Open

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          NPathComplexity

                                                          Since: 0.1

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

                                                          Example

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

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

                                                          The method normalizeColumnAttributes() has an NPath complexity of 220. The configured NPath complexity threshold is 200.
                                                          Open

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          NPathComplexity

                                                          Since: 0.1

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

                                                          Example

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

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

                                                          The method cli() has an NPath complexity of 41472. The configured NPath complexity threshold is 200.
                                                          Open

                                                              public function cli($argc, $argv)
                                                              {
                                                                  if ($argc > 2 && $argv[1] == '--doc') {
                                                                      array_shift($argv);
                                                                      array_shift($argv);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          NPathComplexity

                                                          Since: 0.1

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

                                                          Example

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

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

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

                                                              public function __call($name, $arguments)
                                                              {
                                                                  if (!isset($this->columns[$name])) {
                                                                      foreach ($this->columns as $col => $info) {
                                                                          if (isset($info['replaces']) && $info['replaces'] == $name) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              protected function arrayToSQL($definition, $dbms)
                                                              {
                                                                  $sql = '';
                                                                  $type = $definition['type'];
                                                                  if (isset($this->meta_types[strtoupper($type)])) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              protected function insertRecord()
                                                              {
                                                                  $sql = 'INSERT INTO '.$this->fq_name;
                                                                  $cols = '(';
                                                                  $vals = '(';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              public function load()
                                                              {
                                                                  if (empty($this->unique)) {
                                                                      return false;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              public function create()
                                                              {
                                                                  if ($this->connection->tableExists($this->fq_name)) {
                                                                      return true;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              public function cli($argc, $argv)
                                                              {
                                                                  if ($argc > 2 && $argv[1] == '--doc') {
                                                                      array_shift($argv);
                                                                      array_shift($argv);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CyclomaticComplexity

                                                          Since: 0.1

                                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                                          Example

                                                          // Cyclomatic Complexity = 11
                                                          class Foo {
                                                          1   public function example() {
                                                          2       if ($a == $b) {
                                                          3           if ($a1 == $b1) {
                                                                          fiddle();
                                                          4           } elseif ($a2 == $b2) {
                                                                          fiddle();
                                                                      } else {
                                                                          fiddle();
                                                                      }
                                                          5       } elseif ($c == $d) {
                                                          6           while ($c == $d) {
                                                                          fiddle();
                                                                      }
                                                          7        } elseif ($e == $f) {
                                                          8           for ($n = 0; $n < $h; $n++) {
                                                                          fiddle();
                                                                      }
                                                                  } else {
                                                                      switch ($z) {
                                                          9               case 1:
                                                                              fiddle();
                                                                              break;
                                                          10              case 2:
                                                                              fiddle();
                                                                              break;
                                                          11              case 3:
                                                                              fiddle();
                                                                              break;
                                                                          default:
                                                                              fiddle();
                                                                              break;
                                                                      }
                                                                  }
                                                              }
                                                          }

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

                                                          Avoid using undefined variables such as '$index' which will lead to PHP notices.
                                                          Open

                                                                                  $sql .= ', ADD ' . $index . ' (' . $this->connection->identifierEscape($this->columns[$col_name]) . ')'; 
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UndefinedVariable

                                                          Since: 2.8.0

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

                                                          Example

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

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

                                                          Missing class import via use statement (line '215', column '29').
                                                          Open

                                                                          $refl = new \ReflectionClass($this);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          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 filterColumn has a boolean flag argument $literal, which is a certain sign of a Single Responsibility Principle violation.
                                                          Open

                                                              protected function filterColumn($col, $val, $op, $literal=false)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          BooleanArgumentFlag

                                                          Since: 1.4.0

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

                                                          Example

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

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

                                                          Missing class import via use statement (line '216', column '27').
                                                          Open

                                                                          throw new \Exception('Invalid accessor: ' . $name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          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 '450', column '28').
                                                          Open

                                                                      $reflect = new \ReflectionClass($this);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          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 find has a boolean flag argument $reverse, which is a certain sign of a Single Responsibility Principle violation.
                                                          Open

                                                              public function find($sort='', $reverse=false)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          BooleanArgumentFlag

                                                          Since: 1.4.0

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

                                                          Example

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

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

                                                          Missing class import via use statement (line '1230', column '20').
                                                          Open

                                                                  $ret = new \stdClass();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          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 toOptions has a boolean flag argument $id_as_label, which is a certain sign of a Single Responsibility Principle violation.
                                                          Open

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          BooleanArgumentFlag

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                              public function newModel($name, $as_view=false)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          BooleanArgumentFlag

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                  } else {
                                                                      return false;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                  } else {
                                                                      return null;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                  } else {
                                                                      $literal = isset($arguments[2]) && $arguments[2] === true ? true : false;
                                                                      $this->filterColumn($name, $arguments[0], $arguments[1], $literal);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                  } else {
                                                                      return $this->updateRecord();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                  } else {
                                                                      return false;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                          } else {
                                                                              return false;
                                                                          }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                      } else {
                                                                          $sql .= ' DEFAULT '.$definition['default'];
                                                                      }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                  } else {
                                                                      return false;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                      } else {
                                                                          $sql .= ' ?';
                                                                          $args[] = $filter['right'];
                                                                      }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                  } else {
                                                                      return false;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                      } else {
                                                                          if (isset($this->columns[$column]['increment']) && $this->columns[$column]['increment']) {
                                                                              continue;
                                                                          } else if (!isset($table_def[$column])) {
                                                                              // underlying table is missing this column
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                      } else {
                                                                          $sql .= ' NOT NULL AUTO_INCREMENT';
                                                                      }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                  } else {
                                                                      // use first non-ID column for the label
                                                                      $label_col = array_keys($this->columns);
                                                                      foreach ($label_col as $col) {
                                                                          if ($col != $id_col) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ElseExpression

                                                          Since: 1.4.0

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

                                                          Example

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

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

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

                                                                          $refl = new \ReflectionClass($this);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                  foreach ($this->columns as $name => $def) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                  foreach($current as $col_name => $type) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                      foreach($this->columns as $name => $info) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                  foreach ($this->columns as $col_name => $defintion) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                                  $modified = $this->connection->query($sql);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                  foreach ($this->columns as $name => $info) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                  foreach($current as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                                  $sql .= ', ADD ' . $index . ' (' . $this->connection->identifierEscape($this->columns[$col_name]) . ')'; 
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

                                                          Avoid unused parameters such as '$db_name'.
                                                          Open

                                                              private function normalizeReplacePK($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedFormalParameter

                                                          Since: 0.2

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

                                                          Example

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

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

                                                          Avoid unused parameters such as '$db_name'.
                                                          Open

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedFormalParameter

                                                          Since: 0.2

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

                                                          Example

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

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

                                                          Avoid unused parameters such as '$mode'.
                                                          Open

                                                              protected function afterNormalize($db_name, $mode)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedFormalParameter

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                      $newPK = $this->connection->query($sql);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

                                                          Avoid unused parameters such as '$db_name'.
                                                          Open

                                                              public function setConnectionByName($db_name)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedFormalParameter

                                                          Since: 0.2

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

                                                          Example

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

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

                                                          Avoid unused parameters such as '$db_name'.
                                                          Open

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedFormalParameter

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                  foreach ($this->columns as $col_name => $defintion) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                  $lowercase_this = array_map(function ($item) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

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

                                                                              $renamed = $this->connection->query($sql);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedLocalVariable

                                                          Since: 0.2

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

                                                          Example

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

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

                                                          Avoid unused parameters such as '$db_name'.
                                                          Open

                                                              protected function afterNormalize($db_name, $mode)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          UnusedFormalParameter

                                                          Since: 0.2

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

                                                          Example

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

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

                                                          Avoid using COREPOS\common\count() function in for loops.
                                                          Open

                                                                  for ($i=0;$i<count($our_columns);$i++) {
                                                                      if (!in_array($our_columns[$i],$new_columns)) {
                                                                          continue; // column already exists
                                                                      }
                                                                      printf("%s column: %s\n", 
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CountInLoopExpression

                                                          Since: 2.7.0

                                                          Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.

                                                          Example

                                                          class Foo {
                                                          
                                                            public function bar()
                                                            {
                                                              $array = array();
                                                          
                                                              for ($i = 0; count($array); $i++) {
                                                                // ...
                                                              }
                                                            }
                                                          }

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

                                                          Avoid using short method names like BasicModel::db(). The configured minimum method name length is 3.
                                                          Open

                                                              public function db()
                                                              { 
                                                                  return $this->connection;
                                                              }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          ShortMethodName

                                                          Since: 0.2

                                                          Detects when very short method names are used.

                                                          Example

                                                          class ShortMethod {
                                                              public function a( $index ) { // Violation
                                                              }
                                                          }

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

                                                          The property $preferred_db is not named in camelCase.
                                                          Open

                                                          class BasicModel 
                                                          {
                                                              /**
                                                                Name of the table
                                                              */
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCasePropertyName

                                                          Since: 0.2

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

                                                          Example

                                                          class ClassName {
                                                              protected $property_name;
                                                          }

                                                          Source

                                                          The property $fq_name is not named in camelCase.
                                                          Open

                                                          class BasicModel 
                                                          {
                                                              /**
                                                                Name of the table
                                                              */
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCasePropertyName

                                                          Since: 0.2

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

                                                          Example

                                                          class ClassName {
                                                              protected $property_name;
                                                          }

                                                          Source

                                                          The property $new_model_namespace is not named in camelCase.
                                                          Open

                                                          class BasicModel 
                                                          {
                                                              /**
                                                                Name of the table
                                                              */
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCasePropertyName

                                                          Since: 0.2

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

                                                          Example

                                                          class ClassName {
                                                              protected $property_name;
                                                          }

                                                          Source

                                                          The property $meta_types is not named in camelCase.
                                                          Open

                                                          class BasicModel 
                                                          {
                                                              /**
                                                                Name of the table
                                                              */
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCasePropertyName

                                                          Since: 0.2

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

                                                          Example

                                                          class ClassName {
                                                              protected $property_name;
                                                          }

                                                          Source

                                                          The property $find_limit is not named in camelCase.
                                                          Open

                                                          class BasicModel 
                                                          {
                                                              /**
                                                                Name of the table
                                                              */
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCasePropertyName

                                                          Since: 0.2

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

                                                          Example

                                                          class ClassName {
                                                              protected $property_name;
                                                          }

                                                          Source

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

                                                              public function setConnection($c)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          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 $c. Configured minimum length is 3.
                                                          Open

                                                              public function setConfig($c)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                          class BasicModel 
                                                          {
                                                              /**
                                                                Name of the table
                                                              */
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCasePropertyName

                                                          Since: 0.2

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

                                                          Example

                                                          class ClassName {
                                                              protected $property_name;
                                                          }

                                                          Source

                                                          The property $cached_definition is not named in camelCase.
                                                          Open

                                                          class BasicModel 
                                                          {
                                                              /**
                                                                Name of the table
                                                              */
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCasePropertyName

                                                          Since: 0.2

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

                                                          Example

                                                          class ClassName {
                                                              protected $property_name;
                                                          }

                                                          Source

                                                          The parameter $db_name is not named in camelCase.
                                                          Open

                                                              public function whichDB($db_name)
                                                              {
                                                                  if ($this->connection->tableExists($db_name . $this->connection->sep() . $this->name)) {
                                                                      $this->fq_name = $db_name . $this->connection->sep() . $this->name;
                                                                      return true;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

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

                                                                  $lowercase_this = array_map(function($i){ return strtolower($i); }, array_keys($this->columns));
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

                                                          The parameter $db_name is not named in camelCase.
                                                          Open

                                                              public function createIfNeeded($db_name)
                                                              {
                                                                  $this->fq_name = $db_name . $this->connection->sep() . $this->name;
                                                                  $ret = array('db'=>$db_name,'struct'=>$this->name,'error'=>0,'error_msg'=>'');
                                                                  $exists = $this->connection->tableExists($this->fq_name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

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

                                                              public function setFindLimit($fl)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeCreateTable($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode == BasicModel::NORMALIZE_MODE_CHECK) {
                                                                      echo "Table {$this->name} not found!\n";
                                                                      echo "==========================================\n";
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

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

                                                              protected function filterColumn($col, $val, $op, $literal=false)
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

                                                          The parameter $db_name is not named in camelCase.
                                                          Open

                                                              protected function afterNormalize($db_name, $mode)
                                                              {
                                                              }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

                                                          The parameter $db_name is not named in camelCase.
                                                          Open

                                                              public function setConnectionByName($db_name)
                                                              {
                                                              }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

                                                          The parameter $db_name is not named in camelCase.
                                                          Open

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

                                                          The parameter $as_view is not named in camelCase.
                                                          Open

                                                              public function newModel($name, $as_view=false)
                                                              {
                                                                  $fptr = fopen($name.'.php','w');
                                                                  fwrite($fptr, chr(60)."?php\n");
                                                                  fwrite($fptr, str_replace('{{YEAR}}', date('Y'), $this->licenses['gpl']) . "\n");
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

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

                                                                  $match = array_filter($defined, function($i) use ($end) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

                                                          The parameter $id_as_label is not named in camelCase.
                                                          Open

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

                                                          The parameter $db_name is not named in camelCase.
                                                          Open

                                                              private function normalizeReplacePK($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  echo ($mode==BasicModel::NORMALIZE_MODE_CHECK)?"Need to set primary key":"Setting primary key";
                                                                  $sql = 'ALTER TABLE ' . $this->connection->identifierEscape($this->name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          CamelCaseParameterName

                                                          Since: 0.2

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

                                                          Example

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

                                                          Source

                                                          The variable $db_name is not named in camelCase.
                                                          Open

                                                              public function whichDB($db_name)
                                                              {
                                                                  if ($this->connection->tableExists($db_name . $this->connection->sep() . $this->name)) {
                                                                      $this->fq_name = $db_name . $this->connection->sep() . $this->name;
                                                                      return true;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function whichDB($db_name)
                                                              {
                                                                  if ($this->connection->tableExists($db_name . $this->connection->sep() . $this->name)) {
                                                                      $this->fq_name = $db_name . $this->connection->sep() . $this->name;
                                                                      return true;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function filterColumn($col, $val, $op, $literal=false)
                                                              {
                                                                  $valid_op = $this->validateOp($op);
                                                                  if ($valid_op === false) {
                                                                      throw new Exception('Invalid operator: ' . $op);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function insertRecord()
                                                              {
                                                                  $sql = 'INSERT INTO '.$this->fq_name;
                                                                  $cols = '(';
                                                                  $vals = '(';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function load()
                                                              {
                                                                  if (empty($this->unique)) {
                                                                      return false;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function insertRecord()
                                                              {
                                                                  $sql = 'INSERT INTO '.$this->fq_name;
                                                                  $cols = '(';
                                                                  $vals = '(';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function insertRecord()
                                                              {
                                                                  $sql = 'INSERT INTO '.$this->fq_name;
                                                                  $cols = '(';
                                                                  $vals = '(';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function createIfNeeded($db_name)
                                                              {
                                                                  $this->fq_name = $db_name . $this->connection->sep() . $this->name;
                                                                  $ret = array('db'=>$db_name,'struct'=>$this->name,'error'=>0,'error_msg'=>'');
                                                                  $exists = $this->connection->tableExists($this->fq_name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function insertRecord()
                                                              {
                                                                  $sql = 'INSERT INTO '.$this->fq_name;
                                                                  $cols = '(';
                                                                  $vals = '(';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function createIfNeeded($db_name)
                                                              {
                                                                  $this->fq_name = $db_name . $this->connection->sep() . $this->name;
                                                                  $ret = array('db'=>$db_name,'struct'=>$this->name,'error'=>0,'error_msg'=>'');
                                                                  $exists = $this->connection->tableExists($this->fq_name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function filterColumn($col, $val, $op, $literal=false)
                                                              {
                                                                  $valid_op = $this->validateOp($op);
                                                                  if ($valid_op === false) {
                                                                      throw new Exception('Invalid operator: ' . $op);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function insertRecord()
                                                              {
                                                                  $sql = 'INSERT INTO '.$this->fq_name;
                                                                  $cols = '(';
                                                                  $vals = '(';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function filterColumn($col, $val, $op, $literal=false)
                                                              {
                                                                  $valid_op = $this->validateOp($op);
                                                                  if ($valid_op === false) {
                                                                      throw new Exception('Invalid operator: ' . $op);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function load()
                                                              {
                                                                  if (empty($this->unique)) {
                                                                      return false;
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeCreateTable($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode == BasicModel::NORMALIZE_MODE_CHECK) {
                                                                      echo "Table {$this->name} not found!\n";
                                                                      echo "==========================================\n";
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function find($sort='', $reverse=false)
                                                              {
                                                                  if (!is_array($sort)) {
                                                                      $sort = array($sort);
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function save()
                                                              {
                                                                  if (!is_array($this->hooks) || empty($this->hooks)) {
                                                                      $this->loadHooks();
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              protected function updateRecord()
                                                              {
                                                                  $sql = 'UPDATE '.$this->fq_name;
                                                                  $sets = '';
                                                                  $where = '1=1';
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function createIfNeeded($db_name)
                                                              {
                                                                  $this->fq_name = $db_name . $this->connection->sep() . $this->name;
                                                                  $ret = array('db'=>$db_name,'struct'=>$this->name,'error'=>0,'error_msg'=>'');
                                                                  $exists = $this->connection->tableExists($this->fq_name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function normalize($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  if ($mode != BasicModel::NORMALIZE_MODE_CHECK && $mode != BasicModel::NORMALIZE_MODE_APPLY) {
                                                                      echo "Error: Unknown mode ($mode)\n";
                                                                      return false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeReplacePK($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  echo ($mode==BasicModel::NORMALIZE_MODE_CHECK)?"Need to set primary key":"Setting primary key";
                                                                  $sql = 'ALTER TABLE ' . $this->connection->identifierEscape($this->name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function cli($argc, $argv)
                                                              {
                                                                  if ($argc > 2 && $argv[1] == '--doc') {
                                                                      array_shift($argv);
                                                                      array_shift($argv);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeReplacePK($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  echo ($mode==BasicModel::NORMALIZE_MODE_CHECK)?"Need to set primary key":"Setting primary key";
                                                                  $sql = 'ALTER TABLE ' . $this->connection->identifierEscape($this->name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function newModel($name, $as_view=false)
                                                              {
                                                                  $fptr = fopen($name.'.php','w');
                                                                  fwrite($fptr, chr(60)."?php\n");
                                                                  fwrite($fptr, str_replace('{{YEAR}}', date('Y'), $this->licenses['gpl']) . "\n");
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function cli($argc, $argv)
                                                              {
                                                                  if ($argc > 2 && $argv[1] == '--doc') {
                                                                      array_shift($argv);
                                                                      array_shift($argv);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function newModel($name, $as_view=false)
                                                              {
                                                                  $fptr = fopen($name.'.php','w');
                                                                  fwrite($fptr, chr(60)."?php\n");
                                                                  fwrite($fptr, str_replace('{{YEAR}}', date('Y'), $this->licenses['gpl']) . "\n");
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeReplacePK($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  echo ($mode==BasicModel::NORMALIZE_MODE_CHECK)?"Need to set primary key":"Setting primary key";
                                                                  $sql = 'ALTER TABLE ' . $this->connection->identifierEscape($this->name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeChangeCase($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $lowercase_current = array();
                                                                  $casemap = array();
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeReplacePK($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  echo ($mode==BasicModel::NORMALIZE_MODE_CHECK)?"Need to set primary key":"Setting primary key";
                                                                  $sql = 'ALTER TABLE ' . $this->connection->identifierEscape($this->name);
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              public function toOptions($selected=0, $id_as_label=false)
                                                              {
                                                                  if (count($this->unique) != 1) {
                                                                      return '';
                                                                  }
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeColumnAttributes($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  $redo_pk = false;
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

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

                                                              private function normalizeRename($db_name, $mode=BasicModel::NORMALIZE_MODE_CHECK)
                                                              {
                                                                  $current = $this->connection->detailedDefinition($this->name);
                                                                  $recase_columns = array();
                                                                  foreach ($this->columns as $col_name => $definition) {
                                                          Severity: Minor
                                                          Found in src/BasicModel.php by phpmd

                                                          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

                                                          There are no issues that match your filters.

                                                          Category
                                                          Status