Completed
Push — develop ( bd6ad5...7b688d )
by Zack
04:29
created

GravityView_Field_Payment_Status   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 1
lcom 0
cbo 1
dl 20
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * @file class-gravityview-field-payment-status.php
4
 * @package GravityView
5
 * @subpackage includes\fields
6
 * @since 1.16
7
 */
8
9 View Code Duplication
class GravityView_Field_Payment_Status extends GravityView_Field {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
11
	var $name = 'payment_status';
12
13
	var $is_searchable = true;
14
15
	var $search_operators = array( 'is', 'in', 'not in', 'isnot' );
16
17
	var $group = 'pricing';
18
19
	var $_custom_merge_tag = 'payment_status';
20
21
	/**
22
	 * GravityView_Field_Date_Created constructor.
23
	 */
24
	public function __construct() {
25
		$this->label = esc_attr__( 'Payment Status', 'gravityview' );
0 ignored issues
show
Bug introduced by
The property label cannot be accessed from this context as it is declared private in class GravityView_Field.

This check looks for access to properties that are not accessible from the current context.

If you need to make a property accessible to another context you can either raise its visibility level or provide an accessible getter in the defining class.

Loading history...
26
		parent::__construct();
27
	}
28
}
29
30
new GravityView_Field_Payment_Status;
31