attogram/attogram-database

View on GitHub

Showing 7,594 of 7,594 total issues

Method import_csv has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function import_csv($filename, $table, $field_terminate, $field_enclosed, $field_escaped, $null, $fields_in_first_row)
Severity: Major
Found in admin_actions/db-admin.php - About 50 mins to fix

    Method export_csv has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function export_csv($tables, $field_terminate, $field_enclosed, $field_escaped, $null, $crlf, $fields_in_first_row)
    Severity: Major
    Found in admin_actions/db-admin.php - About 50 mins to fix

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

                  $e = $this->database->errorInfo();
      Severity: Minor
      Found in admin_actions/db-admin.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 $system_password_encrypted is not named in camelCase.
      Open

      class Authorization
      {
          private $authorized;
          private $login_failed;
          private $system_password_encrypted;
      Severity: Minor
      Found in admin_actions/db-admin.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 $i. Configured minimum length is 3.
      Open

                  $i=0;
      Severity: Minor
      Found in admin_actions/db-admin.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 $s. Configured minimum length is 3.
      Open

      function deQuoteSQL($s)
      Severity: Minor
      Found in admin_actions/db-admin.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 $db. Configured minimum length is 3.
      Open

          protected $db; //reference to the DB object
      Severity: Minor
      Found in admin_actions/db-admin.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 $preg_quote is not named in camelCase.
      Open

          private function sqlite_surroundings_preg($name,$preg_quote=true,$notAllowedCharsIfNone="'\"",$notAllowedName=false)
          {
              if($name=="*" || $name=="+")
              {
                  if($notAllowedName!==false && $preg_quote)
      Severity: Minor
      Found in admin_actions/db-admin.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

          $i = 0;
      Severity: Minor
      Found in admin_actions/db-admin.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 $p. Configured minimum length is 3.
      Open

                  $p = strpos($content, "** this file contains an sqlite 2"); //this text is at the beginning of every SQLite2 database
      Severity: Minor
      Found in admin_actions/db-admin.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 $i. Configured minimum length is 3.
      Open

                  $i = 0;
      Severity: Minor
      Found in admin_actions/db-admin.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 $login_failed is not named in camelCase.
      Open

      class Authorization
      {
          private $authorized;
          private $login_failed;
          private $system_password_encrypted;
      Severity: Minor
      Found in admin_actions/db-admin.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 $field_enclosed is not named in camelCase.
      Open

          public function import_csv($filename, $table, $field_terminate, $field_enclosed, $field_escaped, $null, $fields_in_first_row)
          {
              // CSV import implemented by Christopher Kramer - http://www.christosoft.de
              $csv_handle = fopen($filename,'r');
              $csv_insert = "BEGIN;\n";
      Severity: Minor
      Found in admin_actions/db-admin.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 $field_terminate is not named in camelCase.
      Open

          public function import_csv($filename, $table, $field_terminate, $field_enclosed, $field_escaped, $null, $fields_in_first_row)
          {
              // CSV import implemented by Christopher Kramer - http://www.christosoft.de
              $csv_handle = fopen($filename,'r');
              $csv_insert = "BEGIN;\n";
      Severity: Minor
      Found in admin_actions/db-admin.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 $fields_in_first_row is not named in camelCase.
      Open

          public function import_csv($filename, $table, $field_terminate, $field_enclosed, $field_escaped, $null, $fields_in_first_row)
          {
              // CSV import implemented by Christopher Kramer - http://www.christosoft.de
              $csv_handle = fopen($filename,'r');
              $csv_insert = "BEGIN;\n";
      Severity: Minor
      Found in admin_actions/db-admin.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 $pk. Configured minimum length is 3.
      Open

          public function wherePK($table, $pk)
      Severity: Minor
      Found in admin_actions/db-admin.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 $field_escaped is not named in camelCase.
      Open

          public function import_csv($filename, $table, $field_terminate, $field_enclosed, $field_escaped, $null, $fields_in_first_row)
          {
              // CSV import implemented by Christopher Kramer - http://www.christosoft.de
              $csv_handle = fopen($filename,'r');
              $csv_insert = "BEGIN;\n";
      Severity: Minor
      Found in admin_actions/db-admin.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 $field_terminate is not named in camelCase.
      Open

          public function export_csv($tables, $field_terminate, $field_enclosed, $field_escaped, $null, $crlf, $fields_in_first_row)
          {
              $field_enclosed = $field_enclosed;
              $query = "SELECT * FROM sqlite_master WHERE type='table' or type='view' ORDER BY type DESC";
              $result = $this->selectArray($query);
      Severity: Minor
      Found in admin_actions/db-admin.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 property $_resources is not named in camelCase.
      Open

      class Resources {
      
          // set this to the file containing getInternalResource;
          // currently unused in split mode; set to __FILE__ for built PLA.
          public static $embedding_file = __FILE__;
      Severity: Minor
      Found in admin_actions/db-admin.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 $field_enclosed is not named in camelCase.
      Open

          public function export_csv($tables, $field_terminate, $field_enclosed, $field_escaped, $null, $crlf, $fields_in_first_row)
          {
              $field_enclosed = $field_enclosed;
              $query = "SELECT * FROM sqlite_master WHERE type='table' or type='view' ORDER BY type DESC";
              $result = $this->selectArray($query);
      Severity: Minor
      Found in admin_actions/db-admin.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

      Severity
      Category
      Status
      Source
      Language