Completed
Branch BUG-9548-transaction-completio... (f1723a)
by
unknown
592:31 queued 571:19
created
line_item_display/EE_Default_Line_Item_Display_Strategy.strategy.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2 2
  /**
3
- *
4
- * Class EE_Default_Line_Item_Display_Strategy
5
- *
6
- * Description
7
- *
8
- * @package         Event Espresso
9
- * @subpackage    core
10
- * @author				Brent Christensen
11
- * @since		 	   $VID:$
12
- *
13
- */
3
+  *
4
+  * Class EE_Default_Line_Item_Display_Strategy
5
+  *
6
+  * Description
7
+  *
8
+  * @package         Event Espresso
9
+  * @subpackage    core
10
+  * @author				Brent Christensen
11
+  * @since		 	   $VID:$
12
+  *
13
+  */
14 14
 
15 15
 class EE_Default_Line_Item_Display_Strategy implements EEI_Line_Item_Display {
16 16
 
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -57,32 +57,32 @@  discard block
 block discarded – undo
57 57
 	 * @param array        $options
58 58
 	 * @return mixed
59 59
 	 */
60
-	public function display_line_item( EE_Line_Item $line_item, $options = array() ) {
60
+	public function display_line_item(EE_Line_Item $line_item, $options = array()) {
61 61
 
62
-		EE_Registry::instance()->load_helper( 'Template' );
63
-		EE_Registry::instance()->load_helper( 'HTML' );
62
+		EE_Registry::instance()->load_helper('Template');
63
+		EE_Registry::instance()->load_helper('HTML');
64 64
 
65 65
 		$html = '';
66 66
 		// set some default options and merge with incoming
67 67
 		$default_options = array(
68
-			'show_desc' => TRUE,  // 	TRUE 		FALSE
68
+			'show_desc' => TRUE, // 	TRUE 		FALSE
69 69
 			'odd' => FALSE
70 70
 		);
71
-		$options = array_merge( $default_options, (array)$options );
71
+		$options = array_merge($default_options, (array) $options);
72 72
 
73
-		switch( $line_item->type() ) {
73
+		switch ($line_item->type()) {
74 74
 
75 75
 			case EEM_Line_Item::type_line_item:
76 76
 				// item row
77
-				$html .= $this->_item_row( $line_item, $options );
77
+				$html .= $this->_item_row($line_item, $options);
78 78
 				// got any kids?
79
-				foreach ( $line_item->children() as $child_line_item ) {
80
-					$this->display_line_item( $child_line_item, $options );
79
+				foreach ($line_item->children() as $child_line_item) {
80
+					$this->display_line_item($child_line_item, $options);
81 81
 				}
82 82
 				break;
83 83
 
84 84
 			case EEM_Line_Item::type_sub_line_item:
85
-				$html .= $this->_sub_item_row( $line_item, $options );
85
+				$html .= $this->_sub_item_row($line_item, $options);
86 86
 				break;
87 87
 
88 88
 			case EEM_Line_Item::type_sub_total:
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 				break;
94 94
 
95 95
 			case EEM_Line_Item::type_tax_sub_total:
96
-				foreach ( $line_item->children() as $child_line_item ) {
97
-					if ( $child_line_item->type() == EEM_Line_Item::type_tax ) {
96
+				foreach ($line_item->children() as $child_line_item) {
97
+					if ($child_line_item->type() == EEM_Line_Item::type_tax) {
98 98
 						// recursively feed children back into this method
99
-						$this->display_line_item( $child_line_item, $options );
99
+						$this->display_line_item($child_line_item, $options);
100 100
 					}
101 101
 				}
102 102
 				break;
@@ -104,20 +104,20 @@  discard block
 block discarded – undo
104 104
 			case EEM_Line_Item::type_total:
105 105
 				// get all child line items
106 106
 				$children = $line_item->children();
107
-				if ( $options[ 'set_tax_rate' ] === true  ) {
107
+				if ($options['set_tax_rate'] === true) {
108 108
 					// loop thru tax child line items just to determine tax rate
109
-					foreach ( $children as $child_line_item ) {
110
-						if ( $child_line_item->type() == EEM_Line_Item::type_tax_sub_total ) {
109
+					foreach ($children as $child_line_item) {
110
+						if ($child_line_item->type() == EEM_Line_Item::type_tax_sub_total) {
111 111
 							// recursively feed children back into this method
112
-							$this->display_line_item( $child_line_item, $options );
112
+							$this->display_line_item($child_line_item, $options);
113 113
 						}
114 114
 					}
115 115
 				} else {
116 116
 					// now loop thru all non-tax child line items
117
-					foreach ( $children as $child_line_item ) {
118
-						if ( $child_line_item->type() != EEM_Line_Item::type_tax_sub_total ) {
117
+					foreach ($children as $child_line_item) {
118
+						if ($child_line_item->type() != EEM_Line_Item::type_tax_sub_total) {
119 119
 							// recursively feed children back into this method
120
-							$html .= $this->display_line_item( $child_line_item, $options );
120
+							$html .= $this->display_line_item($child_line_item, $options);
121 121
 						}
122 122
 					}
123 123
 				}
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
 	 * @param array        $options
138 138
 	 * @return mixed
139 139
 	 */
140
-	private function _item_row( EE_Line_Item $line_item, $options = array() ) {
140
+	private function _item_row(EE_Line_Item $line_item, $options = array()) {
141 141
 		// start of row
142 142
 		$row_class = $options['odd'] ? 'item odd' : 'item';
143
-		$html = EEH_HTML::tr( '', '', $row_class );
143
+		$html = EEH_HTML::tr('', '', $row_class);
144 144
 		// name && desc
145 145
 		$name_and_desc = apply_filters(
146 146
 			'FHEE__EE_Default_Line_Item_Display_Strategy__item_row__name',
@@ -149,22 +149,22 @@  discard block
 block discarded – undo
149 149
 		);
150 150
 		$name_and_desc .= apply_filters(
151 151
 			'FHEE__EE_Default_Line_Item_Display_Strategy__item_row__desc',
152
-			( $options['show_desc'] ? '<span class="line-item-desc-spn smaller-text">: ' . $line_item->desc() . '</span>' : '' ),
152
+			($options['show_desc'] ? '<span class="line-item-desc-spn smaller-text">: '.$line_item->desc().'</span>' : ''),
153 153
 			$line_item,
154 154
 			$options
155 155
 		);
156
-		$name_and_desc .= $line_item->is_taxable() ? '<span class="smaller-text lt-grey-text" style="margin:0 0 0 2em;">' . __( ' * taxable item', 'event_espresso' ) . '</span>' : '';
156
+		$name_and_desc .= $line_item->is_taxable() ? '<span class="smaller-text lt-grey-text" style="margin:0 0 0 2em;">'.__(' * taxable item', 'event_espresso').'</span>' : '';
157 157
 		// name td
158
-		$html .= EEH_HTML::td( /*__FUNCTION__ .*/ $name_and_desc, '',  'item_l' );
158
+		$html .= EEH_HTML::td( /*__FUNCTION__ .*/ $name_and_desc, '', 'item_l' );
159 159
 		// quantity td
160
-		$html .= EEH_HTML::td( $line_item->quantity(), '',  'item_l jst-rght' );
161
-		$tax_rate = $line_item->is_taxable() ? 1 + ( $this->_tax_rate / 100 ) : 1;
160
+		$html .= EEH_HTML::td($line_item->quantity(), '', 'item_l jst-rght');
161
+		$tax_rate = $line_item->is_taxable() ? 1 + ($this->_tax_rate / 100) : 1;
162 162
 		// price td
163
-		$unit_price = EEH_Template::format_currency( $line_item->unit_price() * $tax_rate, false, false );
164
-		$html .= EEH_HTML::td( $unit_price, '',  'item_c jst-rght' );
163
+		$unit_price = EEH_Template::format_currency($line_item->unit_price() * $tax_rate, false, false);
164
+		$html .= EEH_HTML::td($unit_price, '', 'item_c jst-rght');
165 165
 		// total td
166
-		$total = EEH_Template::format_currency( $line_item->unit_price() * $line_item->quantity() * $tax_rate, false, false );
167
-		$html .= EEH_HTML::td( $total, '',  'item_r jst-rght' );
166
+		$total = EEH_Template::format_currency($line_item->unit_price() * $line_item->quantity() * $tax_rate, false, false);
167
+		$html .= EEH_HTML::td($total, '', 'item_r jst-rght');
168 168
 		// end of row
169 169
 		$html .= EEH_HTML::trx();
170 170
 
@@ -180,22 +180,22 @@  discard block
 block discarded – undo
180 180
 	 * @param array        $options
181 181
 	 * @return mixed
182 182
 	 */
183
-	private function _sub_item_row( EE_Line_Item $line_item, $options = array() ) {
183
+	private function _sub_item_row(EE_Line_Item $line_item, $options = array()) {
184 184
 		// start of row
185
-		$html = EEH_HTML::tr( '', 'item sub-item-row' );
185
+		$html = EEH_HTML::tr('', 'item sub-item-row');
186 186
 		// name && desc
187 187
 		$name_and_desc = $line_item->name();
188
-		$name_and_desc .= $options['show_desc'] ? '<span class="line-sub-item-desc-spn smaller-text">: ' . $line_item->desc() . '</span>' : '';
188
+		$name_and_desc .= $options['show_desc'] ? '<span class="line-sub-item-desc-spn smaller-text">: '.$line_item->desc().'</span>' : '';
189 189
 		// name td
190
-		$html .= EEH_HTML::td( /*__FUNCTION__ .*/ $name_and_desc, '',  'item_l sub-item' );
190
+		$html .= EEH_HTML::td( /*__FUNCTION__ .*/ $name_and_desc, '', 'item_l sub-item' );
191 191
 		// discount/surcharge td
192
-		if ( $line_item->is_percent() ) {
193
-			$html .= EEH_HTML::td( $line_item->percent() . '%', '',  'item_c' );
192
+		if ($line_item->is_percent()) {
193
+			$html .= EEH_HTML::td($line_item->percent().'%', '', 'item_c');
194 194
 		} else {
195
-			$html .= EEH_HTML::td( $line_item->unit_price_no_code(), '',  'item_c jst-rght' );
195
+			$html .= EEH_HTML::td($line_item->unit_price_no_code(), '', 'item_c jst-rght');
196 196
 		}
197 197
 		// total td
198
-		$html .= EEH_HTML::td( EEH_Template::format_currency( $line_item->total(), false, false ), '',  'item_r jst-rght' );
198
+		$html .= EEH_HTML::td(EEH_Template::format_currency($line_item->total(), false, false), '', 'item_r jst-rght');
199 199
 		// end of row
200 200
 		$html .= EEH_HTML::trx();
201 201
 		return $html;
Please login to merge, or discard this patch.
line_item_display/EE_Invoice_Line_Item_Display_Strategy.strategy.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2 2
  /**
3
- *
4
- * Class EE_Invoice_Line_Item_Display_Strategy
5
- *
6
- * Description
7
- *
8
- * @package         Event Espresso
9
- * @subpackage    core
10
- * @author				Brent Christensen
11
- * @since		 	   $VID:$
12
- *
13
- */
3
+  *
4
+  * Class EE_Invoice_Line_Item_Display_Strategy
5
+  *
6
+  * Description
7
+  *
8
+  * @package         Event Espresso
9
+  * @subpackage    core
10
+  * @author				Brent Christensen
11
+  * @since		 	   $VID:$
12
+  *
13
+  */
14 14
 class EE_Invoice_Line_Item_Display_Strategy implements EEI_Line_Item_Display {
15 15
 
16 16
 	/**
Please login to merge, or discard this patch.
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 	 * @param array        $options
19 19
 	 * @return mixed
20 20
 	 */
21
-	public function display_line_item( EE_Line_Item $line_item, $options = array() ) {
21
+	public function display_line_item(EE_Line_Item $line_item, $options = array()) {
22 22
 
23
-		EE_Registry::instance()->load_helper( 'HTML' );
23
+		EE_Registry::instance()->load_helper('HTML');
24 24
 
25 25
 		$html = '';
26 26
 		// set some default options and merge with incoming
@@ -28,58 +28,58 @@  discard block
 block discarded – undo
28 28
 			'show_desc' => TRUE,
29 29
 			'odd' => FALSE
30 30
 		);
31
-		$options = array_merge( $default_options, (array)$options );
31
+		$options = array_merge($default_options, (array) $options);
32 32
 
33
-		switch( $line_item->type() ) {
33
+		switch ($line_item->type()) {
34 34
 
35 35
 			case EEM_Line_Item::type_total:
36 36
 				// loop thru children
37
-				foreach( $line_item->children() as $child_line_item ) {
37
+				foreach ($line_item->children() as $child_line_item) {
38 38
 					// recursively feed children back into this method
39
-					$html .= $this->display_line_item( $child_line_item, $options );
39
+					$html .= $this->display_line_item($child_line_item, $options);
40 40
 				}
41
-				$html .= $this->_separator_row( $options );
42
-				$html .= $this->_total_row( $line_item, __('Total', 'event_espresso'), $options );
41
+				$html .= $this->_separator_row($options);
42
+				$html .= $this->_total_row($line_item, __('Total', 'event_espresso'), $options);
43 43
 				 break;
44 44
 
45 45
 
46 46
 			case EEM_Line_Item::type_sub_total:
47 47
 				// loop thru children
48
-				foreach( $line_item->children() as $child_line_item ) {
48
+				foreach ($line_item->children() as $child_line_item) {
49 49
 					// recursively feed children back into this method
50
-					$html .= $this->display_line_item( $child_line_item, $options );
50
+					$html .= $this->display_line_item($child_line_item, $options);
51 51
 				}
52
-				$html .= $this->_total_row( $line_item, __('Sub-Total', 'event_espresso'), $options );
52
+				$html .= $this->_total_row($line_item, __('Sub-Total', 'event_espresso'), $options);
53 53
 				break;
54 54
 
55 55
 
56 56
 			case EEM_Line_Item::type_tax_sub_total:
57 57
 				// loop thru children
58
-				foreach( $line_item->children() as $child_line_item ) {
58
+				foreach ($line_item->children() as $child_line_item) {
59 59
 					// recursively feed children back into this method
60
-					$html .= $this->display_line_item( $child_line_item, $options );
60
+					$html .= $this->display_line_item($child_line_item, $options);
61 61
 				}
62
-				$html .= $this->_total_row( $line_item, __('Tax Total', 'event_espresso'), $options );
62
+				$html .= $this->_total_row($line_item, __('Tax Total', 'event_espresso'), $options);
63 63
 				break;
64 64
 
65 65
 
66 66
 			case EEM_Line_Item::type_line_item:
67 67
 				// item row
68
-				$html .= $this->_item_row( $line_item, $options );
68
+				$html .= $this->_item_row($line_item, $options);
69 69
 				// got any kids?
70
-				foreach( $line_item->children() as $child_line_item ) {
71
-					$this->display_line_item( $child_line_item, $options );
70
+				foreach ($line_item->children() as $child_line_item) {
71
+					$this->display_line_item($child_line_item, $options);
72 72
 				}
73 73
 				break;
74 74
 
75 75
 
76 76
 			case EEM_Line_Item::type_sub_line_item:
77
-				$html .= $this->_sub_item_row( $line_item, $options );
77
+				$html .= $this->_sub_item_row($line_item, $options);
78 78
 				break;
79 79
 
80 80
 
81 81
 			case EEM_Line_Item::type_tax:
82
-				$html .= $this->_tax_row( $line_item, $options );
82
+				$html .= $this->_tax_row($line_item, $options);
83 83
 				break;
84 84
 
85 85
 		}
@@ -96,21 +96,21 @@  discard block
 block discarded – undo
96 96
 	 * @param array        $options
97 97
 	 * @return mixed
98 98
 	 */
99
-	private function _item_row( EE_Line_Item $line_item, $options = array() ) {
99
+	private function _item_row(EE_Line_Item $line_item, $options = array()) {
100 100
 		// start of row
101 101
 		$row_class = $options['odd'] ? 'item odd' : 'item';
102
-		$html = EEH_HTML::tr( '', $row_class );
102
+		$html = EEH_HTML::tr('', $row_class);
103 103
 		// name td
104
-		$html .= EEH_HTML::td( $line_item->name(), '',  'item_l' );
104
+		$html .= EEH_HTML::td($line_item->name(), '', 'item_l');
105 105
 		// desc td
106
-		$html .= $options['show_desc'] ? EEH_HTML::td( $line_item->desc(), '',  'item_l' ) : '';
106
+		$html .= $options['show_desc'] ? EEH_HTML::td($line_item->desc(), '', 'item_l') : '';
107 107
 		// quantity td
108
-		$html .= EEH_HTML::td( $line_item->quantity(), '',  'item_l' );
108
+		$html .= EEH_HTML::td($line_item->quantity(), '', 'item_l');
109 109
 		// price td
110
-		$html .= EEH_HTML::td( $line_item->unit_price_no_code(), '',  'item_c' );
110
+		$html .= EEH_HTML::td($line_item->unit_price_no_code(), '', 'item_c');
111 111
 		// total td
112
-		$total = $line_item->is_taxable() ? $line_item->total_no_code() . '*' : $line_item->total_no_code();
113
-		$html .= EEH_HTML::td( $total, '',  'item_r' );
112
+		$total = $line_item->is_taxable() ? $line_item->total_no_code().'*' : $line_item->total_no_code();
113
+		$html .= EEH_HTML::td($total, '', 'item_r');
114 114
 		// end of row
115 115
 		$html .= EEH_HTML::trx();
116 116
 		return $html;
@@ -125,22 +125,22 @@  discard block
 block discarded – undo
125 125
 	 * @param array        $options
126 126
 	 * @return mixed
127 127
 	 */
128
-	private function _sub_item_row( EE_Line_Item $line_item, $options = array() ) {
128
+	private function _sub_item_row(EE_Line_Item $line_item, $options = array()) {
129 129
 		// start of row
130
-		$html = EEH_HTML::tr( '', 'item sub-item-row' );
130
+		$html = EEH_HTML::tr('', 'item sub-item-row');
131 131
 		// name td
132
-		$html .= EEH_HTML::td( $line_item->name(), '',  'item_l sub-item' );
132
+		$html .= EEH_HTML::td($line_item->name(), '', 'item_l sub-item');
133 133
 		// desc td
134
-		$html .= $options['show_desc'] ? EEH_HTML::td( $line_item->desc(), '',  'item_l' ) : '';
135
-		$html .= EEH_HTML::td() . EEH_HTML::tdx();
134
+		$html .= $options['show_desc'] ? EEH_HTML::td($line_item->desc(), '', 'item_l') : '';
135
+		$html .= EEH_HTML::td().EEH_HTML::tdx();
136 136
 		// discount/surcharge td
137
-		if ( $line_item->is_percent() ) {
138
-			$html .= EEH_HTML::td( $line_item->percent() . '%', '',  'item_c' );
137
+		if ($line_item->is_percent()) {
138
+			$html .= EEH_HTML::td($line_item->percent().'%', '', 'item_c');
139 139
 		} else {
140
-			$html .= EEH_HTML::td( $line_item->unit_price_no_code(), '',  'item_c' );
140
+			$html .= EEH_HTML::td($line_item->unit_price_no_code(), '', 'item_c');
141 141
 		}
142 142
 		// total td
143
-		$html .= EEH_HTML::td( $line_item->total_no_code(), '',  'item_r' );
143
+		$html .= EEH_HTML::td($line_item->total_no_code(), '', 'item_r');
144 144
 		// end of row
145 145
 		$html .= EEH_HTML::trx();
146 146
 		return $html;
@@ -155,17 +155,17 @@  discard block
 block discarded – undo
155 155
 	 * @param array        $options
156 156
 	 * @return mixed
157 157
 	 */
158
-	private function _tax_row( EE_Line_Item $line_item, $options = array() ) {
158
+	private function _tax_row(EE_Line_Item $line_item, $options = array()) {
159 159
 		// start of row
160
-		$html = EEH_HTML::tr( '', 'item sub-item tax-total' );
160
+		$html = EEH_HTML::tr('', 'item sub-item tax-total');
161 161
 		// name td
162
-		$html .= EEH_HTML::td( $line_item->name(), '',  'item_l sub-item' );
162
+		$html .= EEH_HTML::td($line_item->name(), '', 'item_l sub-item');
163 163
 		// desc td
164
-		$html .= $options['show_desc'] ? EEH_HTML::td( $line_item->desc(), '',  'item_l' ) : '';
164
+		$html .= $options['show_desc'] ? EEH_HTML::td($line_item->desc(), '', 'item_l') : '';
165 165
 		// percent td
166
-		$html .= EEH_HTML::td( $line_item->percent() . '%', '',  'item_c', '', ' colspan="2"' );
166
+		$html .= EEH_HTML::td($line_item->percent().'%', '', 'item_c', '', ' colspan="2"');
167 167
 		// total td
168
-		$html .= EEH_HTML::td( $line_item->total_no_code(), '',  'item_r' );
168
+		$html .= EEH_HTML::td($line_item->total_no_code(), '', 'item_r');
169 169
 		// end of row
170 170
 		$html .= EEH_HTML::trx();
171 171
 		return $html;
@@ -181,17 +181,17 @@  discard block
 block discarded – undo
181 181
 	 * @param array        $options
182 182
 	 * @return mixed
183 183
 	 */
184
-	private function _total_row( EE_Line_Item $line_item, $text = '', $options = array() ) {
184
+	private function _total_row(EE_Line_Item $line_item, $text = '', $options = array()) {
185 185
 		// colspan
186 186
 		$colspan = $options['show_desc'] ? ' colspan="2"' : '';
187 187
 		// start of row
188
-		$html = EEH_HTML::tr( '', '', 'total_tr odd' );
188
+		$html = EEH_HTML::tr('', '', 'total_tr odd');
189 189
 		// empty td
190
-		$html .= EEH_HTML::td( EEH_HTML::nbsp(), '',  '',  '',  $colspan );
190
+		$html .= EEH_HTML::td(EEH_HTML::nbsp(), '', '', '', $colspan);
191 191
 		// total td
192
-		$html .= EEH_HTML::td( $text, '',  'total_currency total',  '',  $colspan );
192
+		$html .= EEH_HTML::td($text, '', 'total_currency total', '', $colspan);
193 193
 		// total td
194
-		$html .= EEH_HTML::td( $line_item->total_no_code(), '',  'total' );
194
+		$html .= EEH_HTML::td($line_item->total_no_code(), '', 'total');
195 195
 		// end of row
196 196
 		$html .= EEH_HTML::trx();
197 197
 		return $html;
@@ -205,11 +205,11 @@  discard block
 block discarded – undo
205 205
 	 * @param array        $options
206 206
 	 * @return mixed
207 207
 	 */
208
-	private function _separator_row( $options = array() ) {
208
+	private function _separator_row($options = array()) {
209 209
 		// colspan
210 210
 		$colspan = $options['show_desc'] ? ' colspan="5"' : ' colspan="4"';
211 211
 		// start of row
212
-		$html = EEH_HTML::tr( EEH_HTML::td( '<hr>', '',  '',  '',  $colspan ));
212
+		$html = EEH_HTML::tr(EEH_HTML::td('<hr>', '', '', '', $colspan));
213 213
 //		// separator td
214 214
 //		$html .= EEH_HTML::td( '<hr>', '',  '',  '',  $colspan );
215 215
 //		// end of row
Please login to merge, or discard this patch.
core/libraries/line_item_display/EE_Line_Item_Display.class.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2 2
  /**
3
- *
4
- * Class EE_Line_Item_Display
5
- *
6
- * Description
7
- *
8
- * @package         Event Espresso
9
- * @subpackage    core
10
- * @author				Brent Christensen
11
- * @since		 	   $VID:$
12
- *
13
- */
3
+  *
4
+  * Class EE_Line_Item_Display
5
+  *
6
+  * Description
7
+  *
8
+  * @package         Event Espresso
9
+  * @subpackage    core
10
+  * @author				Brent Christensen
11
+  * @since		 	   $VID:$
12
+  *
13
+  */
14 14
 class EE_Line_Item_Display {
15 15
 
16 16
 	private $strategy = NULL;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
 	 * @param string $context - where/how the line items are being displayed
22 22
 	 * @param string $other_line_item_display_strategy
23 23
 	 */
24
-	public function __construct( $context = '', $other_line_item_display_strategy = '' ) {
25
-		$context = strtolower( $context );
26
-		switch ( $context ) {
24
+	public function __construct($context = '', $other_line_item_display_strategy = '') {
25
+		$context = strtolower($context);
26
+		switch ($context) {
27 27
 			case 'invoice' :
28 28
 				$this->strategy = new EE_Invoice_Line_Item_Display_Strategy();
29 29
 				break;
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 				break;
36 36
 			default :
37 37
 				if (
38
-					! empty( $other_line_item_display_strategy ) &&
39
-					class_exists( $other_line_item_display_strategy )
38
+					! empty($other_line_item_display_strategy) &&
39
+					class_exists($other_line_item_display_strategy)
40 40
 				) {
41 41
 					$this->strategy = new  $other_line_item_display_strategy();
42 42
 				} else {
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	 * @param array        $options
51 51
 	 * @return mixed
52 52
 	 */
53
-	public function display_line_item( EE_Line_Item $line_item, $options = array() ) {
54
-		return $this->strategy->display_line_item( $line_item, $options );
53
+	public function display_line_item(EE_Line_Item $line_item, $options = array()) {
54
+		return $this->strategy->display_line_item($line_item, $options);
55 55
 	}
56 56
 
57 57
 
Please login to merge, or discard this patch.
core/libraries/line_item_filters/EE_Billable_Line_Item_Filter.class.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,19 +3,19 @@
 block discarded – undo
3 3
 	exit( 'No direct script access allowed' );
4 4
 }
5 5
 /**
6
- * Class EE_Billable_Line_Item_Filter
7
- *
8
- * Filters line items to remove any that can not be billed for
9
- * as based on a list of EE_Registrations passed during construction.
10
- * Also, modifies NON-ticket regular line items (eg flat discounts and percent surcharges, etc)
11
- * to only show the share for the specified ticket quantities
12
- *
13
- * @package 			Event Espresso
14
- * @subpackage 	core
15
- * @author 				Brent Christensen / Mike Nelson
16
- * @since 				4.8.0
17
- *
18
- */
6
+	 * Class EE_Billable_Line_Item_Filter
7
+	 *
8
+	 * Filters line items to remove any that can not be billed for
9
+	 * as based on a list of EE_Registrations passed during construction.
10
+	 * Also, modifies NON-ticket regular line items (eg flat discounts and percent surcharges, etc)
11
+	 * to only show the share for the specified ticket quantities
12
+	 *
13
+	 * @package 			Event Espresso
14
+	 * @subpackage 	core
15
+	 * @author 				Brent Christensen / Mike Nelson
16
+	 * @since 				4.8.0
17
+	 *
18
+	 */
19 19
 class EE_Billable_Line_Item_Filter extends EE_Specific_Registrations_Line_Item_Filter {
20 20
 
21 21
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  * Class EE_Billable_Line_Item_Filter
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 	 * EE_Billable_Line_Item_Filter constructor.
26 26
 	 * @param EE_Registration[] $registrations
27 27
 	 */
28
-	public function __construct( $registrations ) {
29
-		parent::__construct( $this->_remove_unbillable_registrations( $registrations ) );
28
+	public function __construct($registrations) {
29
+		parent::__construct($this->_remove_unbillable_registrations($registrations));
30 30
 	}
31 31
 
32 32
 
@@ -39,25 +39,24 @@  discard block
 block discarded – undo
39 39
 	 * @param EE_Registration[] $registrations
40 40
 	 * @return mixed
41 41
 	 */
42
-	protected function _remove_unbillable_registrations( $registrations = array() ) {
43
-		if ( ! empty( $registrations ) ) {
42
+	protected function _remove_unbillable_registrations($registrations = array()) {
43
+		if ( ! empty($registrations)) {
44 44
 			// these reg statuses require payment (if event is not free)
45 45
 			$requires_payment = EEM_Registration::reg_statuses_that_allow_payment();
46
-			foreach ( $registrations as $key => $registration ) {
47
-				if ( ! $registration instanceof EE_Registration ) {
46
+			foreach ($registrations as $key => $registration) {
47
+				if ( ! $registration instanceof EE_Registration) {
48 48
 					continue;
49 49
 				}
50 50
 				// are we billing for this registration at this moment ?
51
-				if ( !
52
-					$registration->owes_monies_and_can_pay( $requires_payment ) &&
51
+				if ( ! $registration->owes_monies_and_can_pay($requires_payment) &&
53 52
 					! (
54 53
 						// free registration with valid reg status
55 54
 						$registration->final_price() == 0 &&
56
-						in_array( $registration->status_ID(), $requires_payment )
55
+						in_array($registration->status_ID(), $requires_payment)
57 56
 					)
58 57
 				) {
59 58
 					// not billable. remove it
60
-					unset( $registrations[ $key ] );
59
+					unset($registrations[$key]);
61 60
 				}
62 61
 			}
63 62
 		}
Please login to merge, or discard this patch.
core/libraries/line_item_filters/EE_Line_Item_Filter_Base.class.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@
 block discarded – undo
3 3
 	exit( 'No direct script access allowed' );
4 4
 }
5 5
 /**
6
- * Class EE_Line_Item_Filter_Base
7
- *
8
- * Abstract parent class for EE_Line_Item_Filters
9
- *
10
- * @see \EEI_Line_Item_Filter
11
- * @package               Event Espresso
12
- * @subpackage            core
13
- * @author                Brent Christensen
14
- * @since                 4.8.0
15
- *
16
- */
6
+	 * Class EE_Line_Item_Filter_Base
7
+	 *
8
+	 * Abstract parent class for EE_Line_Item_Filters
9
+	 *
10
+	 * @see \EEI_Line_Item_Filter
11
+	 * @package               Event Espresso
12
+	 * @subpackage            core
13
+	 * @author                Brent Christensen
14
+	 * @since                 4.8.0
15
+	 *
16
+	 */
17 17
 abstract class EE_Line_Item_Filter_Base implements EEI_Line_Item_Filter {
18 18
 
19 19
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  * Class EE_Line_Item_Filter_Base
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	 * @param \EEI_Line_Item $line_item
25 25
 	 * @return \EEI_Line_Item
26 26
 	 */
27
-	public function process( EEI_Line_Item $line_item ) {
27
+	public function process(EEI_Line_Item $line_item) {
28 28
 		return $line_item;
29 29
 	}
30 30
 
Please login to merge, or discard this patch.
core/libraries/line_item_filters/EE_Line_Item_Filter_Collection.class.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,19 +3,19 @@
 block discarded – undo
3 3
 	exit( 'No direct script access allowed' );
4 4
 }
5 5
 /**
6
- * Class EE_Line_Item_Filter_Collection
7
- *
8
- * An EE_Object_Collection object that type checks
9
- * for EEI_Line_Item_Filter objects when adding to the collection
10
- *
11
- * @package               Event Espresso
12
- * @subpackage            core
13
- * @author                Brent Christensen
14
- * @since                 4.8.0
15
- *
16
- *
17
- *
18
- */
6
+	 * Class EE_Line_Item_Filter_Collection
7
+	 *
8
+	 * An EE_Object_Collection object that type checks
9
+	 * for EEI_Line_Item_Filter objects when adding to the collection
10
+	 *
11
+	 * @package               Event Espresso
12
+	 * @subpackage            core
13
+	 * @author                Brent Christensen
14
+	 * @since                 4.8.0
15
+	 *
16
+	 *
17
+	 *
18
+	 */
19 19
 class EE_Line_Item_Filter_Collection extends EE_Object_Collection {
20 20
 
21 21
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  * Class EE_Line_Item_Filter_Collection
Please login to merge, or discard this patch.
core/libraries/line_item_filters/EE_Line_Item_Filter_Processor.class.php 2 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -3,38 +3,38 @@
 block discarded – undo
3 3
 	exit( 'No direct script access allowed' );
4 4
 }
5 5
 /**
6
- * Class EE_Line_Item_Filter_Processor
7
- *
8
- * Receives an EE_Collection of EE_Line_Item_Filter objects
9
- * and an EEI_Line_Item grand total object upon construction
10
- * clones the entire grand total line item tree so that the original will not be affected
11
- * then process() applies each filter to the cloned grand total line item tree
12
- *
13
- * example:
14
- *
15
- * 		// make sure to setup autoloaders
16
- * 		EEH_Autoloader::register_line_item_filter_autoloaders();
17
- * 		// create a collection to hold our filters
18
- * 		$line_item_filter_collection = new EE_Line_Item_Filter_Collection();
19
- * 		$line_item_filter_collection->add( new EE_Billable_Line_Item_Filter( $array_of_EE_Registrations() ) );
20
- * 		$line_item_filter_collection->add( new EE_Non_Zero_Line_Item_Filter() );
21
- * 		// create the main processor, and pass it our filter collection, and a grand total line item
22
- * 		// which will be used to construct a clone of the entire line item tree
23
- * 		$line_item_filter_processor = new EE_Line_Item_Filter_Processor(
24
- * 			$line_item_filter_collection,
25
- * 			$EE_Cart->get_grand_total()
26
- * 		);
27
- * 		// then apply filters to the line item tree by calling process()
28
- * 		$filtered_line_item_tree = $line_item_filter_processor->process();
29
- * 		// the resultant filtered line item tree can then be passed along
30
- * 		// to other classes to do what they need to do, such as display
31
- *
32
- * @package               Event Espresso
33
- * @subpackage            core
34
- * @author                Brent Christensen
35
- * @since                 4.8.0
36
- *
37
- */
6
+	 * Class EE_Line_Item_Filter_Processor
7
+	 *
8
+	 * Receives an EE_Collection of EE_Line_Item_Filter objects
9
+	 * and an EEI_Line_Item grand total object upon construction
10
+	 * clones the entire grand total line item tree so that the original will not be affected
11
+	 * then process() applies each filter to the cloned grand total line item tree
12
+	 *
13
+	 * example:
14
+	 *
15
+	 * 		// make sure to setup autoloaders
16
+	 * 		EEH_Autoloader::register_line_item_filter_autoloaders();
17
+	 * 		// create a collection to hold our filters
18
+	 * 		$line_item_filter_collection = new EE_Line_Item_Filter_Collection();
19
+	 * 		$line_item_filter_collection->add( new EE_Billable_Line_Item_Filter( $array_of_EE_Registrations() ) );
20
+	 * 		$line_item_filter_collection->add( new EE_Non_Zero_Line_Item_Filter() );
21
+	 * 		// create the main processor, and pass it our filter collection, and a grand total line item
22
+	 * 		// which will be used to construct a clone of the entire line item tree
23
+	 * 		$line_item_filter_processor = new EE_Line_Item_Filter_Processor(
24
+	 * 			$line_item_filter_collection,
25
+	 * 			$EE_Cart->get_grand_total()
26
+	 * 		);
27
+	 * 		// then apply filters to the line item tree by calling process()
28
+	 * 		$filtered_line_item_tree = $line_item_filter_processor->process();
29
+	 * 		// the resultant filtered line item tree can then be passed along
30
+	 * 		// to other classes to do what they need to do, such as display
31
+	 *
32
+	 * @package               Event Espresso
33
+	 * @subpackage            core
34
+	 * @author                Brent Christensen
35
+	 * @since                 4.8.0
36
+	 *
37
+	 */
38 38
 class EE_Line_Item_Filter_Processor {
39 39
 
40 40
 	/**
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  * Class EE_Line_Item_Filter_Processor
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 	 * @param \EEI_Line_Item                  $grand_total_line_item
56 56
 	 * @throws \EE_Error
57 57
 	 */
58
-	public function __construct( EE_Line_Item_Filter_Collection $line_item_filters, EEI_Line_Item $grand_total_line_item ) {
58
+	public function __construct(EE_Line_Item_Filter_Collection $line_item_filters, EEI_Line_Item $grand_total_line_item) {
59 59
 		$this->line_item_filters = $line_item_filters;
60
-		if ( $grand_total_line_item->type() !== EEM_Line_Item::type_total ) {
61
-			throw new EE_Error( __( 'A Line Item of the type total is required', 'event_espresso' ) );
60
+		if ($grand_total_line_item->type() !== EEM_Line_Item::type_total) {
61
+			throw new EE_Error(__('A Line Item of the type total is required', 'event_espresso'));
62 62
 		}
63
-		$this->grand_total_line_item = $this->clone_and_reset_line_item_tree( $grand_total_line_item );
63
+		$this->grand_total_line_item = $this->clone_and_reset_line_item_tree($grand_total_line_item);
64 64
 	}
65 65
 
66 66
 
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
 	 * @param \EEI_Line_Item $line_item
72 72
 	 * @return \EEI_Line_Item
73 73
 	 */
74
-	protected function clone_and_reset_line_item_tree( EEI_Line_Item $line_item ) {
75
-		$cloned_line_item = $this->clone_and_reset_line_item( $line_item );
76
-		foreach ( $line_item->children() as $child_line_item ) {
77
-			$cloned_line_item->add_child_line_item( $this->clone_and_reset_line_item_tree( $child_line_item ) );
74
+	protected function clone_and_reset_line_item_tree(EEI_Line_Item $line_item) {
75
+		$cloned_line_item = $this->clone_and_reset_line_item($line_item);
76
+		foreach ($line_item->children() as $child_line_item) {
77
+			$cloned_line_item->add_child_line_item($this->clone_and_reset_line_item_tree($child_line_item));
78 78
 		}
79 79
 		return $cloned_line_item;
80 80
 	}
@@ -91,16 +91,16 @@  discard block
 block discarded – undo
91 91
 	 * @param \EEI_Line_Item $line_item
92 92
 	 * @return \EEI_Line_Item
93 93
 	 */
94
-	protected function clone_and_reset_line_item( EEI_Line_Item $line_item ) {
94
+	protected function clone_and_reset_line_item(EEI_Line_Item $line_item) {
95 95
 		// we don't actually want to work with the original line item, so clone it
96 96
 		$cloned_line_item = clone $line_item;
97
-		$cloned_line_item->set( 'LIN_ID', null );
98
-		$cloned_line_item->set( 'LIN_parent', null );
97
+		$cloned_line_item->set('LIN_ID', null);
98
+		$cloned_line_item->set('LIN_parent', null);
99 99
 		$cloned_line_item->clear_related_line_item_cache();
100
-		foreach( array_keys( EEM_Line_Item::instance()->relation_settings() ) as $relation_name) {
101
-			$cloned_line_item->clear_cache( $relation_name, null, true );
100
+		foreach (array_keys(EEM_Line_Item::instance()->relation_settings()) as $relation_name) {
101
+			$cloned_line_item->clear_cache($relation_name, null, true);
102 102
 		}
103
-		$cloned_line_item->set_allow_persist( false );
103
+		$cloned_line_item->set_allow_persist(false);
104 104
 		return $cloned_line_item;
105 105
 	}
106 106
 
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
 	 */
114 114
 	public function process() {
115 115
 		$this->line_item_filters->rewind();
116
-		while ( $this->line_item_filters->valid() ) {
117
-			$this->grand_total_line_item = $this->line_item_filters->current()->process( $this->grand_total_line_item );
116
+		while ($this->line_item_filters->valid()) {
117
+			$this->grand_total_line_item = $this->line_item_filters->current()->process($this->grand_total_line_item);
118 118
 			$this->line_item_filters->next();
119 119
 		}
120 120
 		$this->grand_total_line_item->recalculate_total_including_taxes();
Please login to merge, or discard this patch.
core/libraries/line_item_filters/EE_Non_Zero_Line_Item_Filter.class.php 3 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 	exit( 'No direct script access allowed' );
4 4
 }
5 5
 /**
6
- * Class EE_Non_Zero_Line_Item_Filter
7
- *
8
- * Filters line items to remove :
9
- * 		subtotals with a total of 0
10
- * 		line items with a quantity of 0
11
- *
12
- * @package               Event Espresso
13
- * @subpackage            core
14
- * @author                Brent Christensen
15
- * @since                 $VID:$
16
- *
17
- */
6
+	 * Class EE_Non_Zero_Line_Item_Filter
7
+	 *
8
+	 * Filters line items to remove :
9
+	 * 		subtotals with a total of 0
10
+	 * 		line items with a quantity of 0
11
+	 *
12
+	 * @package               Event Espresso
13
+	 * @subpackage            core
14
+	 * @author                Brent Christensen
15
+	 * @since                 $VID:$
16
+	 *
17
+	 */
18 18
 class EE_Non_Zero_Line_Item_Filter extends EE_Line_Item_Filter_Base {
19 19
 
20 20
 	/**
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  * Class EE_Non_Zero_Line_Item_Filter
@@ -31,36 +31,36 @@  discard block
 block discarded – undo
31 31
 	 * @param EEI_Line_Item $line_item
32 32
 	 * @return \EEI_Line_Item
33 33
 	 */
34
-	public function process( EEI_Line_Item $line_item ) {
35
-		$non_zero_line_item = $this->_filter_zero_line_item( $line_item );
36
-		if ( ! $non_zero_line_item instanceof EEI_Line_Item ) {
34
+	public function process(EEI_Line_Item $line_item) {
35
+		$non_zero_line_item = $this->_filter_zero_line_item($line_item);
36
+		if ( ! $non_zero_line_item instanceof EEI_Line_Item) {
37 37
 			return null;
38 38
 		}
39 39
 		//if this is an event subtotal, we want to only include it if it
40 40
 		//has a non-zero total and at least one ticket line item child
41
-		if( $line_item->children() ) {
41
+		if ($line_item->children()) {
42 42
 			$ticket_or_subtotals_with_tkt_children_count = 0;
43
-			foreach ( $line_item->children() as $child_line_item ) {
43
+			foreach ($line_item->children() as $child_line_item) {
44 44
 				$code = $child_line_item->code();
45
-				$child_line_item = $this->process( $child_line_item );
46
-				if( ! $child_line_item instanceof EEI_Line_Item ) {
47
-					$line_item->delete_child_line_item( $code );
45
+				$child_line_item = $this->process($child_line_item);
46
+				if ( ! $child_line_item instanceof EEI_Line_Item) {
47
+					$line_item->delete_child_line_item($code);
48 48
 					continue;
49 49
 				}
50 50
 				if (
51
-					( $child_line_item instanceof EEI_Line_Item &&
51
+					($child_line_item instanceof EEI_Line_Item &&
52 52
 					$child_line_item->type() === EEM_Line_Item::type_line_item &&
53
-					$child_line_item->OBJ_type() === 'Ticket' ) ||
54
-					( $child_line_item instanceof EEI_Line_Item &&
55
-					 $child_line_item->type() === EEM_Line_Item::type_sub_total )
53
+					$child_line_item->OBJ_type() === 'Ticket') ||
54
+					($child_line_item instanceof EEI_Line_Item &&
55
+					 $child_line_item->type() === EEM_Line_Item::type_sub_total)
56 56
 				) {
57 57
 					$ticket_or_subtotals_with_tkt_children_count++;
58 58
 				}
59 59
 			}
60 60
 			// if this is an event subtotal with NO ticket children
61 61
 			// we basically want to ignore it
62
-			return $this->_filter_zero_subtotal_line_item( $non_zero_line_item, $ticket_or_subtotals_with_tkt_children_count );
63
-		}else{
62
+			return $this->_filter_zero_subtotal_line_item($non_zero_line_item, $ticket_or_subtotals_with_tkt_children_count);
63
+		} else {
64 64
 			return $non_zero_line_item;
65 65
 		}
66 66
 	}
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	 * @param EEI_Line_Item $line_item
74 74
 	 * @return EEI_Line_Item
75 75
 	 */
76
-	protected function _filter_zero_line_item( EEI_Line_Item $line_item ) {
76
+	protected function _filter_zero_line_item(EEI_Line_Item $line_item) {
77 77
 		if (
78 78
 			$line_item->type() === EEM_Line_Item::type_line_item &&
79 79
 			$line_item->OBJ_type() === 'Ticket' &&
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @param int           $ticket_children
94 94
 	 * @return \EEI_Line_Item
95 95
 	 */
96
-	protected function _filter_zero_subtotal_line_item( EEI_Line_Item $line_item, $ticket_children = 0 ) {
96
+	protected function _filter_zero_subtotal_line_item(EEI_Line_Item $line_item, $ticket_children = 0) {
97 97
 		if (
98 98
 			$line_item->type() === EEM_Line_Item::type_sub_total &&
99 99
 			$ticket_children === 0
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 		//so in case teh IPN is arriving later, let's try to process an IPN!
91 91
 		if($_SERVER['REQUEST_METHOD'] == 'POST'){
92 92
 			return $this->handle_ipn($_POST, $transaction );
93
-		}else{
93
+		} else{
94 94
 			return parent::finalize_payment_for( $transaction );
95 95
 		}
96 96
 	}
Please login to merge, or discard this patch.
line_item_filters/EE_Single_Registration_Line_Item_Filter.class.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 	exit( 'No direct script access allowed' );
4 4
 }
5 5
 /**
6
- * Class EE_Single_Registration_Line_Item_Filter
7
- *
8
- * Filters line items to remove any that aren't for the specified registration.
9
- * Also, other price modifiers, like discounts or surcharges, must be shared between
10
- * this registration and others, so this tree should only show this registration's share.
11
- *
12
- * @package 			Event Espresso
13
- * @subpackage 	core
14
- * @author 				Brent Christensen / Mike Nelson
15
- * @since 				4.8.0
16
- *
17
- */
6
+	 * Class EE_Single_Registration_Line_Item_Filter
7
+	 *
8
+	 * Filters line items to remove any that aren't for the specified registration.
9
+	 * Also, other price modifiers, like discounts or surcharges, must be shared between
10
+	 * this registration and others, so this tree should only show this registration's share.
11
+	 *
12
+	 * @package 			Event Espresso
13
+	 * @subpackage 	core
14
+	 * @author 				Brent Christensen / Mike Nelson
15
+	 * @since 				4.8.0
16
+	 *
17
+	 */
18 18
 class EE_Single_Registration_Line_Item_Filter extends EE_Specific_Registrations_Line_Item_Filter {
19 19
 
20 20
 	/**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 /**
6 6
  * Class EE_Single_Registration_Line_Item_Filter
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 	 *
22 22
 	 * @param EE_Registration $registration
23 23
 	 */
24
-	public function __construct( $registration ) {
25
-		parent::__construct( array( $registration ) );
24
+	public function __construct($registration) {
25
+		parent::__construct(array($registration));
26 26
 	}
27 27
 }
28 28
 // End of file EE_Single_Registration_Line_Item_Filter.class.php
Please login to merge, or discard this patch.