e107inc/e107

View on GitHub
e107_handlers/db_table_admin_class.php

Summary

Maintainability
A
3 hrs
Test Coverage
F
29%

Avoid deeply nested control flow statements.
Open

                                    if(E107_DBG_SQLDETAILS)
                                    {
                                        $mes = e107::getMessage();
                                        $mes->add("db_table_admin_class.php :: parse_field_defs() Line: 230 - Unknown definition {$i}: ".$fd[$i], E_MESSAGE_DEBUG);
                                    }
Severity: Major
Found in e107_handlers/db_table_admin_class.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                        if (isset($fd[$i + 1]))
                                        {
                                            $i++;
                                            $defs['default'] = $fd[$i];
                                        }
    Severity: Major
    Found in e107_handlers/db_table_admin_class.php - About 45 mins to fix

      Avoid too many return statements within this method.
      Open

                      return TRUE; // Success even if no changes required
      Severity: Major
      Found in e107_handlers/db_table_admin_class.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return "Cannot generate definition for: ".$list['type'].' '.$list['name'];
        Severity: Major
        Found in e107_handlers/db_table_admin_class.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                                  return $sql->dbError(__METHOD__);
          Severity: Major
          Found in e107_handlers/db_table_admin_class.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return array(
                            $error_list, $change_list
                        );
            Severity: Major
            Found in e107_handlers/db_table_admin_class.php - About 30 mins to fix

              Variable $defs was undeclared, but array fields are being added to it.
              Open

                                          $defs['type'] = 'pkey';

              Variable $defs was undeclared, but array fields are being added to it.
              Open

                                      $defs['type'] = 'field';

              Variable $defs was undeclared, but array fields are being added to it.
              Open

                                          $defs['type'] = 'ftkey';

              Argument 1 (var) is ?array|?array{autoinc:true}|?array{default:string}|?array{fieldtype:string}|?array{keyfield:string}|?array{name:string}|?array{nulltype:'NOT NULL'}|?array{type:'field'}|?array{type:'ftkey'}|?array{type:'key'}|?array{type:'pkey'}|?array{type:'ukey'}|?array{vartype:string} but \count() takes \Countable|array
              Open

                                  if (count($defs) > 1)
              Severity: Minor
              Found in e107_handlers/db_table_admin_class.php by phan

              Variable $defs was undeclared, but array fields are being added to it.
              Open

                                      $defs['type'] = 'key';

              Variable $defs was undeclared, but array fields are being added to it.
              Open

                                          $defs['type'] = 'ukey';

              There are no issues that match your filters.

              Category
              Status