Completed
Branch back-compat-edtr-taxes (752e0e)
by
unknown
12:08 queued 09:43
created
core/db_models/fields/EE_Full_HTML_Field.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -14,57 +14,57 @@
 block discarded – undo
14 14
 class EE_Full_HTML_Field extends EE_Text_Field_Base
15 15
 {
16 16
 
17
-    /**
18
-     * @param string $table_column
19
-     * @param string $nicename
20
-     * @param bool   $nullable
21
-     * @param null   $default_value
22
-     */
23
-    public function __construct($table_column, $nicename, $nullable, $default_value = null)
24
-    {
25
-        parent::__construct($table_column, $nicename, $nullable, $default_value);
26
-        $this->setSchemaType('object');
27
-    }
17
+	/**
18
+	 * @param string $table_column
19
+	 * @param string $nicename
20
+	 * @param bool   $nullable
21
+	 * @param null   $default_value
22
+	 */
23
+	public function __construct($table_column, $nicename, $nullable, $default_value = null)
24
+	{
25
+		parent::__construct($table_column, $nicename, $nullable, $default_value);
26
+		$this->setSchemaType('object');
27
+	}
28 28
 
29 29
 
30
-    /**
31
-     * Does shortcodes and auto-paragraphs the content (unless schema is 'no_wpautop')
32
-     *
33
-     * @param type $value_on_field_to_be_outputted
34
-     * @param type $schema
35
-     * @return string
36
-     */
37
-    public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null)
38
-    {
39
-        if ($schema == 'form_input') {
40
-            return parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema);
41
-        } elseif ($schema == 'no_wpautop') {
42
-            return do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema));
43
-        } else {
44
-            return wpautop(do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema)));
45
-        }
46
-    }
30
+	/**
31
+	 * Does shortcodes and auto-paragraphs the content (unless schema is 'no_wpautop')
32
+	 *
33
+	 * @param type $value_on_field_to_be_outputted
34
+	 * @param type $schema
35
+	 * @return string
36
+	 */
37
+	public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null)
38
+	{
39
+		if ($schema == 'form_input') {
40
+			return parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema);
41
+		} elseif ($schema == 'no_wpautop') {
42
+			return do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema));
43
+		} else {
44
+			return wpautop(do_shortcode(parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema)));
45
+		}
46
+	}
47 47
 
48 48
 
49 49
 
50
-    public function getSchemaProperties()
51
-    {
52
-        return array(
53
-            'raw' => array(
54
-                'description' =>  sprintf(
55
-                    esc_html__('%s - the value in the database.', 'event_espresso'),
56
-                    $this->get_nicename()
57
-                ),
58
-                'type' => 'string'
59
-            ),
60
-            'rendered' => array(
61
-                'description' =>  sprintf(
62
-                    esc_html__('%s - transformed for display.', 'event_espresso'),
63
-                    $this->get_nicename()
64
-                ),
65
-                'type' => 'string',
66
-                'readonly' => true
67
-            )
68
-        );
69
-    }
50
+	public function getSchemaProperties()
51
+	{
52
+		return array(
53
+			'raw' => array(
54
+				'description' =>  sprintf(
55
+					esc_html__('%s - the value in the database.', 'event_espresso'),
56
+					$this->get_nicename()
57
+				),
58
+				'type' => 'string'
59
+			),
60
+			'rendered' => array(
61
+				'description' =>  sprintf(
62
+					esc_html__('%s - transformed for display.', 'event_espresso'),
63
+					$this->get_nicename()
64
+				),
65
+				'type' => 'string',
66
+				'readonly' => true
67
+			)
68
+		);
69
+	}
70 70
 }
Please login to merge, or discard this patch.
core/db_models/fields/EE_Infinite_Integer_Field.php 1 patch
Indentation   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -10,78 +10,78 @@
 block discarded – undo
10 10
 class EE_Infinite_Integer_Field extends EE_Model_Field_Base
