Completed
Branch FET-10325-remove-caffeinated-m... (ba33af)
by
unknown
34:17 queued 23:38
created
core/db_models/fields/EE_Foreign_Key_String_Field.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -3,22 +3,22 @@
 block discarded – undo
3 3
 
4 4
 class EE_Foreign_Key_String_Field extends EE_Foreign_Key_Field_Base
5 5
 {
6
-    function get_wpdb_data_type()
7
-    {
8
-        return '%s';
9
-    }
6
+	function get_wpdb_data_type()
7
+	{
8
+		return '%s';
9
+	}
10 10
 
11
-    /**
12
-     * removes all tags when setting
13
-     *
14
-     * @param string $value_inputted_for_field_on_model_object
15
-     * @return string
16
-     */
17
-    function prepare_for_set($value_inputted_for_field_on_model_object)
18
-    {
19
-        if ($this->is_model_obj_of_type_pointed_to($value_inputted_for_field_on_model_object)) {
20
-            $value_inputted_for_field_on_model_object = $value_inputted_for_field_on_model_object->ID();
21
-        }
22
-        return strtoupper(wp_strip_all_tags($value_inputted_for_field_on_model_object));
23
-    }
11
+	/**
12
+	 * removes all tags when setting
13
+	 *
14
+	 * @param string $value_inputted_for_field_on_model_object
15
+	 * @return string
16
+	 */
17
+	function prepare_for_set($value_inputted_for_field_on_model_object)
18
+	{
19
+		if ($this->is_model_obj_of_type_pointed_to($value_inputted_for_field_on_model_object)) {
20
+			$value_inputted_for_field_on_model_object = $value_inputted_for_field_on_model_object->ID();
21
+		}
22
+		return strtoupper(wp_strip_all_tags($value_inputted_for_field_on_model_object));
23
+	}
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require_once(EE_MODELS . 'fields/EE_Foreign_Key_Field_Base.php');
2
+require_once(EE_MODELS.'fields/EE_Foreign_Key_Field_Base.php');
3 3
 
4 4
 class EE_Foreign_Key_Int_Field extends EE_Foreign_Key_Field_Base
5 5
 {
Please login to merge, or discard this patch.
core/db_models/fields/EE_Trashed_Flag_Field.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,6 +3,6 @@
 block discarded – undo
3 3
 
4 4
 class EE_Trashed_Flag_Field extends EE_Boolean_Field
5 5
 {
6
-    //note: some client code simply checks if a field IS an EE_Trashed_Flag_Field
7
-    //...otherwise, these fields are mostly the same as boolean fields
6
+	//note: some client code simply checks if a field IS an EE_Trashed_Flag_Field
7
+	//...otherwise, these fields are mostly the same as boolean fields
8 8
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require_once(EE_MODELS . 'fields/EE_Boolean_Field.php');
2
+require_once(EE_MODELS.'fields/EE_Boolean_Field.php');
3 3
 
4 4
 class EE_Trashed_Flag_Field extends EE_Boolean_Field
5 5
 {
Please login to merge, or discard this patch.
core/db_models/fields/EE_Foreign_Key_Field_Base.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
  */
8 8
 abstract class EE_Foreign_Key_Field_Base extends EE_Field_With_Model_Name
9 9
 {
10
-    //all needed functionality inherited from parent
10
+	//all needed functionality inherited from parent
11 11
 }
Please login to merge, or discard this patch.
core/db_models/fields/EE_Integer_Field.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,18 +6,18 @@
 block discarded – undo
6 6
  */
7 7
 class EE_Integer_Field extends EE_Model_Field_Base
8 8
 {
9
-    function get_wpdb_data_type()
10
-    {
11
-        return '%d';
12
-    }
9
+	function get_wpdb_data_type()
10
+	{
11
+		return '%d';
12
+	}
13 13
 
14
-    function prepare_for_set($value_inputted_for_field_on_model_object)
15
-    {
16
-        return intval($value_inputted_for_field_on_model_object);
17
-    }
14
+	function prepare_for_set($value_inputted_for_field_on_model_object)
15
+	{
16
+		return intval($value_inputted_for_field_on_model_object);
17
+	}
18 18
 
19
-    function prepare_for_set_from_db($value_inputted_for_field_on_model_object)
20
-    {
21
-        return intval($value_inputted_for_field_on_model_object);
22
-    }
19
+	function prepare_for_set_from_db($value_inputted_for_field_on_model_object)
20
+	{
21
+		return intval($value_inputted_for_field_on_model_object);
22
+	}
23 23
 }
Please login to merge, or discard this patch.
core/db_models/fields/EE_All_Caps_Text_Field.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 block discarded – undo
6 6
  */
7 7
 class EE_All_Caps_Text_Field extends EE_Text_Field_Base
8 8
 {
9
-    function get_wpdb_data_type()
10
-    {
11
-        return '%s';
12
-    }
9
+	function get_wpdb_data_type()
10
+	{
11
+		return '%s';
12
+	}
13 13
 
14
-    /**
15
-     * makes it all upper case, and key-like
16
-     *
17
-     * @param string $value_inputted_for_field_on_model_object
18
-     * @return string
19
-     */
20
-    function prepare_for_set($value_inputted_for_field_on_model_object)
21
-    {
22
-        return strtoupper(sanitize_key($value_inputted_for_field_on_model_object));
23
-    }
14
+	/**
15
+	 * makes it all upper case, and key-like
16
+	 *
17
+	 * @param string $value_inputted_for_field_on_model_object
18
+	 * @return string
19
+	 */
20
+	function prepare_for_set($value_inputted_for_field_on_model_object)
21
+	{
22
+		return strtoupper(sanitize_key($value_inputted_for_field_on_model_object));
23
+	}
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
core/db_models/fields/EE_WP_User_Field.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php if (! defined('EVENT_ESPRESSO_VERSION')) {
2
-    exit('No direct script access allowed');
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 
5 5
 /**
@@ -24,34 +24,34 @@  discard block
 block discarded – undo
24 24
  */
25 25
 class EE_WP_User_Field extends EE_Foreign_Key_Int_Field
26 26
 {
27
-    /**
28
-     * No need to provide a default or the model pointed to- the default is
29
-     * always get_current_user_id() and the model pointed to is always WP_User
30
-     *
31
-     * @param string  $table_column name fo column for field
32
-     * @param string  $nicename     should eb internationalized with __('blah','event_espresso')
33
-     * @param boolean $nullable
34
-     */
35
-    function __construct($table_column, $nicename, $nullable)
36
-    {
37
-        parent::__construct($table_column, $nicename, $nullable, null, 'WP_User');
38
-    }
27
+	/**
28
+	 * No need to provide a default or the model pointed to- the default is
29
+	 * always get_current_user_id() and the model pointed to is always WP_User
30
+	 *
31
+	 * @param string  $table_column name fo column for field
32
+	 * @param string  $nicename     should eb internationalized with __('blah','event_espresso')
33
+	 * @param boolean $nullable
34
+	 */
35
+	function __construct($table_column, $nicename, $nullable)
36
+	{
37
+		parent::__construct($table_column, $nicename, $nullable, null, 'WP_User');
38
+	}
39 39
 
40
-    /**
41
-     * Gets the default which is always the current user. This can't be set when initially
42
-     * constructing the model field because that's done before $current_user is set
43
-     *
44
-     * @return mixed
45
-     */
46
-    function get_default_value()
47
-    {
48
-        if (did_action('init')) {
49
-            return get_current_user_id();
50
-        } else {
51
-            EE_Error::doing_it_wrong('EE_WP_User_Field::get_default_value',
52
-                __('You cant get a default value for a wp_User_Field because the "init" action is called, because current_user global hasnt yet been setup. Consider doing your business logic on the "init" hook or later.',
53
-                    'event_espresso'), '4.6.20');
54
-            return 1;
55
-        }
56
-    }
40
+	/**
41
+	 * Gets the default which is always the current user. This can't be set when initially
42
+	 * constructing the model field because that's done before $current_user is set
43
+	 *
44
+	 * @return mixed
45
+	 */
46
+	function get_default_value()
47
+	{
48
+		if (did_action('init')) {
49
+			return get_current_user_id();
50
+		} else {
51
+			EE_Error::doing_it_wrong('EE_WP_User_Field::get_default_value',
52
+				__('You cant get a default value for a wp_User_Field because the "init" action is called, because current_user global hasnt yet been setup. Consider doing your business logic on the "init" hook or later.',
53
+					'event_espresso'), '4.6.20');
54
+			return 1;
55
+		}
56
+	}
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if (! defined('EVENT_ESPRESSO_VERSION')) {
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2 2
     exit('No direct script access allowed');
3 3
 }
4 4
 
Please login to merge, or discard this patch.
core/db_models/fields/EE_Maybe_Serialized_Simple_HTML_Field.php 2 patches
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php if (! defined('EVENT_ESPRESSO_VERSION')) {
2
-    exit('No direct script access allowed');
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 
5 5
 /**
@@ -14,56 +14,56 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class EE_Maybe_Serialized_Simple_HTML_Field extends EE_Maybe_Serialized_Text_Field
16 16
 {
17
-    /**
18
-     * removes all non-basic tags when setting
19
-     *
20
-     * @param string $value_inputted_for_field_on_model_object
21
-     * @return string
22
-     */
23
-    function prepare_for_set($value_inputted_for_field_on_model_object)
24
-    {
25
-        return parent::prepare_for_set($this->_remove_tags($value_inputted_for_field_on_model_object));
26
-    }
17
+	/**
18
+	 * removes all non-basic tags when setting
19
+	 *
20
+	 * @param string $value_inputted_for_field_on_model_object
21
+	 * @return string
22
+	 */
23
+	function prepare_for_set($value_inputted_for_field_on_model_object)
24
+	{
25
+		return parent::prepare_for_set($this->_remove_tags($value_inputted_for_field_on_model_object));
26
+	}
27 27
 
28
-    /**
29
-     * Remove any non-"simple" html tags. @see EE_Simple_HTML_Field
30
-     *
31
-     * @param array|string $value
32
-     * @return array|string
33
-     */
34
-    protected function _remove_tags($value)
35
-    {
36
-        if (is_array($value)) {
37
-            foreach ($value as $key => $v) {
38
-                $value[$key] = $this->_remove_tags($v);
39
-            }
40
-        } elseif (is_string($value)) {
41
-            $value = wp_kses("$value", $this->_get_allowed_tags());
42
-        }
43
-        return $value;
44
-    }
28
+	/**
29
+	 * Remove any non-"simple" html tags. @see EE_Simple_HTML_Field
30
+	 *
31
+	 * @param array|string $value
32
+	 * @return array|string
33
+	 */
34
+	protected function _remove_tags($value)
35
+	{
36
+		if (is_array($value)) {
37
+			foreach ($value as $key => $v) {
38
+				$value[$key] = $this->_remove_tags($v);
39
+			}
40
+		} elseif (is_string($value)) {
41
+			$value = wp_kses("$value", $this->_get_allowed_tags());
42
+		}
43
+		return $value;
44
+	}
45 45
 
46
-    /**
47
-     * In case unsafe data somehow got inserted into the database, we want to remove tags again
48
-     *
49
-     * @param array|string $value_found_in_db_for_model_object
50
-     * @return array|string
51
-     */
52
-    function prepare_for_set_from_db($value_found_in_db_for_model_object)
53
-    {
54
-        return $this->_remove_tags(parent::prepare_for_set_from_db($value_found_in_db_for_model_object));
55
-    }
46
+	/**
47
+	 * In case unsafe data somehow got inserted into the database, we want to remove tags again
48
+	 *
49
+	 * @param array|string $value_found_in_db_for_model_object
50
+	 * @return array|string
51
+	 */
52
+	function prepare_for_set_from_db($value_found_in_db_for_model_object)
53
+	{
54
+		return $this->_remove_tags(parent::prepare_for_set_from_db($value_found_in_db_for_model_object));
55
+	}
56 56
 
57 57
 
58
-    /**
59
-     * Determines what tags to allow in this model field
60
-     *
61
-     * @global array $allowedtags
62
-     * @return array
63
-     */
64
-    function _get_allowed_tags()
65
-    {
66
-        return apply_filters('FHEE__EE_Maybe_Serialized_Simple_HTML_Field___get_allowed_tags',
67
-            EEH_HTML::get_simple_tags(), $this);
68
-    }
58
+	/**
59
+	 * Determines what tags to allow in this model field
60
+	 *
61
+	 * @global array $allowedtags
62
+	 * @return array
63
+	 */
64
+	function _get_allowed_tags()
65
+	{
66
+		return apply_filters('FHEE__EE_Maybe_Serialized_Simple_HTML_Field___get_allowed_tags',
67
+			EEH_HTML::get_simple_tags(), $this);
68
+	}
69 69
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php if (! defined('EVENT_ESPRESSO_VERSION')) {
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2 2
     exit('No direct script access allowed');
3 3
 }
4 4
 
Please login to merge, or discard this patch.
core/db_models/fields/EE_Simple_HTML_Field.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,16 +8,16 @@
 block discarded – undo
8 8
  */
9 9
 class EE_Simple_HTML_Field extends EE_Text_Field_Base
10 10
 {
11
-    /**
12
-     * removes all tags when setting
13
-     *
14
-     * @param string $value_inputted_for_field_on_model_object
15
-     * @return string
16
-     */
17
-    function prepare_for_set($value_inputted_for_field_on_model_object)
18
-    {
19
-        $value_with_select_tags = wp_kses("$value_inputted_for_field_on_model_object", EEH_HTML::get_simple_tags());
20
-        return parent::prepare_for_set($value_with_select_tags);
21
-    }
11
+	/**
12
+	 * removes all tags when setting
13
+	 *
14
+	 * @param string $value_inputted_for_field_on_model_object
15
+	 * @return string
16
+	 */
17
+	function prepare_for_set($value_inputted_for_field_on_model_object)
18
+	{
19
+		$value_with_select_tags = wp_kses("$value_inputted_for_field_on_model_object", EEH_HTML::get_simple_tags());
20
+		return parent::prepare_for_set($value_with_select_tags);
21
+	}
22 22
 
23 23
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require_once(EE_MODELS . 'fields/EE_Text_Field_Base.php');
2
+require_once(EE_MODELS.'fields/EE_Text_Field_Base.php');
3 3
 
4 4
 class EE_Plain_Text_Field extends EE_Text_Field_Base
5 5
 {
Please login to merge, or discard this patch.
core/db_models/fields/EE_Slug_Field.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@
 block discarded – undo
3 3
 
4 4
 class EE_Slug_Field extends EE_Text_Field_Base
5 5
 {
6
-    /**
7
-     * ensures string is usable in URLs
8
-     *
9
-     * @param string $value_inputted_for_field_on_model_object
10
-     * @return string
11
-     */
12
-    function prepare_for_set($value_inputted_for_field_on_model_object)
13
-    {
14
-        //reminder: function prepares for use in URLs, not making human-readable.
15
-        return sanitize_title($value_inputted_for_field_on_model_object);
16
-    }
6
+	/**
7
+	 * ensures string is usable in URLs
8
+	 *
9
+	 * @param string $value_inputted_for_field_on_model_object
10
+	 * @return string
11
+	 */
12
+	function prepare_for_set($value_inputted_for_field_on_model_object)
13
+	{
14
+		//reminder: function prepares for use in URLs, not making human-readable.
15
+		return sanitize_title($value_inputted_for_field_on_model_object);
16
+	}
17 17
 }
18 18
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require_once(EE_MODELS . 'fields/EE_Text_Field_Base.php');
2
+require_once(EE_MODELS.'fields/EE_Text_Field_Base.php');
3 3
 
4 4
 class EE_Plain_Text_Field extends EE_Text_Field_Base
5 5
 {
Please login to merge, or discard this patch.