Completed
Pull Request — master (#605)
by Zack
05:45
created
templates/fields/date_created.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 
9 9
 $gravityview_view = GravityView_View::getInstance();
10 10
 
11
-extract( $gravityview_view->getCurrentField() );
11
+extract($gravityview_view->getCurrentField());
12 12
 
13
-echo GVCommon::format_date( $value, 'format=' . rgar( $field_settings, 'date_display' ) );
14 13
\ No newline at end of file
14
+echo GVCommon::format_date($value, 'format='.rgar($field_settings, 'date_display'));
15 15
\ No newline at end of file
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-is-fulfilled.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 	var $is_numeric = false;
16 16
 
17
-	var $search_operators = array( 'is', 'isnot' );
17
+	var $search_operators = array('is', 'isnot');
18 18
 
19 19
 	var $group = 'pricing';
20 20
 
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
 	 * GravityView_Field_Is_Fulfilled constructor.
35 35
 	 */
36 36
 	public function __construct() {
37
-		$this->label = esc_html__( 'Is Fulfilled', 'gravityview' );
37
+		$this->label = esc_html__('Is Fulfilled', 'gravityview');
38 38
 
39
-		add_filter( 'gravityview_field_entry_value_' . $this->name . '_pre_link', array( $this, 'get_content' ), 10, 4 );
39
+		add_filter('gravityview_field_entry_value_'.$this->name.'_pre_link', array($this, 'get_content'), 10, 4);
40 40
 
41 41
 		parent::__construct();
42 42
 	}
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 	 *
56 56
 	 * @return String values for this field based on the numeric values used by Gravity Forms
57 57
 	 */
58
-	public function get_content( $output, $entry, $field_settings, $field ) {
58
+	public function get_content($output, $entry, $field_settings, $field) {
59 59
 
60 60
 		/** Overridden by a template. */
61
-		if( ! empty( $field['field_path'] ) ) { return $output; }
61
+		if (!empty($field['field_path'])) { return $output; }
62 62
 
63
-		return $this->get_string_from_value( $output );
63
+		return $this->get_string_from_value($output);
64 64
 	}
65 65
 
66 66
 	/**
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @return string
74 74
 	 */
75
-	private function get_string_from_value( $value ) {
75
+	private function get_string_from_value($value) {
76 76
 
77
-		switch ( intval( $value ) ) {
77
+		switch (intval($value)) {
78 78
 			case self::NOT_FULFILLED:
79 79
 			default:
80 80
 				$return = __('Not Fulfilled', 'gravityview');
@@ -101,22 +101,22 @@  discard block
 block discarded – undo
101 101
 	 *
102 102
 	 * @return string Original text if {is_fulfilled} isn't found. Otherwise, "Not Fulfilled" or "Fulfilled"
103 103
 	 */
104
-	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false  ) {
104
+	public function replace_merge_tag($matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false) {
105 105
 
106 106
 		$return = $text;
107 107
 
108
-		foreach ( $matches as $match ) {
108
+		foreach ($matches as $match) {
109 109
 
110 110
 			$full_tag = $match[0];
111 111
 
112
-			$fulfilled = rgar( $entry, 'is_fulfilled' );
112
+			$fulfilled = rgar($entry, 'is_fulfilled');
113 113
 
114
-			$value = $this->get_string_from_value( $fulfilled );
114
+			$value = $this->get_string_from_value($fulfilled);
115 115
 
116
-			$return = str_replace( $full_tag, $value, $return );
116
+			$return = str_replace($full_tag, $value, $return);
117 117
 		}
118 118
 
119
-		unset( $formatted_amount, $value, $amount, $full_tag, $matches );
119
+		unset($formatted_amount, $value, $amount, $full_tag, $matches);
120 120
 
121 121
 		return $return;
122 122
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-payment-method.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 	var $is_numeric = false;
16 16
 
17
-	var $search_operators = array( 'is', 'isnot' );
17
+	var $search_operators = array('is', 'isnot');
18 18
 
19 19
 	var $group = 'pricing';
20 20
 
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 	 * GravityView_Field_Date_Created constructor.
25 25
 	 */
26 26
 	public function __construct() {
27
-		$this->label = esc_attr__( 'Payment Method', 'gravityview' );
28
-		$this->description = esc_html( 'The way the entry was paid for (ie "Credit Card", "PayPal", etc.)', 'gravityview' );
27
+		$this->label = esc_attr__('Payment Method', 'gravityview');
28
+		$this->description = esc_html('The way the entry was paid for (ie "Credit Card", "PayPal", etc.)', 'gravityview');
29 29
 		parent::__construct();
30 30
 	}
31 31
 }
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-payment-amount.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 	var $is_numeric = true;
16 16
 
17
-	var $search_operators = array( 'is', 'isnot', 'greater_than', 'less_than', 'contains' );
17
+	var $search_operators = array('is', 'isnot', 'greater_than', 'less_than', 'contains');
18 18
 
19 19
 	var $group = 'pricing';
20 20
 
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	 * GravityView_Field_Payment_Amount constructor.
25 25
 	 */
26 26
 	public function __construct() {
27
-		$this->label = esc_attr__( 'Payment Amount', 'gravityview' );
27
+		$this->label = esc_attr__('Payment Amount', 'gravityview');
28 28
 
29
-		add_filter( 'gravityview_field_entry_value_' . $this->name . '_pre_link', array( $this, 'get_content' ), 10, 4 );
29
+		add_filter('gravityview_field_entry_value_'.$this->name.'_pre_link', array($this, 'get_content'), 10, 4);
30 30
 
31 31
 		parent::__construct();
32 32
 	}
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
 	 *
46 46
 	 * @return String values for this field based on the numeric values used by Gravity Forms
47 47
 	 */
48
-	public function get_content( $output = '', $entry = array(), $field_settings = array(), $field = array() ) {
48
+	public function get_content($output = '', $entry = array(), $field_settings = array(), $field = array()) {
49 49
 
50 50
 		/** Overridden by a template. */
51
-		if( ! empty( $field['field_path'] ) ) { return $output; }
51
+		if (!empty($field['field_path'])) { return $output; }
52 52
 
53
-		$amount = rgar( $entry, 'payment_amount' );
54
-		$return = GFCommon::to_money( $amount, rgar( $entry, 'currency' ) );
53
+		$amount = rgar($entry, 'payment_amount');
54
+		$return = GFCommon::to_money($amount, rgar($entry, 'currency'));
55 55
 
56 56
 		return $return;
57 57
 	}
@@ -69,23 +69,23 @@  discard block
 block discarded – undo
69 69
 	 *
70 70
 	 * @return string Original text if {date_created} isn't found. Otherwise, replaced text.
71 71
 	 */
72
-	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false  ) {
72
+	public function replace_merge_tag($matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false) {
73 73
 
74 74
 		$return = $text;
75 75
 
76
-		foreach ( $matches as $match ) {
76
+		foreach ($matches as $match) {
77 77
 
78 78
 			$full_tag = $match[0];
79
-			$modifier = isset( $match[1] ) ? $match[1] : false;
79
+			$modifier = isset($match[1]) ? $match[1] : false;
80 80
 
81
-			$amount = rgar( $entry, 'payment_amount' );
81
+			$amount = rgar($entry, 'payment_amount');
82 82
 
83
-			$formatted_amount = ( 'raw' === $modifier ) ? $amount : GFCommon::to_money( $amount, rgar( $entry, 'currency' ) );
83
+			$formatted_amount = ('raw' === $modifier) ? $amount : GFCommon::to_money($amount, rgar($entry, 'currency'));
84 84
 
85
-			$return = str_replace( $full_tag, $formatted_amount, $return );
85
+			$return = str_replace($full_tag, $formatted_amount, $return);
86 86
 		}
87 87
 
88
-		unset( $formatted_amount, $amount, $full_tag, $matches );
88
+		unset($formatted_amount, $amount, $full_tag, $matches);
89 89
 
90 90
 		return $return;
91 91
 	}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-payment-status.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 	var $is_searchable = true;
14 14
 
15
-	var $search_operators = array( 'is', 'in', 'not in', 'isnot' );
15
+	var $search_operators = array('is', 'in', 'not in', 'isnot');
16 16
 
17 17
 	var $group = 'pricing';
18 18
 
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 	 * GravityView_Field_Payment_Status constructor.
23 23
 	 */
24 24
 	public function __construct() {
25
-		$this->label = esc_html__( 'Payment Status', 'gravityview' );
26
-		$this->description = esc_html__('The current payment status of the entry (ie "Processing", "Failed", "Cancelled", "Approved").', 'gravityview' );
25
+		$this->label = esc_html__('Payment Status', 'gravityview');
26
+		$this->description = esc_html__('The current payment status of the entry (ie "Processing", "Failed", "Cancelled", "Approved").', 'gravityview');
27 27
 		parent::__construct();
28 28
 	}
29 29
 }
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-date-created.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
 
10 10
 	var $name = 'date_created';
11 11
 
12
-	var $search_operators = array( 'less_than', 'greater_than', 'is', 'isnot' );
12
+	var $search_operators = array('less_than', 'greater_than', 'is', 'isnot');
13 13
 
14 14
 	var $group = 'meta';
15 15
 
16
-	var $contexts = array( 'single', 'multiple', 'export' );
16
+	var $contexts = array('single', 'multiple', 'export');
17 17
 
18 18
 	var $_custom_merge_tag = 'date_created';
19 19
 
@@ -22,21 +22,21 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function __construct() {
24 24
 
25
-		$this->label = esc_attr__( 'Date Created', 'gravityview' );
26
-		$this->description = esc_attr__( 'The date the entry was created.', 'gravityview' );
25
+		$this->label = esc_attr__('Date Created', 'gravityview');
26
+		$this->description = esc_attr__('The date the entry was created.', 'gravityview');
27 27
 
28
-		add_filter( 'gravityview_field_entry_value_' . $this->name . '_pre_link', array( $this, 'get_content' ), 10, 4 );
28
+		add_filter('gravityview_field_entry_value_'.$this->name.'_pre_link', array($this, 'get_content'), 10, 4);
29 29
 
30 30
 		parent::__construct();
31 31
 	}
32 32
 
33
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
33
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
34 34
 
35
-		if( 'edit' === $context ) {
35
+		if ('edit' === $context) {
36 36
 			return $field_options;
37 37
 		}
38 38
 
39
-		$this->add_field_support('date_display', $field_options );
39
+		$this->add_field_support('date_display', $field_options);
40 40
 
41 41
 		return $field_options;
42 42
 	}
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 	 *
56 56
 	 * @return String values for this field based on the numeric values used by Gravity Forms
57 57
 	 */
58
-	public function get_content( $output = '', $entry = array(), $field_settings = array(), $field = array() ) {
58
+	public function get_content($output = '', $entry = array(), $field_settings = array(), $field = array()) {
59 59
 
60 60
 		/** Overridden by a template. */
61
-		if( ! empty( $field['field_path'] ) ) { return $output; }
61
+		if (!empty($field['field_path'])) { return $output; }
62 62
 
63
-		return GVCommon::format_date( $field['value'], 'format='.rgar( $field_settings, 'date_display' ) );
63
+		return GVCommon::format_date($field['value'], 'format='.rgar($field_settings, 'date_display'));
64 64
 	}
65 65
 
66 66
 	/**
@@ -78,21 +78,21 @@  discard block
 block discarded – undo
78 78
 	 *
79 79
 	 * @return string Original text if {date_created} isn't found. Otherwise, replaced text.
80 80
 	 */
81
-	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false  ) {
81
+	public function replace_merge_tag($matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false) {
82 82
 
83 83
 		$return = $text;
84 84
 
85 85
 		/** Use $this->name instead of date_created because Payment Date uses this as well*/
86
-		$date_created = rgar( $entry, $this->name );
86
+		$date_created = rgar($entry, $this->name);
87 87
 
88
-		foreach ( $matches as $match ) {
88
+		foreach ($matches as $match) {
89 89
 
90 90
 			$full_tag          = $match[0];
91 91
 			$property          = $match[1];
92 92
 
93
-			$formatted_date = GravityView_Merge_Tags::format_date( $date_created, $property );
93
+			$formatted_date = GravityView_Merge_Tags::format_date($date_created, $property);
94 94
 
95
-			$return = str_replace( $full_tag, $formatted_date, $return );
95
+			$return = str_replace($full_tag, $formatted_date, $return);
96 96
 		}
97 97
 
98 98
 		return $return;
Please login to merge, or discard this patch.
includes/plugin-and-theme-hooks/class-gravityview-theme-hooks-avia.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Add Avia Framework theme compatibility to GravityView
4
- *
5
- * @file      class-gravityview-theme-hooks-avia.php
6
- * @package   GravityView
7
- * @license   GPL2+
8
- * @author    Katz Web Services, Inc.
9
- * @link      http://gravityview.co
10
- * @copyright Copyright 2015, Katz Web Services, Inc.
11
- *
12
- * @since 1.15.2
13
- */
3
+	 * Add Avia Framework theme compatibility to GravityView
4
+	 *
5
+	 * @file      class-gravityview-theme-hooks-avia.php
6
+	 * @package   GravityView
7
+	 * @license   GPL2+
8
+	 * @author    Katz Web Services, Inc.
9
+	 * @link      http://gravityview.co
10
+	 * @copyright Copyright 2015, Katz Web Services, Inc.
11
+	 *
12
+	 * @since 1.15.2
13
+	 */
14 14
 
15 15
 /**
16 16
  * @inheritDoc
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-calculation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 	 */
21 21
 	public function __construct() {
22 22
 
23
-		add_filter( 'gravityview_blacklist_field_types', array( $this, 'blacklist_field_types' ), 10, 2 );
23
+		add_filter('gravityview_blacklist_field_types', array($this, 'blacklist_field_types'), 10, 2);
24 24
 
25 25
 		parent::__construct();
26 26
 	}
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 	 *
33 33
 	 * @return array Field types with calculation added, if not Edit Entry context
34 34
 	 */
35
-	public function blacklist_field_types( $field_types = array(), $context = '' ) {
35
+	public function blacklist_field_types($field_types = array(), $context = '') {
36 36
 
37 37
 		// Allow Calculation field in Edit Entry
38
-		if( 'edit' !== $context ) {
38
+		if ('edit' !== $context) {
39 39
 			$field_types[] = $this->name;
40 40
 		}
41 41
 
Please login to merge, or discard this patch.
templates/list-header.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Display above the entries loop when using a list layout
4
- *
5
- * @package GravityView
6
- * @subpackage GravityView/templates
7
- *
8
- * @global GravityView_View $this
9
- */
3
+	 * Display above the entries loop when using a list layout
4
+	 *
5
+	 * @package GravityView
6
+	 * @subpackage GravityView/templates
7
+	 *
8
+	 * @global GravityView_View $this
9
+	 */
10 10
 ?>
11 11
 <?php gravityview_before(); ?>
12 12
 <div class="<?php gv_container_class('gv-list-container'); ?>">
Please login to merge, or discard this patch.