11 11
 {
12 12
 
13
-    /**
14
-     * @param string $table_column
15
-     * @param string $nicename
16
-     * @param bool   $nullable
17
-     * @param null   $default_value
18
-     */
19
-    public function __construct($table_column, $nicename, $nullable, $default_value = null)
20
-    {
21
-        parent::__construct($table_column, $nicename, $nullable, $default_value);
22
-        $this->setSchemaType(array('integer', 'null'));
23
-    }
13
+	/**
14
+	 * @param string $table_column
15
+	 * @param string $nicename
16
+	 * @param bool   $nullable
17
+	 * @param null   $default_value
18
+	 */
19
+	public function __construct($table_column, $nicename, $nullable, $default_value = null)
20
+	{
21
+		parent::__construct($table_column, $nicename, $nullable, $default_value);
22
+		$this->setSchemaType(array('integer', 'null'));
23
+	}
24 24
 
25 25
 
26
-    public function prepare_for_use_in_db($value_of_field_on_model_object)
27
-    {
28
-        if ($value_of_field_on_model_object === EE_INF) {
29
-            return EE_INF_IN_DB;
30
-        } else {
31
-            return intval($value_of_field_on_model_object);
32
-        }
33
-    }
26
+	public function prepare_for_use_in_db($value_of_field_on_model_object)
27
+	{
28
+		if ($value_of_field_on_model_object === EE_INF) {
29
+			return EE_INF_IN_DB;
30
+		} else {
31
+			return intval($value_of_field_on_model_object);
32
+		}
33
+	}
34 34
 
35
-    public function prepare_for_set($value_inputted_for_field_on_model_object)
36
-    {
37
-        if (
38
-            $value_inputted_for_field_on_model_object === EE_INF_IN_DB ||
39
-            $value_inputted_for_field_on_model_object === EE_INF ||
40
-            $value_inputted_for_field_on_model_object === "EE_INF" ||
41
-            $value_inputted_for_field_on_model_object === ""
42
-        ) {
43
-            return EE_INF;
44
-        } else {
45
-            return intval($value_inputted_for_field_on_model_object);
46
-        }
47
-    }
35
+	public function prepare_for_set($value_inputted_for_field_on_model_object)
36
+	{
37
+		if (
38
+			$value_inputted_for_field_on_model_object === EE_INF_IN_DB ||
39
+			$value_inputted_for_field_on_model_object === EE_INF ||
40
+			$value_inputted_for_field_on_model_object === "EE_INF" ||
41
+			$value_inputted_for_field_on_model_object === ""
42
+		) {
43
+			return EE_INF;
44
+		} else {
45
+			return intval($value_inputted_for_field_on_model_object);
46
+		}
47
+	}
48 48
 
49
-    public function prepare_for_set_from_db($value_inputted_for_field_on_model_object)
50
-    {
51
-        $intval = intval($value_inputted_for_field_on_model_object);
52
-        if ($intval == EE_INF_IN_DB) {
53
-            return EE_INF;
54
-        } else {
55
-            return $intval;
56
-        }
57
-    }
49
+	public function prepare_for_set_from_db($value_inputted_for_field_on_model_object)
50
+	{
51
+		$intval = intval($value_inputted_for_field_on_model_object);
52
+		if ($intval == EE_INF_IN_DB) {
53
+			return EE_INF;
54
+		} else {
55
+			return $intval;
56
+		}
57
+	}
58 58
 
59
-    /**
60
-     * For outputting this field's value. If you want to output it into an input or something,
61
-     * use $schema=='input', as it will replace EE_INF with ''. If you want a readable version, use $schema=='text'
62
-     * as it will replace EE_INF with i18n Infinite
63
-     *
64
-     * @param type   $value_on_field_to_be_outputted
65
-     * @param string $schema input, symbol, text; or any string you want to show if the value equals EE_INF
66
-     * @return string
67
-     */
68
-    public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null)
69
-    {
70
-        if ($value_on_field_to_be_outputted === EE_INF) {
71
-            switch ($schema) {
72
-                case 'input':
73
-                case 'form_input':
74
-                    return '';
75
-                case 'symbol':
76
-                    return "∞";
77
-                case 'text':
78
-                case null:
79
-                    return esc_html__("Unlimited", "event_espresso");
80
-                default:
81
-                    return $schema;
82
-            }
83
-        } else {
84
-            return $value_on_field_to_be_outputted;
85
-        }
86
-    }
59
+	/**
60
+	 * For outputting this field's value. If you want to output it into an input or something,
61
+	 * use $schema=='input', as it will replace EE_INF with ''. If you want a readable version, use $schema=='text'
62
+	 * as it will replace EE_INF with i18n Infinite
63
+	 *
64
+	 * @param type   $value_on_field_to_be_outputted
65
+	 * @param string $schema input, symbol, text; or any string you want to show if the value equals EE_INF
66
+	 * @return string
67
+	 */
68
+	public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null)
69
+	{
70
+		if ($value_on_field_to_be_outputted === EE_INF) {
71
+			switch ($schema) {
72
+				case 'input':
73
+				case 'form_input':
74
+					return '';
75
+				case 'symbol':
76
+					return "∞";
77
+				case 'text':
78
+				case null:
79
+					return esc_html__("Unlimited", "event_espresso");
80
+				default:
81
+					return $schema;
82
+			}
83
+		} else {
84
+			return $value_on_field_to_be_outputted;
85
+		}
86
+	}
87 87
 }
Please login to merge, or discard this patch.
core/db_models/fields/EE_Money_Field.php 1 patch
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -7,92 +7,92 @@
 block discarded – undo
7 7
 class EE_Money_Field extends EE_Float_Field
8 8
 {
9 9
 
10
-    /**
11
-     * @param string $table_column
12
-     * @param string $nicename
13
-     * @param bool   $nullable
14
-     * @param null   $default_value
15
-     */
16
-    public function __construct($table_column, $nicename, $nullable, $default_value = null)
17
-    {
18
-        parent::__construct($table_column, $nicename, $nullable, $default_value);
19
-        $this->setSchemaType('object');
20
-    }
10
+	/**
11
+	 * @param string $table_column
12
+	 * @param string $nicename
13
+	 * @param bool   $nullable
14
+	 * @param null   $default_value
15
+	 */
16
+	public function __construct($table_column, $nicename, $nullable, $default_value = null)
17
+	{
18
+		parent::__construct($table_column, $nicename, $nullable, $default_value);
19
+		$this->setSchemaType('object');
20
+	}
21 21
 
22 22
 
23
-    /**
24
-     * Schemas:
25
-     *    'localized_float': "3,023.00"
26
-     *    'no_currency_code': "$3,023.00"
27
-     *    null: "$3,023.00<span>USD</span>"
28
-     *
29
-     * @param string $value_on_field_to_be_outputted
30
-     * @param string $schema
31
-     * @return string
32
-     */
33
-    public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null)
34
-    {
35
-        $pretty_float = parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted);
23
+	/**
24
+	 * Schemas:
25
+	 *    'localized_float': "3,023.00"
26
+	 *    'no_currency_code': "$3,023.00"
27
+	 *    null: "$3,023.00<span>USD</span>"
28
+	 *
29
+	 * @param string $value_on_field_to_be_outputted
30
+	 * @param string $schema
31
+	 * @return string
32
+	 */
33
+	public function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null)
34
+	{
35
+		$pretty_float = parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted);
36 36
 
37
-        if ($schema == 'localized_float') {
38
-            return $pretty_float;
39
-        }
40
-        if ($schema == 'no_currency_code') {
37
+		if ($schema == 'localized_float') {
38
+			return $pretty_float;
39
+		}
40
+		if ($schema == 'no_currency_code') {
41 41
 //          echo "schema no currency!";
42
-            $display_code = false;
43
-        } else {
44
-            $display_code = true;
45
-        }
46
-        // we don't use the $pretty_float because format_currency will take care of it.
47
-        return EEH_Template::format_currency($value_on_field_to_be_outputted, false, $display_code);
48
-    }
42
+			$display_code = false;
43
+		} else {
44
+			$display_code = true;
45
+		}
46
+		// we don't use the $pretty_float because format_currency will take care of it.
47
+		return EEH_Template::format_currency($value_on_field_to_be_outputted, false, $display_code);
48
+	}
49 49
 
