Completed
Branch BUG-9680-compress-dompdf-files... (43e183)
by
unknown
67:53 queued 55:02
created
strategies/normalization/EE_Many_Valued_Normalization.strategy.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage
7 7
  * @author				Mike Nelson
8 8
  */
9
-class EE_Many_Valued_Normalization extends EE_Normalization_Strategy_Base{
9
+class EE_Many_Valued_Normalization extends EE_Normalization_Strategy_Base {
10 10
 	protected $_individual_item_normalization_strategy = array();
11 11
 	/**
12 12
 	 *
@@ -23,16 +23,16 @@  discard block
 block discarded – undo
23 23
 	 * @return array
24 24
 	 */
25 25
 	public function normalize($value_to_normalize) {
26
-		if ( is_array( $value_to_normalize )){
26
+		if (is_array($value_to_normalize)) {
27 27
 			$items_to_normalize = $value_to_normalize;
28
-		} else if( $value_to_normalize !== NULL ){
29
-			$items_to_normalize = array( $value_to_normalize );
28
+		} else if ($value_to_normalize !== NULL) {
29
+			$items_to_normalize = array($value_to_normalize);
30 30
 		} else {
31 31
 			$items_to_normalize = array();
32 32
 		}
33 33
 		$normalized_array_value = array();
34
-		foreach( $items_to_normalize as $key => $individual_item ){
35
-			$normalized_array_value[ $key ] = $this->normalize_one( $individual_item );
34
+		foreach ($items_to_normalize as $key => $individual_item) {
35
+			$normalized_array_value[$key] = $this->normalize_one($individual_item);
36 36
 		}
37 37
 		return $normalized_array_value;
38 38
 	}
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 	 * @param string $individual_value_to_normalize but definitely NOT an array
43 43
 	 * @return mixed
44 44
 	 */
45
-	public function normalize_one( $individual_value_to_normalize ) {
46
-		return $this->_individual_item_normalization_strategy->normalize( $individual_value_to_normalize );
45
+	public function normalize_one($individual_value_to_normalize) {
46
+		return $this->_individual_item_normalization_strategy->normalize($individual_value_to_normalize);
47 47
 	}
48 48
 
49 49
 	/**
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
 	 * @param array $normalized_values
52 52
 	 * @return string[]
53 53
 	 */
54
-	public function unnormalize( $normalized_values ) {
55
-		if( ! is_array( $normalized_values ) ){
56
-			$normalized_values = array( $normalized_values );
54
+	public function unnormalize($normalized_values) {
55
+		if ( ! is_array($normalized_values)) {
56
+			$normalized_values = array($normalized_values);
57 57
 		}
58 58
 		$non_normal_values = array();
59
-		foreach( $normalized_values as $key => $value ) {
60
-			$non_normal_values[ $key ] = $this->unnormalize_one( $value );
59
+		foreach ($normalized_values as $key => $value) {
60
+			$non_normal_values[$key] = $this->unnormalize_one($value);
61 61
 		}
62 62
 		return $non_normal_values;
63 63
 	}
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 	 * @param mixed $individual_value_to_unnormalize but certainly NOT an array
68 68
 	 * @return string
69 69
 	 */
70
-	public function unnormalize_one( $individual_value_to_unnormalize ) {
71
-		return $this->_individual_item_normalization_strategy->unnormalize( $individual_value_to_unnormalize );
70
+	public function unnormalize_one($individual_value_to_unnormalize) {
71
+		return $this->_individual_item_normalization_strategy->unnormalize($individual_value_to_unnormalize);
72 72
 	}
73 73
 }
74 74
 
Please login to merge, or discard this patch.
strategies/normalization/EE_Normalization_Strategy_Base.strategy.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage
7 7
  * @author				Mike Nelson
8 8
  */
9
-abstract class EE_Normalization_Strategy_Base extends EE_Form_Input_Strategy_Base{
9
+abstract class EE_Normalization_Strategy_Base extends EE_Form_Input_Strategy_Base {
10 10
 	/**
11 11
 	 * Takes the sanitized value for the input and casts it into the correct PHP type.
12 12
 	 * Eg, turns it into an int, float, string, boolean, datetime, etc. The validation
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 	 * @param string $individual_item_to_normalize
30 30
 	 * @return mixed
31 31
 	 */
32
-	public function normalize_one( $individual_item_to_normalize ){
33
-		return $this->normalize( $individual_item_to_normalize );
32
+	public function normalize_one($individual_item_to_normalize) {
33
+		return $this->normalize($individual_item_to_normalize);
34 34
 	}
35 35
 
36 36
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 * @param $normalized_value
43 43
 	 * @return array|string the 'raw' value as used in the form, usually a string or array of strings.
44 44
 	 */
45
-	abstract function unnormalize( $normalized_value );
45
+	abstract function unnormalize($normalized_value);
46 46
 
47 47
 	/**
48 48
 	 * Normally the same as unnormalize, except it CANNOT be passed an array and
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	 * @param mixed $individual_item_to_unnormalize NOT an array
51 51
 	 * @return string
52 52
 	 */
53
-	public function unnormalize_one( $individual_item_to_unnormalize ) {
54
-		return $this->unnormalize( $individual_item_to_unnormalize );
53
+	public function unnormalize_one($individual_item_to_unnormalize) {
54
+		return $this->unnormalize($individual_item_to_unnormalize);
55 55
 	}
56 56
 }
57 57
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	 * the value you would use in the html form (for a Yes_No_Input this could be '1' or '0').
41 41
 	 *
42 42
 	 * @param $normalized_value
43
-	 * @return array|string the 'raw' value as used in the form, usually a string or array of strings.
43
+	 * @return string the 'raw' value as used in the form, usually a string or array of strings.
44 44
 	 */
45 45
 	abstract function unnormalize( $normalized_value );
46 46
 
Please login to merge, or discard this patch.
form_sections/strategies/normalization/EE_Slug_Normalization.strategy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @subpackage
8 8
  * @author				Mike Nelson
9 9
  */
10
-class EE_Slug_Normalization extends EE_Normalization_Strategy_Base{
10
+class EE_Slug_Normalization extends EE_Normalization_Strategy_Base {
11 11
 
12 12
 	/**
13 13
 	 * @param string $value_to_normalize
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 	 * @param string $normalized_value
23 23
 	 * @return string
24 24
 	 */
25
-	public function unnormalize( $normalized_value ) {
26
-		return str_replace( "-", " ", $normalized_value );
25
+	public function unnormalize($normalized_value) {
26
+		return str_replace("-", " ", $normalized_value);
27 27
 	}
28 28
 
29 29
 }
Please login to merge, or discard this patch.
form_sections/strategies/normalization/EE_Text_Normalization.strategy.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@  discard block
 block discarded – undo
7 7
  * @subpackage
8 8
  * @author				Mike Nelson
9 9
  */
10
-class EE_Text_Normalization extends EE_Normalization_Strategy_Base{
10
+class EE_Text_Normalization extends EE_Normalization_Strategy_Base {
11 11
 
12 12
 	/**
13 13
 	 * @param string $value_to_normalize
14 14
 	 * @return array|mixed|string
15 15
 	 */
16 16
 	public function normalize($value_to_normalize) {
17
-		if(is_array($value_to_normalize)){
17
+		if (is_array($value_to_normalize)) {
18 18
 			return array_shift($value_to_normalize);
19
-		}else{
19
+		} else {
20 20
 			return $value_to_normalize;
21 21
 		}
22 22
 	}
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * @param string $normalized_value
26 26
 	 * @return string
27 27
 	 */
28
-	public function unnormalize( $normalized_value ){
28
+	public function unnormalize($normalized_value) {
29 29
 		return $normalized_value;
30 30
 	}
31 31
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 	public function normalize($value_to_normalize) {
17 17
 		if(is_array($value_to_normalize)){
18 18
 			return array_shift($value_to_normalize);
19
-		}else{
19
+		} else{
20 20
 			return $value_to_normalize;
21 21
 		}
22 22
 	}
Please login to merge, or discard this patch.
sensitive_data_removal/EE_All_Sensitive_Data_Removal.strategy.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EE_All_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base{
28
+class EE_All_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base {
29 29
 	public function remove_sensitive_data($normalized_value) {
30
-		switch(gettype($normalized_value)){
30
+		switch (gettype($normalized_value)) {
31 31
 			case "boolean":
32 32
 				return false;
33 33
 			case "integer":
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
Please login to merge, or discard this patch.
sensitive_data_removal/EE_CCV_Sensitive_Data_Removal.strategy.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 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EE_CCV_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base{
29
-	public function remove_sensitive_data($normalized_value){
28
+class EE_CCV_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base {
29
+	public function remove_sensitive_data($normalized_value) {
30 30
 		// Get the ccv Length
31 31
 		$ccv_lenght = strlen($normalized_value);
32 32
 		// Replace all characters of credit card except the last four and dashes
33
-		for($i=0; $i<$ccv_lenght; $i++){
34
-			if($normalized_value[$i] == '-'){continue;}
33
+		for ($i = 0; $i < $ccv_lenght; $i++) {
34
+			if ($normalized_value[$i] == '-') {continue; }
35 35
 			$normalized_value[$i] = 'X';
36 36
 		}
37 37
 		// Return the masked Credit Card #
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
Please login to merge, or discard this patch.
sensitive_data_removal/EE_Credit_Card_Sensitive_Data_Removal.strategy.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 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EE_Credit_Card_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base{
29
-	public function remove_sensitive_data($normalized_value){
28
+class EE_Credit_Card_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base {
29
+	public function remove_sensitive_data($normalized_value) {
30 30
 		// Get the cc Length
31 31
 		$cc_length = strlen($normalized_value);
32 32
 		// Replace all characters of credit card except the last four and dashes
33
-		for($i=0; $i<$cc_length-4; $i++){
34
-			if($normalized_value[$i] == '-'){continue;}
33
+		for ($i = 0; $i < $cc_length - 4; $i++) {
34
+			if ($normalized_value[$i] == '-') {continue; }
35 35
 			$normalized_value[$i] = 'X';
36 36
 		}
37 37
 		// Return the masked Credit Card #
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
Please login to merge, or discard this patch.
strategies/sensitive_data_removal/EE_No_Sensitive_Data_Removal.strategy.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EE_No_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base{
28
+class EE_No_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base {
29 29
 	public function remove_sensitive_data($normalized_value) {
30 30
 		return $normalized_value;
31 31
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
Please login to merge, or discard this patch.
sensitive_data_removal/EE_Sensitive_Data_Removal_Base.strategy.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-abstract class EE_Sensitive_Data_Removal_Base extends EE_Form_Input_Strategy_Base{
28
+abstract class EE_Sensitive_Data_Removal_Base extends EE_Form_Input_Strategy_Base {
29 29
 	/**
30 30
 	 * Removes all the sensitive data from this normalized value.
31 31
 	 * For example, should could 'mask' a credit card from 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
Please login to merge, or discard this patch.