Code Duplication    Length = 12-13 lines in 5 locations

includes/class-give-db-donor-meta.php 1 location

@@ 52-64 (lines=13) @@
49
	 * @access  public
50
	 * @since   1.6
51
	 */
52
	public function __construct() {
53
		/* @var WPDB $wpdb */
54
		global $wpdb;
55
56
		$wpdb->donormeta   = $this->table_name = $wpdb->prefix . 'give_donormeta';
57
		$this->primary_key = 'meta_id';
58
		$this->version     = '1.0';
59
60
		parent::__construct();
61
62
		$this->bc_200_params();
63
		$this->register_table();
64
	}
65
66
	/**
67
	 * Get table columns and data types.

includes/class-give-db-form-meta.php 1 location

@@ 49-60 (lines=12) @@
46
	 * @access  public
47
	 * @since   2.0
48
	 */
49
	public function __construct() {
50
		/* @var WPDB $wpdb */
51
		global $wpdb;
52
53
		$wpdb->formmeta    = $this->table_name = $wpdb->prefix . 'give_formmeta';
54
		$this->primary_key = 'meta_id';
55
		$this->version     = '1.0';
56
57
		$this->register_table();
58
59
		parent::__construct();
60
	}
61
62
	/**
63
	 * Get table columns and data types.

includes/class-give-db-logs-meta.php 1 location

@@ 49-60 (lines=12) @@
46
	 * @access  public
47
	 * @since   2.0
48
	 */
49
	public function __construct() {
50
		/* @var WPDB $wpdb */
51
		global $wpdb;
52
53
		$wpdb->logmeta     = $this->table_name = $wpdb->prefix . 'give_logmeta';
54
		$this->primary_key = 'meta_id';
55
		$this->version     = '1.0';
56
57
		$this->register_table();
58
59
		parent::__construct();
60
	}
61
62
	/**
63
	 * Get table columns and data types.

includes/class-give-db-logs.php 1 location

@@ 34-46 (lines=13) @@
31
	 * @since  2.0
32
	 * @access public
33
	 */
34
	public function __construct() {
35
		/* @var WPDB $wpdb */
36
		global $wpdb;
37
38
		$this->table_name  = $wpdb->prefix . 'give_logs';
39
		$this->primary_key = 'ID';
40
		$this->version     = '1.0';
41
42
		// Install table.
43
		$this->register_table();
44
45
		parent::__construct();
46
	}
47
48
	/**
49
	 * Get columns and formats

includes/class-give-db-sequential-ordering.php 1 location

@@ 34-46 (lines=13) @@
31
	 * @since  2.1.0
32
	 * @access public
33
	 */
34
	public function __construct() {
35
		/* @var WPDB $wpdb */
36
		global $wpdb;
37
38
		$this->table_name  = $wpdb->prefix . 'give_sequential_ordering';
39
		$this->primary_key = 'id';
40
		$this->version     = '1.0';
41
42
		// Install table.
43
		$this->register_table();
44
45
		parent::__construct();
46
	}
47
48
	/**
49
	 * Get columns and formats