50
-    /**
51
-     * If provided with a string, strips out money-related formatting to turn it into a proper float.
52
-     * Rounds the float to the correct number of decimal places for this country's currency.
53
-     * Also, interprets periods and commas according to the country's currency settings.
54
-     * So if you want to pass in a string that NEEDS to interpret periods as decimal marks, call floatval() on it first.
55
-     *
56
-     * @param string $value_inputted_for_field_on_model_object
57
-     * @return float
58
-     */
59
-    public function prepare_for_set($value_inputted_for_field_on_model_object)
60
-    {
61
-        // remove any currencies etc.
50
+	/**
51
+	 * If provided with a string, strips out money-related formatting to turn it into a proper float.
52
+	 * Rounds the float to the correct number of decimal places for this country's currency.
53
+	 * Also, interprets periods and commas according to the country's currency settings.
54
+	 * So if you want to pass in a string that NEEDS to interpret periods as decimal marks, call floatval() on it first.
55
+	 *
56
+	 * @param string $value_inputted_for_field_on_model_object
57
+	 * @return float
58
+	 */
59
+	public function prepare_for_set($value_inputted_for_field_on_model_object)
60
+	{
61
+		// remove any currencies etc.
62 62
 //      if(is_string($value_inputted_for_field_on_model_object)){
63 63
 //          $value_inputted_for_field_on_model_object = preg_replace("/[^0-9,.]/", "", $value_inputted_for_field_on_model_object);
64 64
 //      }
65
-        // now it's a float-style string or number
66
-        $float_val = parent::prepare_for_set($value_inputted_for_field_on_model_object);
67
-        // round to the correctly number of decimal places for this  currency
68
-        $rounded_value = round($float_val, EE_Registry::instance()->CFG->currency->dec_plc);
69
-        return $rounded_value;
70
-    }
65
+		// now it's a float-style string or number
66
+		$float_val = parent::prepare_for_set($value_inputted_for_field_on_model_object);
67
+		// round to the correctly number of decimal places for this  currency
68
+		$rounded_value = round($float_val, EE_Registry::instance()->CFG->currency->dec_plc);
69
+		return $rounded_value;
70
+	}
71 71
 
72
-    public function prepare_for_get($value_of_field_on_model_object)
73
-    {
74
-        $c = EE_Registry::instance()->CFG->currency;
75
-        return round(parent::prepare_for_get($value_of_field_on_model_object), $c->dec_plc);
76
-    }
72
+	public function prepare_for_get($value_of_field_on_model_object)
73
+	{
74
+		$c = EE_Registry::instance()->CFG->currency;
75
+		return round(parent::prepare_for_get($value_of_field_on_model_object), $c->dec_plc);
76
+	}
77 77
 
78
-    public function getSchemaProperties()
79
-    {
80
-        return array(
81
-            'raw' => array(
82
-                'description' =>  sprintf(
83
-                    esc_html__('%s - the raw value as it exists in the database as a simple float.', 'event_espresso'),
84
-                    $this->get_nicename()
85
-                ),
86
-                'type' => 'number',
87
-            ),
88
-            'pretty' => array(
89
-                'description' =>  sprintf(
90
-                    esc_html__('%s - formatted for display in the set currency and decimal places.', 'event_espresso'),
91
-                    $this->get_nicename()
92
-                ),
93
-                'type' => 'string',
94
-                'format' => 'money'
95
-            )
96
-        );
97
-    }
78
+	public function getSchemaProperties()
79
+	{
80
+		return array(
81
+			'raw' => array(
82
+				'description' =>  sprintf(
83
+					esc_html__('%s - the raw value as it exists in the database as a simple float.', 'event_espresso'),
84
+					$this->get_nicename()
85
+				),
86
+				'type' => 'number',
87
+			),
88
+			'pretty' => array(
89
+				'description' =>  sprintf(
90
+					esc_html__('%s - formatted for display in the set currency and decimal places.', 'event_espresso'),
91
+					$this->get_nicename()
92
+				),
93
+				'type' => 'string',
94
+				'format' => 'money'
95
+			)
96
+		);
97
+	}
98 98
 }
Please login to merge, or discard this patch.
core/domain/services/admin/events/data/ConfirmDeletion.php 1 patch
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -30,86 +30,86 @@
 block discarded – undo
30 30
  */
31 31
 class ConfirmDeletion
32 32
 {
33
-    /**
34
-     * @var NodeGroupDao
35
-     */
36
-    private $dao;
33
+	/**
34
+	 * @var NodeGroupDao
35
+	 */
36
+	private $dao;
37 37
 
38
-    /**
39
-     * ConfirmDeletion constructor.
40
-     * @param NodeGroupDao $dao
41
-     */
42
-    public function __construct(
43
-        NodeGroupDao $dao
44
-    ) {
38
+	/**
39
+	 * ConfirmDeletion constructor.
40
+	 * @param NodeGroupDao $dao
41
+	 */
42
+	public function __construct(
43
+		NodeGroupDao $dao
44
+	) {
45 45
 
46
-        $this->dao = $dao;
47
-    }
46
+		$this->dao = $dao;
47
+	}
48 48
 
49
-    /**
50
-     * Redirects to the batch job for deleting events if the form submission is valid, otherwise back to the deletion
51
-     * preview page.
52
-     * @since 4.10.12.p
53
-     * @param $request_data
54
-     * @param $admin_base_url
55
-     * @throws EE_Error
56
-     * @throws InvalidArgumentException
57
-     * @throws InvalidDataTypeException
58
-     * @throws InvalidInterfaceException
59
-     * @throws ReflectionException
60
-     * @throws UnexpectedEntityException
61
-     */
62
-    public function handle($request_data, $admin_base_url)
63
-    {
64
-        $deletion_job_code = isset($request_data['deletion_job_code']) ? sanitize_key($request_data['deletion_job_code']) : '';
65
-        $models_and_ids_to_delete = $this->dao->getModelsAndIdsFromGroup($deletion_job_code);
66
-        $form = new ConfirmEventDeletionForm($models_and_ids_to_delete['Event']);
67
-        // Initialize the form from the request, and check if its valid.
68
-        $form->receive_form_submission($request_data);
69
-        if ($form->is_valid()) {
70
-            // Redirect the user to the deletion batch job.
71
-            EEH_URL::safeRedirectAndExit(
72
-                EE_Admin_Page::add_query_args_and_nonce(
73
-                    array(
74
-                        'page' => 'espresso_batch',
75
-                        'batch' => EED_Batch::batch_job,
76
-                        'deletion_job_code' => $deletion_job_code,
77
-                        'job_handler' => urlencode('EventEspressoBatchRequest\JobHandlers\ExecuteBatchDeletion'),
78
-                        'return_url' => urlencode(
79
-                            add_query_arg(
80
-                                [
81
-                                    'status' => 'trash'
82
-                                ],
83
-                                EVENTS_ADMIN_URL
84
-                            )
85
-                        )
86
-                    ),
87
-                    admin_url()
88
-                )
89
-            );
90
-        }
91
-        // Dont' use $form->submission_error_message() because it adds the form input's label in front
92
-        // of each validation error which ends up looking quite confusing.
93
-        $validation_errors = $form->get_validation_errors_accumulated();
94
-        foreach ($validation_errors as $validation_error) {
95
-            EE_Error::add_error(
96
-                $validation_error->getMessage(),
97
-                __FILE__,
98
-                __FUNCTION__,
99
-                __LINE__
100
-            );
101
-        }
49
+	/**
50
+	 * Redirects to the batch job for deleting events if the form submission is valid, otherwise back to the deletion
51
+	 * preview page.
52
+	 * @since 4.10.12.p
53
+	 * @param $request_data
54
+	 * @param $admin_base_url
55
+	 * @throws EE_Error
56
+	 * @throws InvalidArgumentException
57
+	 * @throws InvalidDataTypeException
58
+	 * @throws InvalidInterfaceException
59
+	 * @throws ReflectionException
60
+	 * @throws UnexpectedEntityException
61
+	 */
62
+	public function handle($request_data, $admin_base_url)
63
+	{
64
+		$deletion_job_code = isset($request_data['deletion_job_code']) ? sanitize_key($request_data['deletion_job_code']) : '';
65
+		$models_and_ids_to_delete = $this->dao->getModelsAndIdsFromGroup($deletion_job_code);
66
+		$form = new ConfirmEventDeletionForm($models_and_ids_to_delete['Event']);
67
+		// Initialize the form from the request, and check if its valid.
68
+		$form->receive_form_submission($request_data);
69
+		if ($form->is_valid()) {
70
+			// Redirect the user to the deletion batch job.
71
+			EEH_URL::safeRedirectAndExit(
72
+				EE_Admin_Page::add_query_args_and_nonce(
73
+					array(
74
+						'page' => 'espresso_batch',
75
+						'batch' => EED_Batch::batch_job,
76
+						'deletion_job_code' => $deletion_job_code,
77
+						'job_handler' => urlencode('EventEspressoBatchRequest\JobHandlers\ExecuteBatchDeletion'),
78
+						'return_url' => urlencode(
79
+							add_query_arg(
80
+								[
81
+									'status' => 'trash'
82
+								],
83
+								EVENTS_ADMIN_URL
84
+							)
85
+						)
86
+					),
87
+					admin_url()
88
+				)
89
+			);
90
+		}
91
+		// Dont' use $form->submission_error_message() because it adds the form input's label in front
92
+		// of each validation error which ends up looking quite confusing.
93
+		$validation_errors = $form->get_validation_errors_accumulated();
94
+		foreach ($validation_errors as $validation_error) {
95
+			EE_Error::add_error(
96
+				$validation_error->getMessage(),
97
+				__FILE__,
98
+				__FUNCTION__,
99
+				__LINE__
100
+			);
101
+		}
102 102
 
103
-        EEH_URL::safeRedirectAndExit(
104
-            EE_Admin_Page::add_query_args_and_nonce(
105
-                [
106
-                    'action' => 'preview_deletion',
107
-                    'deletion_job_code' => $deletion_job_code
108
-                ],
109
-                $admin_base_url
110
-            )
111
-        );
112
-    }
103
+		EEH_URL::safeRedirectAndExit(
104
+			EE_Admin_Page::add_query_args_and_nonce(
105
+				[
106
+					'action' => 'preview_deletion',
107
+					'deletion_job_code' => $deletion_job_code
108
+				],
109
+				$admin_base_url
110
+			)
111
+		);
112
+	}
113 113
 }
