Completed
Branch FET-9414-allow-prices-to-be-mo... (2c9812)
by
unknown
06:05 queued 03:42
created
core/db_models/fields/EE_Foreign_Key_String_Field.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once( EE_MODELS . 'fields/EE_Foreign_Key_Field_Base.php');
3
-class EE_Foreign_Key_String_Field extends EE_Foreign_Key_Field_Base{
4
-	function get_wpdb_data_type(){
2
+require_once(EE_MODELS.'fields/EE_Foreign_Key_Field_Base.php');
3
+class EE_Foreign_Key_String_Field extends EE_Foreign_Key_Field_Base {
4
+	function get_wpdb_data_type() {
5 5
 		return '%s';
6 6
 	}
7 7
 	/**
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 	 * @return string
11 11
 	 */
12 12
 	function prepare_for_set($value_inputted_for_field_on_model_object) {
13
-		if($this->is_model_obj_of_type_pointed_to($value_inputted_for_field_on_model_object)){
13
+		if ($this->is_model_obj_of_type_pointed_to($value_inputted_for_field_on_model_object)) {
14 14
 			$value_inputted_for_field_on_model_object = $value_inputted_for_field_on_model_object->ID();
15 15
 		}
16 16
 		return strtoupper(wp_strip_all_tags($value_inputted_for_field_on_model_object));
Please login to merge, or discard this patch.
core/db_models/fields/EE_Full_HTML_Field.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once( EE_MODELS . 'fields/EE_Text_Field_Base.php' );
3
-class EE_Full_HTML_Field extends EE_Text_Field_Base{
2
+require_once(EE_MODELS.'fields/EE_Text_Field_Base.php');
3
+class EE_Full_HTML_Field extends EE_Text_Field_Base {
4 4
 
5 5
 
6 6
 	/**
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
 	 * @return string
11 11
 	 */
12 12
 	function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) {
13
-		if($schema =='form_input'){
13
+		if ($schema == 'form_input') {
14 14
 			return parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema);
15
-		}elseif($schema == 'no_wpautop'){
15
+		}elseif ($schema == 'no_wpautop') {
16 16
 			return do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema));
17
-		}else{
17
+		} else {
18 18
 			return wpautop(do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema)));
19 19
 		}
20 20
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
12 12
 	function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) {
13 13
 		if($schema =='form_input'){
14 14
 			return parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema);
15
-		}elseif($schema == 'no_wpautop'){
15
+		} elseif($schema == 'no_wpautop'){
16 16
 			return do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema));
17
-		}else{
17
+		} else{
18 18
 			return wpautop(do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema)));
19 19
 		}
20 20
 	}
Please login to merge, or discard this patch.
core/db_models/fields/EE_Integer_Field.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 /**
4 4
  * Text_Fields is a base class for any fields which are have integer value. (Exception: foreign and private key fields. Wish PHP had multiple-inheritance for this...)
5 5
  */
