attogram/attogram-database

View on GitHub
includes/SqliteDatabase.php

Summary

Maintainability
D
2 days
Test Coverage

getSetLimitAndOffset accesses the super-global variable $_GET.
Open

    public function getSetLimitAndOffset(
        $defaultLimit = 1000,
        $defaultOffset = 0,
        $maxLimit = 5000,
        $minLimit = 100
Severity: Minor
Found in includes/SqliteDatabase.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

getSetLimitAndOffset accesses the super-global variable $_GET.
Open

    public function getSetLimitAndOffset(
        $defaultLimit = 1000,
        $defaultOffset = 0,
        $maxLimit = 5000,
        $minLimit = 100
Severity: Minor
Found in includes/SqliteDatabase.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

getSetLimitAndOffset accesses the super-global variable $_GET.
Open

    public function getSetLimitAndOffset(
        $defaultLimit = 1000,
        $defaultOffset = 0,
        $maxLimit = 5000,
        $minLimit = 100
Severity: Minor
Found in includes/SqliteDatabase.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

getSetLimitAndOffset accesses the super-global variable $_GET.
Open

    public function getSetLimitAndOffset(
        $defaultLimit = 1000,
        $defaultOffset = 0,
        $maxLimit = 5000,
        $minLimit = 100
Severity: Minor
Found in includes/SqliteDatabase.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

getSetLimitAndOffset accesses the super-global variable $_GET.
Open

    public function getSetLimitAndOffset(
        $defaultLimit = 1000,
        $defaultOffset = 0,
        $maxLimit = 5000,
        $minLimit = 100
Severity: Minor
Found in includes/SqliteDatabase.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

getSetLimitAndOffset accesses the super-global variable $_GET.
Open

    public function getSetLimitAndOffset(
        $defaultLimit = 1000,
        $defaultOffset = 0,
        $maxLimit = 5000,
        $minLimit = 100
Severity: Minor
Found in includes/SqliteDatabase.php by phpmd

Superglobals

Since: 0.2

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

Example

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

Source

File SqliteDatabase.php has 323 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php  // Attogram Framework - Database Module - SqliteDatabase class v0.3.20

namespace Attogram;

/**
Severity: Minor
Found in includes/SqliteDatabase.php - About 3 hrs to fix

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

    class SqliteDatabase implements AttogramDatabaseInterface
    {
    
        public $databaseName;      // (string) path/filename of the SQLite database file
        public $modulesDirectory;  // (string) The Attogram Modules directory
    Severity: Minor
    Found in includes/SqliteDatabase.php by phpmd

    Method tabler has 69 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function tabler(
            $table,
            $tableId,
            $nameSingular,
            $namePlural, // TODO - remove unused
    Severity: Major
    Found in includes/SqliteDatabase.php - About 2 hrs to fix

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

          public function tabler(
              $table,
              $tableId,
              $nameSingular,
              $namePlural, // TODO - remove unused
      Severity: Minor
      Found in includes/SqliteDatabase.php - About 1 hr to fix

      Cognitive Complexity

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

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

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

      Further reading

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

          public function pager($count, $limit, $offset, $preQS = '')
          {
              if ($limit > $count) {
                  $limit = $count;
              }
      Severity: Minor
      Found in includes/SqliteDatabase.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 pager has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function pager($count, $limit, $offset, $preQS = '')
          {
              if ($limit > $count) {
                  $limit = $count;
              }
      Severity: Minor
      Found in includes/SqliteDatabase.php - About 1 hr to fix

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

            public function loadTableDefinitions()
            {
                if (isset($this->tables) && is_array($this->tables)) {
                    return true;
                }
        Severity: Minor
        Found in includes/SqliteDatabase.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 tabler has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $table,
                $tableId,
                $nameSingular,
                $namePlural, // TODO - remove unused
                $publicLink,
        Severity: Major
        Found in includes/SqliteDatabase.php - About 1 hr to fix

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

              public function query($sql, array $bind = array())
              {
                  $this->log->debug('QUERY: backtrace='.(($btr = debug_backtrace())
                      ? $btr[1]['function'] : '?' ).' sql='.$sql);
                  if ($bind) {
          Severity: Minor
          Found in includes/SqliteDatabase.php - About 1 hr to fix

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

                public function queryPrepare($sql)
                {
                    $statement = $this->database->prepare($sql);
                    if ($statement) {
                        return $statement;
            Severity: Minor
            Found in includes/SqliteDatabase.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

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

                public function query($sql, array $bind = array())
                {
                    $this->log->debug('QUERY: backtrace='.(($btr = debug_backtrace())
                        ? $btr[1]['function'] : '?' ).' sql='.$sql);
                    if ($bind) {
            Severity: Minor
            Found in includes/SqliteDatabase.php - About 35 mins to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                public function initDB()
                {
                    if (is_object($this->database) && get_class($this->database) == 'PDO') {
                        return true; // if PDO database object already set
                    }
            Severity: Minor
            Found in includes/SqliteDatabase.php - About 35 mins to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                public function getSetLimitAndOffset(
                    $defaultLimit = 1000,
                    $defaultOffset = 0,
                    $maxLimit = 5000,
                    $minLimit = 100
            Severity: Minor
            Found in includes/SqliteDatabase.php - About 25 mins to fix

            Cognitive Complexity

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

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

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

            Further reading

            The method pager() has an NPath complexity of 448. The configured NPath complexity threshold is 200.
            Open

                public function pager($count, $limit, $offset, $preQS = '')
                {
                    if ($limit > $count) {
                        $limit = $count;
                    }
            Severity: Minor
            Found in includes/SqliteDatabase.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 tabler has 10 parameters. Consider reducing the number of parameters to less than 10.
            Open

                public function tabler(
                    $table,
                    $tableId,
                    $nameSingular,
                    $namePlural, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            The method tabler() has an NPath complexity of 1920. The configured NPath complexity threshold is 200.
            Open

                public function tabler(
                    $table,
                    $tableId,
                    $nameSingular,
                    $namePlural, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.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 tabler() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
            Open

                public function tabler(
                    $table,
                    $tableId,
                    $nameSingular,
                    $namePlural, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.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 pager() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
            Open

                public function pager($count, $limit, $offset, $preQS = '')
                {
                    if ($limit > $count) {
                        $limit = $count;
                    }
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            CyclomaticComplexity

            Since: 0.1

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

            Example

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

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

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

                public function query($sql, array $bind = array())
                {
                    $this->log->debug('QUERY: backtrace='.(($btr = debug_backtrace())
                        ? $btr[1]['function'] : '?' ).' sql='.$sql);
                    if ($bind) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            ErrorControlOperator

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

            Example

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

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

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

                public function query($sql, array $bind = array())
                {
                    $this->log->debug('QUERY: backtrace='.(($btr = debug_backtrace())
                        ? $btr[1]['function'] : '?' ).' sql='.$sql);
                    if ($bind) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            ErrorControlOperator

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

            Example

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

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

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

                public function queryb($sql, array $bind = array())
                {
                    $this->log->debug('QUERYB: backtrace='.(($btr = debug_backtrace())
                        ? $btr[1]['function'] : '?').' sql='.$sql);
                    if ($bind) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            ErrorControlOperator

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

            Example

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

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

            Missing class import via use statement (line '52', column '35').
            Open

                        $this->database = new \PDO('sqlite:'. $this->databaseName);
            Severity: Minor
            Found in includes/SqliteDatabase.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

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

                public function queryb($sql, array $bind = array())
                {
                    $this->log->debug('QUERYB: backtrace='.(($btr = debug_backtrace())
                        ? $btr[1]['function'] : '?').' sql='.$sql);
                    if ($bind) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            ErrorControlOperator

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

            Example

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

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

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

                public function queryPrepare($sql)
                {
                    $statement = $this->database->prepare($sql);
                    if ($statement) {
                        return $statement;
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            ErrorControlOperator

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

            Example

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

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

            Avoid using static access to class '\PDO' in method 'initDB'.
            Open

                    if (!in_array('sqlite', \PDO::getAvailableDrivers())) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            StaticAccess

            Since: 1.4.0

            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

            Example

            class Foo
            {
                public function bar()
                {
                    Bar::baz();
                }
            }

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

            Avoid using static access to class 'Attogram\Attogram' in method 'loadTableDefinitions'.
            Open

                        foreach (array_diff(scandir($d), Attogram::getSkipFiles()) as $f) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            StaticAccess

            Since: 1.4.0

            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

            Example

            class Foo
            {
                public function bar()
                {
                    Bar::baz();
                }
            }

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

            Avoid using static access to class 'Attogram\Attogram' in method 'loadTableDefinitions'.
            Open

                    $dirs = Attogram::getAllSubdirectories($this->modulesDirectory, 'tables');
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpmd

            StaticAccess

            Since: 1.4.0

            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

            Example

            class Foo
            {
                public function bar()
                {
                    Bar::baz();
                }
            }

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

            Avoid unused parameters such as '$namePlural'.
            Open

                    $namePlural, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.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 '$adminLink'.
            Open

                    $adminLink, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.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

            Class implements undeclared interface \Attogram\AttogramDatabaseInterface
            Open

            class SqliteDatabase implements AttogramDatabaseInterface
            Severity: Critical
            Found in includes/SqliteDatabase.php by phan

            Reference to undeclared property \Attogram\SqliteDatabase->tables (Did you mean $table)
            Open

                    if (!$this->queryb($this->tables[$table])) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phan

            Saw an @param annotation for countSql, but it was not found in the param list of function tabler(string $table, string $tableId, string $nameSingular, string $namePlural, string $publicLink, array $col, string $sql, string $adminLink, bool $showEdit, int $perPage) : string
            Open

                 * @param  string $countSql     SQL query to get total number of items in table
            Severity: Info
            Found in includes/SqliteDatabase.php by phan

            Reference to undeclared property \Attogram\SqliteDatabase->tables
            Open

                    $this->tables = array();
            Severity: Minor
            Found in includes/SqliteDatabase.php by phan

            Method \Attogram\SqliteDatabase::tabler is declared to return string but has no return value
            Open

                public function tabler(
            Severity: Minor
            Found in includes/SqliteDatabase.php by phan

            TODO found
            Open

                    $namePlural, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.php by fixme

            TODO found
            Open

                        // TODO dev: Warning: PDOStatement::bindParam(): SQLSTATE[HY093]: Invalid parameter number: Columns/Parameters are 1-based
            Severity: Minor
            Found in includes/SqliteDatabase.php by fixme

            TODO found
            Open

                    $adminLink, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.php by fixme

            Call to method getSkipFiles from undeclared class \Attogram\Attogram
            Open

                        foreach (array_diff(scandir($d), Attogram::getSkipFiles()) as $f) {
            Severity: Critical
            Found in includes/SqliteDatabase.php by phan

            Reference to undeclared property \Attogram\SqliteDatabase->tables
            Open

                            $this->tables[$tableName] = file_get_contents($file);
            Severity: Minor
            Found in includes/SqliteDatabase.php by phan

            TODO found
            Open

                            print '<td>'.htmlentities($row[$column['key']]).'</td>'; // TODO better filter, attogram webDisplay?
            Severity: Minor
            Found in includes/SqliteDatabase.php by fixme

            Expected @param annotation for publicLink to be before the @param annotation for col
            Open

                 * @param  array  $col           Column Display Info - array of array('class'=>'...', 'title'=>'...', 'key'=>'...')
            Severity: Info
            Found in includes/SqliteDatabase.php by phan

            Reference to undeclared property \Attogram\SqliteDatabase->tables
            Open

                    if (isset($this->tables) && is_array($this->tables)) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phan

            Reference to undeclared property \Attogram\SqliteDatabase->tables (Did you mean $table)
            Open

                    if (!isset($this->tables[$table])) {
            Severity: Minor
            Found in includes/SqliteDatabase.php by phan

            Call to method getAllSubdirectories from undeclared class \Attogram\Attogram
            Open

                    $dirs = Attogram::getAllSubdirectories($this->modulesDirectory, 'tables');
            Severity: Critical
            Found in includes/SqliteDatabase.php by phan

            Multi-line function declarations must define one parameter per line
            Open

                    $adminLink, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpcodesniffer

            The closing brace for the class must go on the next line after the body
            Open

            } // END of class SqliteDatabase
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpcodesniffer

            Multi-line function declarations must define one parameter per line
            Open

                    $namePlural, // TODO - remove unused
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpcodesniffer

            Line exceeds 120 characters; contains 134 characters
            Open

                        // TODO dev: Warning: PDOStatement::bindParam(): SQLSTATE[HY093]: Invalid parameter number: Columns/Parameters are 1-based
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpcodesniffer

            Line exceeds 120 characters; contains 125 characters
            Open

                 * @param  string $preQS  (optional) URL Query String to prepend to pagination links, pairs of  name=value&name=value&...
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpcodesniffer

            Line exceeds 120 characters; contains 143 characters
            Open

                    $result = '<p class="small">Showing # '."<strong>$startCount</strong> - <strong>$endCount</strong> of <code>$count</code> results</p>";
            Severity: Minor
            Found in includes/SqliteDatabase.php by phpcodesniffer

            There are no issues that match your filters.

            Category
            Status