114 114
 // End of file ConfirmDeletion.php
115 115
 // Location: EventEspresso\core\domain\services\admin\events\data/ConfirmDeletion.php
Please login to merge, or discard this patch.
core/db_models/helpers/EE_Table_Base.php 2 patches
Indentation   +147 added lines, -147 removed lines patch added patch discarded remove patch
@@ -7,151 +7,151 @@
 block discarded – undo
7 7
 abstract class EE_Table_Base
8 8
 {
9 9
 
10
-    /**
11
-     * This holds the table_name without the table prefix.
12
-     *
13
-     * @var string
14
-     */
15
-    public $_table_name;
16
-
17
-
18
-    /**
19
-     * This holds what is used as the alias for the table in queries.
20
-     *
21
-     * @var string
22
-     */
23
-    public $_table_alias;
24
-
25
-
26
-    /**
27
-     * Table's private key column
28
-     *
29
-     * @var string
30
-     */
31
-    protected $_pk_column;
32
-
33
-
34
-    /**
35
-     * Whether this table is a global table (in multisite) or specific to site.
36
-     *
37
-     * @var bool
38
-     */
39
-    protected $_global;
40
-
41
-
42
-    /**
43
-     * @param string  $table_name with or without wpdb prefix
44
-     * @param string  $pk_column
45
-     * @param boolean $global     whether the table is "global" as in there is only 1 table on an entire multisite
46
-     *                            install, or whether each site on a multisite install has a copy of this table
47
-     * @global wpdb   $wpdb
48
-     */
49
-    public function __construct($table_name, $pk_column, $global = false)
50
-    {
51
-        $this->_global = $global;
52
-        $prefix        = $this->get_table_prefix();
53
-        // if they added the prefix, let's remove it because we delay adding the prefix until right when its needed.
54
-        if (strpos($table_name, $prefix) === 0) {
55
-            $table_name = substr_replace($table_name, '', 0, strlen($prefix));
56
-        }
57
-        $this->_table_name = $table_name;
58
-        $this->_pk_column  = $pk_column;
59
-    }
60
-
61
-
62
-    /**
63
-     * This returns the table prefix for the current model state.
64
-     *
65
-     * @return string
66
-     * @global wpdb $wpdb
67
-     */
68
-    public function get_table_prefix()
69
-    {
70
-        global $wpdb;
71
-        if ($this->_global) {
72
-            return $wpdb->base_prefix;
73
-        }
74
-        return $wpdb->get_blog_prefix(EEM_Base::get_model_query_blog_id());
75
-    }
76
-
77
-
78
-    /**
79
-     * Used to set the table_alias property
80
-     *
81
-     * @param string $table_alias
82
-     */
83
-    public function _construct_finalize_with_alias($table_alias)
84
-    {
85
-        $this->_table_alias = $table_alias;
86
-    }
87
-
88
-
89
-    /**
90
-     * Returns the fully qualified table name for the database (includes the table prefix current for the blog).
91
-     *
92
-     * @return string
93
-     */
94
-    public function get_table_name()
95
-    {
96
-        return $this->get_table_prefix() . $this->_table_name;
97
-    }
98
-
99
-
100
-    /**
101
-     * Provides what is currently set as the alias for the table to be used in queries.
102
-     *
103
-     * @return string
104
-     * @throws EE_Error
105
-     */
106
-    public function get_table_alias()
107
-    {
108
-        if (! $this->_table_alias) {
109
-            throw new EE_Error("You must call _construct_finalize_with_alias before using the EE_Table_Base. Did you forget to call parent::__construct at the end of your EEMerimental_Base child's __construct?");
110
-        }
111
-        return $this->_table_alias;
112
-    }
113
-
114
-
115
-    /**
116
-     * @return string name of column of PK
117
-     */
118
-    public function get_pk_column()
119
-    {
120
-        return $this->_pk_column;
121
-    }
122
-
123
-
124
-    /**
125
-     * returns a string with the table alias, a period, and the private key's column.
126
-     *
127
-     * @return string
128
-     */
129
-    public function get_fully_qualified_pk_column()
130
-    {
131
-        return $this->get_table_alias() . "." . $this->get_pk_column();
132
-    }
133
-
134
-
135
-    /**
136
-     * returns the special sql for a inner select with a limit.
137
-     *
138
-     * @return string    SQL select
139
-     */
140
-    public function get_select_join_limit($limit)
141
-    {
142
-        $limit = is_array($limit) ? 'LIMIT ' . implode(',', array_map('intval', $limit)) : 'LIMIT ' . (int) $limit;
143
-        return SP . '(SELECT * FROM ' . $this->_table_name . SP . $limit . ') AS ' . $this->_table_alias;
144
-    }
145
-
146
-
147
-    /**
148
-     * Returns whether or not htis is a global table (ie, on multisite there's
149
-     * only one of these tables, on the main blog)
150
-     *
151
-     * @return boolean
152
-     */
153
-    public function is_global()
154
-    {
155
-        return $this->_global;
156
-    }
10
+	/**
11
+	 * This holds the table_name without the table prefix.
12
+	 *
13
+	 * @var string
14
+	 */
15
+	public $_table_name;
16
+
17
+
18
+	/**
19
+	 * This holds what is used as the alias for the table in queries.
20
+	 *
21
+	 * @var string
22
+	 */
23
+	public $_table_alias;
24
+
25
+
26
+	/**
27
+	 * Table's private key column
28
+	 *
29
+	 * @var string
30
+	 */
31
+	protected $_pk_column;
32
+
33
+
34
+	/**
35
+	 * Whether this table is a global table (in multisite) or specific to site.
36
+	 *
37
+	 * @var bool
38
+	 */
39
+	protected $_global;
40
+
41
+
42
+	/**
43
+	 * @param string  $table_name with or without wpdb prefix
44
+	 * @param string  $pk_column
45
+	 * @param boolean $global     whether the table is "global" as in there is only 1 table on an entire multisite
46
+	 *                            install, or whether each site on a multisite install has a copy of this table
47
+	 * @global wpdb   $wpdb
48
+	 */
49
+	public function __construct($table_name, $pk_column, $global = false)
50
+	{
51
+		$this->_global = $global;
52
+		$prefix        = $this->get_table_prefix();
53
+		// if they added the prefix, let's remove it because we delay adding the prefix until right when its needed.
54
+		if (strpos($table_name, $prefix) === 0) {
55
+			$table_name = substr_replace($table_name, '', 0, strlen($prefix));
56
+		}
57
+		$this->_table_name = $table_name;
58
+		$this->_pk_column  = $pk_column;
59
+	}
60
+
61
+
62
+	/**
63
+	 * This returns the table prefix for the current model state.
64
+	 *
65
+	 * @return string
66
+	 * @global wpdb $wpdb
67
+	 */
68
+	public function get_table_prefix()
69
+	{
70
+		global $wpdb;
71
+		if ($this->_global) {
72
+			return $wpdb->base_prefix;
73
+		}
74
+		return $wpdb->get_blog_prefix(EEM_Base::get_model_query_blog_id());
75
+	}
76
+
77
+
78
+	/**
79
+	 * Used to set the table_alias property
80
+	 *
81
+	 * @param string $table_alias
82
+	 */
83
+	public function _construct_finalize_with_alias($table_alias)
84
+	{
85
+		$this->_table_alias = $table_alias;
86
+	}
87
+
88
+
89
+	/**
90
+	 * Returns the fully qualified table name for the database (includes the table prefix current for the blog).
91
+	 *
92
+	 * @return string
93
+	 */
94
+	public function get_table_name()
95
+	{
96
+		return $this->get_table_prefix() . $this->_table_name;
97
+	}
98
+
99
+
100
+	/**
101
+	 * Provides what is currently set as the alias for the table to be used in queries.
102
+	 *
103
+	 * @return string
104
+	 * @throws EE_Error
105
+	 */
106
+	public function get_table_alias()
107
+	{
108
+		if (! $this->_table_alias) {
109
+			throw new EE_Error("You must call _construct_finalize_with_alias before using the EE_Table_Base. Did you forget to call parent::__construct at the end of your EEMerimental_Base child's __construct?");
110
+		}
111
+		return $this->_table_alias;
112
+	}
113
+
114
+
115
+	/**
116
+	 * @return string name of column of PK
117
+	 */
118
+	public function get_pk_column()
119
+	{
120
+		return $this->_pk_column;
121
+	}
122
+
123
+
124
+	/**
125
+	 * returns a string with the table alias, a period, and the private key's column.
126
+	 *
127
+	 * @return string
128
+	 */
129
+	public function get_fully_qualified_pk_column()
130
+	{
131
+		return $this->get_table_alias() . "." . $this->get_pk_column();
132
+	}
133
+
134
+
135
+	/**
136
+	 * returns the special sql for a inner select with a limit.
137
+	 *
138
+	 * @return string    SQL select
139
+	 */
140
+	public function get_select_join_limit($limit)
141
+	{
142
+		$limit = is_array($limit) ? 'LIMIT ' . implode(',', array_map('intval', $limit)) : 'LIMIT ' . (int) $limit;
143
+		return SP . '(SELECT * FROM ' . $this->_table_name . SP . $limit . ') AS ' . $this->_table_alias;
144
+	}
145
+
146
+
147
+	/**
148
+	 * Returns whether or not htis is a global table (ie, on multisite there's
149
+	 * only one of these tables, on the main blog)
150
+	 *
151
+	 * @return boolean
152
+	 */
153
+	public function is_global()
154
+	{
155
+		return $this->_global;
156
+	}
157 157
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function get_table_name()
95 95
     {
96
-        return $this->get_table_prefix() . $this->_table_name;
96
+        return $this->get_table_prefix().$this->_table_name;
97 97
     }
98 98
 
99 99
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function get_table_alias()
107 107
     {
108
-        if (! $this->_table_alias) {
108
+        if ( ! $this->_table_alias) {
109 109
             throw new EE_Error("You must call _construct_finalize_with_alias before using the EE_Table_Base. Did you forget to call parent::__construct at the end of your EEMerimental_Base child's __construct?");
110 110
         }
111 111
         return $this->_table_alias;
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public function get_fully_qualified_pk_column()
130 130
     {
131
-        return $this->get_table_alias() . "." . $this->get_pk_column();
131
+        return $this->get_table_alias().".".$this->get_pk_column();
132 132
     }
133 133
 
134 134
 
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function get_select_join_limit($limit)
141 141
     {
142
-        $limit = is_array($limit) ? 'LIMIT ' . implode(',', array_map('intval', $limit)) : 'LIMIT ' . (int) $limit;
143
-        return SP . '(SELECT * FROM ' . $this->_table_name . SP . $limit . ') AS ' . $this->_table_alias;
142
+        $limit = is_array($limit) ? 'LIMIT '.implode(',', array_map('intval', $limit)) : 'LIMIT '.(int) $limit;
143
+        return SP.'(SELECT * FROM '.$this->_table_name.SP.$limit.') AS '.$this->_table_alias;
144 144
     }
145 145
 
146 146
 
Please login to merge, or discard this patch.
core/domain/DomainFactory.php 2 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -23,62 +23,62 @@
 block discarded – undo
23 23
 class DomainFactory
24 24
 {
25 25
 
26
-    /**
27
-     * @param FullyQualifiedName $domain_fqcn   [required] Fully Qualified Class Name for the Domain class
28
-     * @param array $arguments                  [required] array of arguments to be passed to the Domain class
29
-     *                                          constructor. Must at least include the following two value objects:
30
-     *                                          array(
31
-     *                                              EventEspresso\core\domain\values\FilePath $plugin_file
32
-     *                                              EventEspresso\core\domain\values\Version $version
33
-     *                                          )
34
-     * @return DomainInterface
35
-     * @throws DomainException
36
-     * @throws InvalidArgumentException
37
-     * @throws InvalidDataTypeException
38
-     * @throws InvalidInterfaceException
39
-     */
40
-    public static function getShared(FullyQualifiedName $domain_fqcn, array $arguments)
41
-    {
42
-        if (! isset($arguments[0], $arguments[1])) {
43
-            throw new InvalidArgumentException(
44
-                esc_html__(
45
-                    'You need to pass at least two arguments, representing the addon plugin file and version, in order to generate a Domain class',
46
-                    'event_espresso'
47
-                )
48
-            );
49
-        }
50
-        /** @var DomainInterface $domain */
51
-        $domain = LoaderFactory::getLoader()->getShared($domain_fqcn, $arguments);
52
-        if (! $domain instanceof $domain_fqcn && ! $domain instanceof DomainBase) {
53
-            throw new DomainException(
54
-                sprintf(
55
-                    esc_html__(
56
-                        'The requested Domain class "%1$s" could not be loaded.',
57
-                        'event_espresso'
58
-                    ),
59
-                    $domain_fqcn
60
-                )
61
-            );
62
-        }
63
-        return $domain;
64
-    }
26
+	/**
27
+	 * @param FullyQualifiedName $domain_fqcn   [required] Fully Qualified Class Name for the Domain class
28
+	 * @param array $arguments                  [required] array of arguments to be passed to the Domain class
29
+	 *                                          constructor. Must at least include the following two value objects:
30
+	 *                                          array(
31
+	 *                                              EventEspresso\core\domain\values\FilePath $plugin_file
32
+	 *                                              EventEspresso\core\domain\values\Version $version
33
+	 *                                          )
34
+	 * @return DomainInterface
35
+	 * @throws DomainException
36
+	 * @throws InvalidArgumentException
37
+	 * @throws InvalidDataTypeException
38
+	 * @throws InvalidInterfaceException
39
+	 */
40
+	public static function getShared(FullyQualifiedName $domain_fqcn, array $arguments)
41
+	{
42
+		if (! isset($arguments[0], $arguments[1])) {
43
+			throw new InvalidArgumentException(
44
+				esc_html__(
45
+					'You need to pass at least two arguments, representing the addon plugin file and version, in order to generate a Domain class',
46
+					'event_espresso'
47
+				)
48
+			);
49
+		}
50
+		/** @var DomainInterface $domain */
51
+		$domain = LoaderFactory::getLoader()->getShared($domain_fqcn, $arguments);
52
+		if (! $domain instanceof $domain_fqcn && ! $domain instanceof DomainBase) {
53
+			throw new DomainException(
54
+				sprintf(
55
+					esc_html__(
56
+						'The requested Domain class "%1$s" could not be loaded.',
57
+						'event_espresso'
58
+					),
59
+					$domain_fqcn
60
+				)
61
+			);
62
+		}
63
+		return $domain;
64
+	}
65 65
 
66 66
 
67
-    /**
68
-     * @return Domain
69
-     * @throws DomainException
70
-     * @throws InvalidArgumentException
71
-     * @throws InvalidDataTypeException
72
-     * @throws InvalidFilePathException
73
-     * @throws InvalidInterfaceException
74
-     */
75
-    public static function getEventEspressoCoreDomain()
76
-    {
77
-        $domain = new Domain(
78
-            new FilePath(EVENT_ESPRESSO_MAIN_FILE),
79
-            Version::fromString(espresso_version())
80
-        );
81
-        LoaderFactory::getLoader()->share('EventEspresso\core\domain\Domain', $domain);
82
-        return $domain;
83
-    }
67
+	/**
68
+	 * @return Domain
69
+	 * @throws DomainException
70
+	 * @throws InvalidArgumentException
71
+	 * @throws InvalidDataTypeException
72
+	 * @throws InvalidFilePathException
73
+	 * @throws InvalidInterfaceException
74
+	 */
75
+	public static function getEventEspressoCoreDomain()
76
+	{
77
+		$domain = new Domain(
78
+			new FilePath(EVENT_ESPRESSO_MAIN_FILE),
79
+			Version::fromString(espresso_version())
80
+		);
81
+		LoaderFactory::getLoader()->share('EventEspresso\core\domain\Domain', $domain);
82
+		return $domain;
83
+	}
84 84
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public static function getShared(FullyQualifiedName $domain_fqcn, array $arguments)
41 41
     {
42
-        if (! isset($arguments[0], $arguments[1])) {
42
+        if ( ! isset($arguments[0], $arguments[1])) {
43 43
             throw new InvalidArgumentException(
44 44
                 esc_html__(
45 45
                     'You need to pass at least two arguments, representing the addon plugin file and version, in order to generate a Domain class',
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
         /** @var DomainInterface $domain */
51 51
         $domain = LoaderFactory::getLoader()->getShared($domain_fqcn, $arguments);
52
-        if (! $domain instanceof $domain_fqcn && ! $domain instanceof DomainBase) {
52
+        if ( ! $domain instanceof $domain_fqcn && ! $domain instanceof DomainBase) {
53 53
             throw new DomainException(
54 54
                 sprintf(
55 55
                     esc_html__(
Please login to merge, or discard this patch.
core/libraries/plugin_api/EE_Register_Personal_Data_Exporter.lib.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -13,55 +13,55 @@
 block discarded – undo
13 13
 class EE_Register_Personal_Data_Exporter implements EEI_Plugin_API
14 14
 {
15 15
 
16
-    /**
17
-     * FQCN for all privacy policy generators
18
-     *
19
-     * @var array keys are plugin_ids, and values are an array of FQCNs or FQCNs
20
-     */
21
-    protected static $exporters = [];
16
+	/**
17
+	 * FQCN for all privacy policy generators
18
+	 *
19
+	 * @var array keys are plugin_ids, and values are an array of FQCNs or FQCNs
20
+	 */
21
+	protected static $exporters = [];
22 22
 
23 23
 
24
-    /**
25
-     * @param string $identifier
26
-     * @param array  $setup_args can be the fully qualified namespaces each containing only privacy policies,
27
-     *                           OR fully qualified class names of privacy policies
28
-     */
29
-    public static function register($identifier = '', array $setup_args = [])
30
-    {
31
-        self::$exporters[ $identifier ] = $setup_args;
32
-        // add to list of modules to be registered
33
-        add_filter(
34
-            'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters',
35
-            ['EE_Register_Personal_Data_Exporter', 'addExporters']
36
-        );
37
-    }
24
+	/**
25
+	 * @param string $identifier
26
+	 * @param array  $setup_args can be the fully qualified namespaces each containing only privacy policies,
27
+	 *                           OR fully qualified class names of privacy policies
28
+	 */
29
+	public static function register($identifier = '', array $setup_args = [])
30
+	{
31
+		self::$exporters[ $identifier ] = $setup_args;
32
+		// add to list of modules to be registered
33
+		add_filter(
34
+			'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters',
35
+			['EE_Register_Personal_Data_Exporter', 'addExporters']
36
+		);
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * @param string $identifier
42
-     */
43
-    public static function deregister($identifier = '')
44
-    {
45
-        unset(self::$exporters[ $identifier ]);
46
-    }
40
+	/**
41
+	 * @param string $identifier
42
+	 */
43
+	public static function deregister($identifier = '')
44
+	{
45
+		unset(self::$exporters[ $identifier ]);
46
+	}
47 47
 
48 48
 
49
-    /**
50
-     * Adds our personal data exporters registered by add-ons
51
-     *
52
-     * @param string[] $exporters
53
-     * @return string[]
54
-     */
55
-    public static function addExporters(array $exporters)
56
-    {
57
-        foreach (self::$exporters as $exporters_per_addon) {
58
-            $exporters = array_merge(
59
-                $exporters,
60
-                $exporters_per_addon
61
-            );
62
-        }
63
-        return $exporters;
64
-    }
49
+	/**
50
+	 * Adds our personal data exporters registered by add-ons
51
+	 *
52
+	 * @param string[] $exporters
53
+	 * @return string[]
54
+	 */
55
+	public static function addExporters(array $exporters)
56
+	{
57
+		foreach (self::$exporters as $exporters_per_addon) {
58
+			$exporters = array_merge(
59
+				$exporters,
60
+				$exporters_per_addon
61
+			);
62
+		}
63
+		return $exporters;
64
+	}
65 65
 }
66 66
 // End of file EE_Register_Personal_Data_Exporter.lib.php
67 67
 // Location: ${NAMESPACE}/EE_Register_Personal_Data_Exporter.lib.php
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public static function register($identifier = '', array $setup_args = [])
30 30
     {
31
-        self::$exporters[ $identifier ] = $setup_args;
31
+        self::$exporters[$identifier] = $setup_args;
32 32
         // add to list of modules to be registered
33 33
         add_filter(
34 34
             'FHEE__EventEspresso_core_services_privacy_export_PersonalDataExporterManager__exporters',
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public static function deregister($identifier = '')
44 44
     {
45
-        unset(self::$exporters[ $identifier ]);
45
+        unset(self::$exporters[$identifier]);
46 46
     }
47 47
 
48 48
 
Please login to merge, or discard this patch.
core/libraries/plugin_api/EE_Register_Personal_Data_Eraser.lib.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -13,55 +13,55 @@
 block discarded – undo
13 13
 class EE_Register_Personal_Data_Eraser implements EEI_Plugin_API
14 14
 {
15 15
 
16
-    /**
17
-     * FQCN for all privacy policy generators
18
-     *
19
-     * @var array keys are plugin_ids, and values are an array of FQCNs or FQCNs
20
-     */
21
-    protected static $erasers = [];
16
+	/**
17
+	 * FQCN for all privacy policy generators
18
+	 *
19
+	 * @var array keys are plugin_ids, and values are an array of FQCNs or FQCNs
20
+	 */
21
+	protected static $erasers = [];
22 22
 
23 23
 
24
-    /**
25
-     * @param string $identifier
26
-     * @param array  $setup_args can be the fully qualified namespaces each containing only privacy policies,
27
-     *                           OR fully qualified class names of privacy policies
28
-     */
29
-    public static function register($identifier = '', array $setup_args = [])
30
-    {
31
-        self::$erasers[ $identifier ] = $setup_args;
32
-        // add to list of modules to be registered
33
-        add_filter(
34
-            'FHEE__EventEspresso_core_services_privacy_erasure_PersonalDataEraserManager__erasers',
35
-            ['EE_Register_Personal_Data_Eraser', 'addErasers']
36
-        );
37
-    }
24
+	/**
25
+	 * @param string $identifier
26
+	 * @param array  $setup_args can be the fully qualified namespaces each containing only privacy policies,
27
+	 *                           OR fully qualified class names of privacy policies
28
+	 */
29
+	public static function register($identifier = '', array $setup_args = [])
30
+	{
31
+		self::$erasers[ $identifier ] = $setup_args;
32
+		// add to list of modules to be registered
33
+		add_filter(
34
+			'FHEE__EventEspresso_core_services_privacy_erasure_PersonalDataEraserManager__erasers',
35
+			['EE_Register_Personal_Data_Eraser', 'addErasers']
36
+		);
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * @param string $identifier
42
-     */
43
-    public static function deregister($identifier = '')
44
-    {
45
-        unset(self::$erasers[ $identifier ]);
46
-    }
40
+	/**
41
+	 * @param string $identifier
42
+	 */
43
+	public static function deregister($identifier = '')
44
+	{
45
+		unset(self::$erasers[ $identifier ]);
46
+	}
47 47
 
48 48
 
49
-    /**
50
-     * Adds our personal data erasers registered by add-ons
51
-     *
52
-     * @param string[] $erasers
53
-     * @return string[]
54
-     */
55
-    public static function addErasers(array $erasers)
56
-    {
57
-        foreach (self::$erasers as $erasers_per_addon) {
58
-            $erasers = array_merge(
59
-                $erasers,
60
-                $erasers_per_addon
61
-            );
62
-        }
63
-        return $erasers;
64
-    }
49
+	/**
50
+	 * Adds our personal data erasers registered by add-ons
51
+	 *
52
+	 * @param string[] $erasers
53
+	 * @return string[]
54
+	 */
55
+	public static function addErasers(array $erasers)
56
+	{
57
+		foreach (self::$erasers as $erasers_per_addon) {
58
+			$erasers = array_merge(
59
+				$erasers,
60
+				$erasers_per_addon
61
+			);
62
+		}
63
+		return $erasers;
64
+	}
65 65
 }
66 66
 // End of file EE_Register_Personal_Data_Eraser.lib.php
67 67
 // Location: ${NAMESPACE}/EE_Register_Personal_Data_Eraser.lib.php
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public static function register($identifier = '', array $setup_args = [])
30 30
     {
31
-        self::$erasers[ $identifier ] = $setup_args;
31
+        self::$erasers[$identifier] = $setup_args;
32 32
         // add to list of modules to be registered
33 33
         add_filter(
34 34
             'FHEE__EventEspresso_core_services_privacy_erasure_PersonalDataEraserManager__erasers',
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public static function deregister($identifier = '')
44 44
     {
45
-        unset(self::$erasers[ $identifier ]);
45
+        unset(self::$erasers[$identifier]);
46 46
     }
47 47
 
48 48
 
Please login to merge, or discard this patch.
core/libraries/plugin_api/EE_Register_Privacy_Policy.lib.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -13,55 +13,55 @@
 block discarded – undo
13 13
 class EE_Register_Privacy_Policy implements EEI_Plugin_API
14 14
 {
15 15
 
16
-    /**
17
-     * FQCN for all privacy policy generators
18
-     *
19
-     * @var array keys are plugin_ids, and values are an array of FQCNs or FQCNs
20
-     */
21
-    protected static $privacy_policies = array();
16
+	/**
17
+	 * FQCN for all privacy policy generators
18
+	 *
19
+	 * @var array keys are plugin_ids, and values are an array of FQCNs or FQCNs
20
+	 */
21
+	protected static $privacy_policies = array();
22 22
 
23 23
 
24
-    /**
25
-     * @param string $identifier
26
-     * @param array $setup_args can be the fully qualified namespaces each containing only privacy policies,
27
-     *              OR fully qualified class names of privacy policies
28
-     */
29
-    public static function register($identifier = '', array $setup_args = [])
30
-    {
31
-        self::$privacy_policies[ $identifier ] = $setup_args;
32
-        // add to list of modules to be registered
33
-        add_filter(
34
-            'FHEE__EventEspresso_core_services_privacy_policy_PrivacyPolicyManager__privacy_policies',
35
-            array('EE_Register_Privacy_Policy', 'addPrivacyPolicies')
36
-        );
37
-    }
24
+	/**
25
+	 * @param string $identifier
26
+	 * @param array $setup_args can be the fully qualified namespaces each containing only privacy policies,
27
+	 *              OR fully qualified class names of privacy policies
28
+	 */
29
+	public static function register($identifier = '', array $setup_args = [])
30
+	{
31
+		self::$privacy_policies[ $identifier ] = $setup_args;
32
+		// add to list of modules to be registered
33
+		add_filter(
34
+			'FHEE__EventEspresso_core_services_privacy_policy_PrivacyPolicyManager__privacy_policies',
35
+			array('EE_Register_Privacy_Policy', 'addPrivacyPolicies')
36
+		);
37
+	}
38 38
 
39 39
 
40
-    /**
41
-     * @param string $identifier
42
-     */
43
-    public static function deregister($identifier = '')
44
-    {
45
-        unset(self::$privacy_policies[ $identifier ]);
46
-    }
40
+	/**
41
+	 * @param string $identifier
42
+	 */
43
+	public static function deregister($identifier = '')
44
+	{
45
+		unset(self::$privacy_policies[ $identifier ]);
46
+	}
47 47
 
48 48
 
49
-    /**
50
-     * Adds our privacy policy generators registered by add-ons
51
-     *
52
-     * @param string[] $privacy_policies
53
-     * @return string[]
54
-     */
55
-    public static function addPrivacyPolicies(array $privacy_policies)
56
-    {
57
-        foreach (self::$privacy_policies as $privacy_policies_per_addon) {
58
-            $privacy_policies = array_merge(
59
-                $privacy_policies,
60
-                $privacy_policies_per_addon
61
-            );
62
-        }
63
-        return $privacy_policies;
64
-    }
49
+	/**
50
+	 * Adds our privacy policy generators registered by add-ons
51
+	 *
52
+	 * @param string[] $privacy_policies
53
+	 * @return string[]
54
+	 */
55
+	public static function addPrivacyPolicies(array $privacy_policies)
56
+	{
57
+		foreach (self::$privacy_policies as $privacy_policies_per_addon) {
58
+			$privacy_policies = array_merge(
59
+				$privacy_policies,
60
+				$privacy_policies_per_addon
61
+			);
62
+		}
63
+		return $privacy_policies;
64
+	}
65 65
 }
66 66
 // End of file EE_Register_Privacy_Policy.lib.php
67 67
 // Location: ${NAMESPACE}/EE_Register_Privacy_Policy.lib.php
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public static function register($identifier = '', array $setup_args = [])
30 30
     {
31
-        self::$privacy_policies[ $identifier ] = $setup_args;
31
+        self::$privacy_policies[$identifier] = $setup_args;
32 32
         // add to list of modules to be registered
33 33
         add_filter(
34 34
             'FHEE__EventEspresso_core_services_privacy_policy_PrivacyPolicyManager__privacy_policies',
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public static function deregister($identifier = '')
44 44
     {
45
-        unset(self::$privacy_policies[ $identifier ]);
45
+        unset(self::$privacy_policies[$identifier]);
46 46
     }
47 47
 
48 48
 
Please login to merge, or discard this patch.