6
-class EE_Integer_Field extends EE_Model_Field_Base{
7
-	function get_wpdb_data_type(){
6
+class EE_Integer_Field extends EE_Model_Field_Base {
7
+	function get_wpdb_data_type() {
8 8
 		return '%d';
9 9
 	}
10 10
 	function prepare_for_set($value_inputted_for_field_on_model_object) {
Please login to merge, or discard this patch.
core/db_models/fields/EE_Maybe_Serialized_Simple_HTML_Field.php 3 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
@@ -44,7 +46,7 @@  discard block
 block discarded – undo
44 46
 			foreach( $value as $key => $v ) {
45 47
 				$value[ $key ] = $this->_remove_tags( $v );
46 48
 			}
47
-		}elseif( is_string( $value ) ) {
49
+		} elseif( is_string( $value ) ) {
48 50
 			$value = wp_kses("$value", $this->_get_allowed_tags() );
49 51
 		}
50 52
 		return $value;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@  discard block
 block discarded – undo
24 24
  * But either way, the string or the array's values can ONLY contain simple HTML tags.
25 25
  * If you want to allow Full HTML in the value, use EE_Maybe_Serialized_Text_Field
26 26
  */
27
-class EE_Maybe_Serialized_Simple_HTML_Field extends EE_Maybe_Serialized_Text_Field{
27
+class EE_Maybe_Serialized_Simple_HTML_Field extends EE_Maybe_Serialized_Text_Field {
28 28
 	/**
29 29
 	 * removes all non-basic tags when setting
30 30
 	 * @param string $value_inputted_for_field_on_model_object
31 31
 	 * @return string
32 32
 	 */
33 33
 	function prepare_for_set($value_inputted_for_field_on_model_object) {
34
-		return parent::prepare_for_set( $this->_remove_tags(  $value_inputted_for_field_on_model_object ) );
34
+		return parent::prepare_for_set($this->_remove_tags($value_inputted_for_field_on_model_object));
35 35
 	}
36 36
 
37 37
 	/**
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
 	 * @param array|string $value
40 40
 	 * @return array|string
41 41
 	 */
42
-	protected function _remove_tags( $value ) {
43
-		if( is_array( $value ) ) {
44
-			foreach( $value as $key => $v ) {
45
-				$value[ $key ] = $this->_remove_tags( $v );
42
+	protected function _remove_tags($value) {
43
+		if (is_array($value)) {
44
+			foreach ($value as $key => $v) {
45
+				$value[$key] = $this->_remove_tags($v);
46 46
 			}
47
-		}elseif( is_string( $value ) ) {
48
-			$value = wp_kses("$value", $this->_get_allowed_tags() );
47
+		}elseif (is_string($value)) {
48
+			$value = wp_kses("$value", $this->_get_allowed_tags());
49 49
 		}
50 50
 		return $value;
51 51
 	}
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 * @return array|string
57 57
 	 */
58 58
 	function prepare_for_set_from_db($value_found_in_db_for_model_object) {
59
-		return $this->_remove_tags( parent::prepare_for_set_from_db( $value_found_in_db_for_model_object ) );
59
+		return $this->_remove_tags(parent::prepare_for_set_from_db($value_found_in_db_for_model_object));
60 60
 	}
61 61
 
62 62
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 * @global array $allowedtags
66 66
 	 * @return array
67 67
 	 */
68
-	function _get_allowed_tags(){
69
-		return apply_filters( 'FHEE__EE_Maybe_Serialized_Simple_HTML_Field___get_allowed_tags', EEH_HTML::get_simple_tags(), $this );
68
+	function _get_allowed_tags() {
69
+		return apply_filters('FHEE__EE_Maybe_Serialized_Simple_HTML_Field___get_allowed_tags', EEH_HTML::get_simple_tags(), $this);
70 70
 	}
71 71
 }
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,6 @@
 block discarded – undo
19 19
  * @package			Event Espresso
20 20
  * @subpackage		includes/models/
21 21
  * @author				Michael Nelson
22
-
23 22
  * Model field for representing a column that CAN contain serialized text, or a regular string.
24 23
  * But either way, the string or the array's values can ONLY contain simple HTML tags.
25 24
  * If you want to allow Full HTML in the value, use EE_Maybe_Serialized_Text_Field
Please login to merge, or discard this patch.
core/db_models/fields/EE_Maybe_Serialized_Text_Field.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@  discard block
 block discarded – undo
4 4
 /**
5 5
  * For a db text column, which can either be an array in PHP code or a string.
6 6
  */
7
-require_once( EE_MODELS . 'fields/EE_Text_Field_Base.php' );
8
-class EE_Maybe_Serialized_Text_Field extends EE_Serialized_Text_Field{
7
+require_once(EE_MODELS.'fields/EE_Text_Field_Base.php');
8
+class EE_Maybe_Serialized_Text_Field extends EE_Serialized_Text_Field {
9 9
 	/**
10 10
 	 * Value could be an array or a string. If its an array, serialize it. Otherwise, leave it as a string
11 11
 	 * @param array|string $value_of_field_on_model_object
12 12
 	 * @return string (possibly serialized)
13 13
 	 */
14 14
 	function prepare_for_use_in_db($value_of_field_on_model_object) {
15
-		if(is_array($value_of_field_on_model_object)){
15
+		if (is_array($value_of_field_on_model_object)) {
16 16
 			return parent::prepare_for_use_in_db($value_of_field_on_model_object);
17
-		}else{
17
+		} else {
18 18
 			return $value_of_field_on_model_object;
19 19
 		}
20 20
 	}
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
 	function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) {
28 28
 		$pretty_value = null;
29
-		if(is_array($value_on_field_to_be_outputted)){
29
+		if (is_array($value_on_field_to_be_outputted)) {
30 30
 			$pretty_value = parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema);
31
-		}else{
31
+		} else {
32 32
 			$pretty_value = $value_on_field_to_be_outputted;
33 33
 		}
34 34
 		return $pretty_value;
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	function prepare_for_use_in_db($value_of_field_on_model_object) {
15 15
 		if(is_array($value_of_field_on_model_object)){
16 16
 			return parent::prepare_for_use_in_db($value_of_field_on_model_object);
17
-		}else{
17
+		} else{
18 18
 			return $value_of_field_on_model_object;
19 19
 		}
20 20
 	}
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		$pretty_value = null;
29 29
 		if(is_array($value_on_field_to_be_outputted)){
30 30
 			$pretty_value = parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema);
31
-		}else{
31
+		} else{
32 32
 			$pretty_value = $value_on_field_to_be_outputted;
33 33
 		}
34 34
 		return $pretty_value;
Please login to merge, or discard this patch.
core/db_models/fields/EE_Model_Field_Base.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  *
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * @subpackage    /core/db_models/fields/EE_Model_Field_Base.php
19 19
  * @author 				Michael Nelson
20 20
  */
21
-abstract class EE_Model_Field_Base{
21
+abstract class EE_Model_Field_Base {
22 22
 	var $_table_alias;
23 23
 	var $_table_column;
24 24
 	var $_name;
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * @param      $nullable
35 35
 	 * @param null $default_value
36 36
 	 */
37
-	function __construct($table_column, $nicename, $nullable, $default_value = null){
37
+	function __construct($table_column, $nicename, $nullable, $default_value = null) {
38 38
 		$this->_table_column = $table_column;
39 39
 		$this->_nicename = $nicename;
40 40
 		$this->_nullable = $nullable;
@@ -48,22 +48,22 @@  discard block
 block discarded – undo
48 48
 	 * @param $name
49 49
 	 * @param $model_name
50 50
 	 */
51
-	function _construct_finalize($table_alias, $name, $model_name){
51
+	function _construct_finalize($table_alias, $name, $model_name) {
52 52
 		$this->_table_alias = $table_alias;
53 53
 		$this->_name = $name;
54 54
 		$this->_model_name = $model_name;
55 55
 	}
56
-	function get_table_alias(){
56
+	function get_table_alias() {
57 57
 		return $this->_table_alias;
58 58
 	}
59
-	function get_table_column(){
59
+	function get_table_column() {
60 60
 		return $this->_table_column;
61 61
 	}
62 62
 	/**
63 63
 	 * Returns the name of the model this field is on. Eg 'Event' or 'Ticket_Datetime'
64 64
 	 * @return string
65 65
 	 */
66
-	function get_model_name(){
66
+	function get_model_name() {
67 67
 		return $this->_model_name;
68 68
 	}
69 69
 
@@ -71,17 +71,17 @@  discard block
 block discarded – undo
71 71
 	 * @throws \EE_Error
72 72
 	 * @return string
73 73
 	 */
74
-	function get_name(){
75
-		if($this->_name){
74
+	function get_name() {
75
+		if ($this->_name) {
76 76
 			return $this->_name;
77
-		}else{
78
-			throw new EE_Error(sprintf(__("Model field '%s' has no name set. Did you make a model and forget to call the parent model constructor?", "event_espresso"),get_class($this)));
77
+		} else {
78
+			throw new EE_Error(sprintf(__("Model field '%s' has no name set. Did you make a model and forget to call the parent model constructor?", "event_espresso"), get_class($this)));
79 79
 		}
80 80
 	}
81
-	function get_nicename(){
81
+	function get_nicename() {
82 82
 		return $this->_nicename;
83 83
 	}
84
-	function is_nullable(){
84
+	function is_nullable() {
85 85
 		return $this->_nullable;
86 86
 	}
87 87
 	/**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * on insertion it can be null. However, on updates it must be present.
90 90
 	 * @return boolean
91 91
 	 */
92
-	function is_auto_increment(){
92
+	function is_auto_increment() {
93 93
 		return false;
94 94
 	}
95 95
 	/**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 * value domains at the top of EEM_Base
98 98
 	 * @return mixed
99 99
 	 */
100
-	function get_default_value(){
100
+	function get_default_value() {
101 101
 		return $this->_default_value;
102 102
 	}
103 103
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 * in the current query
109 109
 	 * @return string
110 110
 	 */
111
-	function get_qualified_column(){
111
+	function get_qualified_column() {
112 112
 		return $this->get_table_alias().".".$this->get_table_column();
113 113
 	}
114 114
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * @param mixed $value_of_field_on_model_object
120 120
 	 * @return mixed
121 121
 	 */
122
-	function prepare_for_get($value_of_field_on_model_object){
122
+	function prepare_for_get($value_of_field_on_model_object) {
123 123
 		return $value_of_field_on_model_object;
124 124
 	}
125 125
 	/**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @param mixed $value_of_field_on_model_object
130 130
 	 * @return mixed
131 131
 	 */
132
-	function prepare_for_use_in_db($value_of_field_on_model_object){
132
+	function prepare_for_use_in_db($value_of_field_on_model_object) {
133 133
 		return $value_of_field_on_model_object;
134 134
 	}
135 135
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 * @param mixed $value_inputted_for_field_on_model_object
141 141
 	 * @return mixed
142 142
 	 */
143
-	function prepare_for_set($value_inputted_for_field_on_model_object){
143
+	function prepare_for_set($value_inputted_for_field_on_model_object) {
144 144
 		return $value_inputted_for_field_on_model_object;
145 145
 	}
146 146
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 * @param mixed $value_found_in_db_for_model_object
152 152
 	 * @return mixed
153 153
 	 */
154
-	function prepare_for_set_from_db($value_found_in_db_for_model_object){
154
+	function prepare_for_set_from_db($value_found_in_db_for_model_object) {
155 155
 		return $this->prepare_for_set($value_found_in_db_for_model_object);
156 156
 	}
157 157
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 * @param mixed $value_on_field_to_be_outputted
163 163
 	 * @return mixed
164 164
 	 */
165
-	function prepare_for_pretty_echoing( $value_on_field_to_be_outputted ){
165
+	function prepare_for_pretty_echoing($value_on_field_to_be_outputted) {
166 166
 		return $value_on_field_to_be_outputted;
167 167
 	}
168 168
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	 * By default, all fields aren't db-only.
178 178
 	 * @return boolean
179 179
 	 */
180
-	function is_db_only_field(){
180
+	function is_db_only_field() {
181 181
 		return false;
182 182
 	}
183 183
 }
184 184
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 	function get_name(){
75 75
 		if($this->_name){
76 76
 			return $this->_name;
77
-		}else{
77
+		} else{
78 78
 			throw new EE_Error(sprintf(__("Model field '%s' has no name set. Did you make a model and forget to call the parent model constructor?", "event_espresso"),get_class($this)));
79 79
 		}
80 80
 	}
Please login to merge, or discard this patch.
core/db_models/fields/EE_Money_Field.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 		if($schema == 'no_currency_code'){
26 26
 //			echo "schema no currency!";
27 27
 			$display_code = false;
28
-		}else{
28
+		} else{
29 29
 			$display_code = true;
30 30
 		}
31 31
 		//we don't use the $pretty_float because format_currency will take care of it.
Please login to merge, or discard this patch.
Spacing   +21 added lines, -22 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 /**
3 3
  * Text_Fields is a base class for any fields which are have float value. (Exception: foreign and private key fields. Wish PHP had multiple-inheritance for this...)
4 4
  */
5
-class EE_Money_Field extends EE_Float_Field{
5
+class EE_Money_Field extends EE_Float_Field {
6 6
 	protected $_whole_pennies_only;
7 7
 	/**
8 8
 	 * 
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
 	 * @param boolean $whole_pennies_only if TRUE (default) then the internal representation of this 
14 14
 	 *	amount will be rounded to a whole penny. If FALSE, then it can be arbitrarily precise
15 15
 	 */
16
-	public function __construct( $table_column, $nicename, $nullable,
17
-		$default_value = null, $whole_pennies_only = true ) {
16
+	public function __construct($table_column, $nicename, $nullable,
17
+		$default_value = null, $whole_pennies_only = true) {
18 18
 		$this->_whole_pennies_only = $whole_pennies_only;
19
-		parent::__construct( $table_column,
19
+		parent::__construct($table_column,
20 20
 			$nicename,
21 21
 			$nullable,
22
-			$default_value );
22
+			$default_value);
23 23
 	}
24 24
 	
25 25
 	/**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		return $this->_whole_pennies_only;
31 31
 	}
32 32
 	
33
-	function get_wpdb_data_type(){
33
+	function get_wpdb_data_type() {
34 34
 		return '%f';
35 35
 	}
36 36
 	/**
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 	 * @param type $schema
43 43
 	 * @return string
44 44
 	 */
45
-	function prepare_for_pretty_echoing($value_on_field_to_be_outputted,$schema = null){
46
-		if( $schema === 'localized_float') {
47
-			$local_float_with_whole_pennies = number_format( $value_on_field_to_be_outputted, EE_Config::instance()->currency->dec_plc, EE_Config::instance()->currency->dec_mrk, EE_Config::instance()->currency->thsnds) ;
48
-			if( $this->whole_pennies_only() ) {
45
+	function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) {
46
+		if ($schema === 'localized_float') {
47
+			$local_float_with_whole_pennies = number_format($value_on_field_to_be_outputted, EE_Config::instance()->currency->dec_plc, EE_Config::instance()->currency->dec_mrk, EE_Config::instance()->currency->thsnds);
48
+			if ($this->whole_pennies_only()) {
49 49
 				return $local_float_with_whole_pennies;
50 50
 			}
51
-			$local_float_arbitrary_precision = parent::prepare_for_pretty_echoing( $value_on_field_to_be_outputted );
51
+			$local_float_arbitrary_precision = parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted);
52 52
 			$pos_of_decimal_place = strpos( 
53 53
 				$local_float_arbitrary_precision, 
54 54
 				EE_Config::instance()->currency->dec_mrk 
@@ -58,23 +58,22 @@  discard block
 block discarded – undo
58 58
 						$local_float_arbitrary_precision,
59 59
 						$pos_of_decimal_place
60 60
 					)
61
-				) : 
62
-				0;
63
-			if( $local_float_arbitrary_precision_length_after_decimal <= EE_Config::instance()->currency->dec_plc ){ 
61
+				) : 0;
62
+			if ($local_float_arbitrary_precision_length_after_decimal <= EE_Config::instance()->currency->dec_plc) { 
64 63
 				return $local_float_with_whole_pennies;
65 64
 			} else {
66 65
 				return $local_float_arbitrary_precision;
67 66
 			}
68 67
 		}
69 68
 		
70
-		if($schema == 'no_currency_code'){
69
+		if ($schema == 'no_currency_code') {
71 70
 //			echo "schema no currency!";
72 71
 			$display_code = false;
73
-		}else{
72
+		} else {
74 73
 			$display_code = true;
75 74
 		}
76 75
 		//we don't use the $pretty_float because format_currency will take care of it.
77
-		return EEH_Template::format_currency( $value_on_field_to_be_outputted, false, $display_code );
76
+		return EEH_Template::format_currency($value_on_field_to_be_outputted, false, $display_code);
78 77
 	}
79 78
 
80 79
 	/**
@@ -89,12 +88,12 @@  discard block
 block discarded – undo
89 88
 		//now it's a float-style string or number
90 89
 		$float_val = parent::prepare_for_set($value_inputted_for_field_on_model_object);
91 90
 		//round to the correctly number of decimal places for this  currency
92
-		return $this->_round_if_no_partial_pennies( $float_val );
91
+		return $this->_round_if_no_partial_pennies($float_val);
93 92
 			
94 93
 	}
95 94
 
96 95
 	function prepare_for_get($value_of_field_on_model_object) {
97
-		return $this->_round_if_no_partial_pennies( parent::prepare_for_get($value_of_field_on_model_object) );
96
+		return $this->_round_if_no_partial_pennies(parent::prepare_for_get($value_of_field_on_model_object));
98 97
 	}
99 98
 	
100 99
 	/**
@@ -103,9 +102,9 @@  discard block
 block discarded – undo
103 102
 	 * @param type $amount
104 103
 	 * @return float
105 104
 	 */
106
-	protected function _round_if_no_partial_pennies( $amount ) {
107
-		if( $this->whole_pennies_only() ) {
108
-			return  EEH_Money::round_for_currency($amount,  EE_Registry::instance()->CFG->currency->code );
105
+	protected function _round_if_no_partial_pennies($amount) {
106
+		if ($this->whole_pennies_only()) {
107
+			return  EEH_Money::round_for_currency($amount, EE_Registry::instance()->CFG->currency->code);
109 108
 		} else {
110 109
 			return $amount;
111 110
 		}
Please login to merge, or discard this patch.
core/db_models/fields/EE_Plain_Text_Field.php 1 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
-require_once( EE_MODELS . 'fields/EE_Text_Field_Base.php' );
3
-class EE_Plain_Text_Field extends EE_Text_Field_Base{
2
+require_once(EE_MODELS.'fields/EE_Text_Field_Base.php');
3
+class EE_Plain_Text_Field extends EE_Text_Field_Base {
4 4
 	/**
5 5
 	 * removes all tags when setting
6 6
 	 * @param string $value_inputted_for_field_on_model_object
Please login to merge, or discard this patch.
core/db_models/fields/EE_Primary_Key_Field_Base.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2
-abstract class EE_Primary_Key_Field_Base extends EE_Field_With_Model_Name{
2
+abstract class EE_Primary_Key_Field_Base extends EE_Field_With_Model_Name {
3 3
 	/**
4 4
 	 * Overrides parent so it doesn't need to provide so many non-applicable fields
5 5
 	 * @param string $table_column
6 6
 	 * @param string $nicename
7 7
 	 */
8
-	public function __construct($table_column, $nicename,$default) {
8
+	public function __construct($table_column, $nicename, $default) {
9 9
 		parent::__construct($table_column, $nicename, false, $default, null);
10 10
 	}
11 11
 	/**
12 12
 	 * @param $table_alias
13 13
 	 * @param $name
14 14
 	 */
15
-	function _construct_finalize($table_alias, $name, $model_name){
15
+	function _construct_finalize($table_alias, $name, $model_name) {
16 16
 		$this->_model_name_pointed_to = $model_name;
17 17
 		parent::_construct_finalize($table_alias, $name, $model_name);
18 18
 	}
Please login to merge, or discard this patch.