wikimedia/mediawiki-core

View on GitHub
includes/libs/rdbms/database/DBConnRef.php

Summary

Maintainability
F
5 days
Test Coverage

DBConnRef has 153 functions (exceeds 20 allowed). Consider refactoring.
Open

class DBConnRef implements IMaintainableDatabase {
    /** @var ILoadBalancer */
    private $lb;
    /** @var Database|null Live connection handle */
    private $conn;
Severity: Major
Found in includes/libs/rdbms/database/DBConnRef.php - About 3 days to fix

    File DBConnRef.php has 617 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace Wikimedia\Rdbms;
    
    use InvalidArgumentException;
    Severity: Major
    Found in includes/libs/rdbms/database/DBConnRef.php - About 1 day to fix

      Method insertSelect has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $destTable, $srcTable, $varMap, $conds,
              $fname = __METHOD__, $insertOptions = [], $selectOptions = [], $selectJoinConds = []
      Severity: Major
      Found in includes/libs/rdbms/database/DBConnRef.php - About 1 hr to fix

        Method selectField has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
        Severity: Minor
        Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

          Method select has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  $table, $vars, $conds = '', $fname = __METHOD__,
                  $options = [], $join_conds = []
          Severity: Minor
          Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

            Method selectSQLText has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    $table, $vars, $conds = '', $fname = __METHOD__,
                    $options = [], $join_conds = []
            Severity: Minor
            Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

              Method selectRowCount has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
              Severity: Minor
              Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

                Method selectRow has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        $table, $vars, $conds, $fname = __METHOD__,
                        $options = [], $join_conds = []
                Severity: Minor
                Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

                  Method estimateRowCount has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
                  Severity: Minor
                  Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

                    Method buildSelectSubquery has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            $table, $vars, $conds = '', $fname = __METHOD__,
                            $options = [], $join_conds = []
                    Severity: Minor
                    Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

                      Method selectFieldValues has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                              $table, $var, $cond = '', $fname = __METHOD__, $options = [], $join_conds = []
                      Severity: Minor
                      Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

                        Method deleteJoin has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = __METHOD__
                        Severity: Minor
                        Found in includes/libs/rdbms/database/DBConnRef.php - About 45 mins to fix

                          Method update has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public function update( $table, $set, $conds, $fname = __METHOD__, $options = [] ) {
                          Severity: Minor
                          Found in includes/libs/rdbms/database/DBConnRef.php - About 35 mins to fix

                            Method upsert has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    $table, array $rows, $uniqueKeys, array $set, $fname = __METHOD__
                            Severity: Minor
                            Found in includes/libs/rdbms/database/DBConnRef.php - About 35 mins to fix

                              Method sourceFile has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      $filename,
                                      callable $lineCallback = null,
                                      callable $resultCallback = null,
                                      $fname = false,
                                      callable $inputCallback = null
                              Severity: Minor
                              Found in includes/libs/rdbms/database/DBConnRef.php - About 35 mins to fix

                                Method sourceStream has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        $fp,
                                        callable $lineCallback = null,
                                        callable $resultCallback = null,
                                        $fname = __METHOD__,
                                        callable $inputCallback = null
                                Severity: Minor
                                Found in includes/libs/rdbms/database/DBConnRef.php - About 35 mins to fix

                                  Method buildGroupConcatField has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                          $delim, $table, $field, $conds = '', $join_conds = []
                                  Severity: Minor
                                  Found in includes/libs/rdbms/database/DBConnRef.php - About 35 mins to fix

                                    Method lockForUpdate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                            $table, $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
                                    Severity: Minor
                                    Found in includes/libs/rdbms/database/DBConnRef.php - About 35 mins to fix

                                      There are no issues that match your filters.

                                      Category
                                      Status