Completed
Branch FET-8347-separate-logging (f2247f)
by
unknown
132:03 queued 123:04
created
payment_failed/EE_Messages_Email_Payment_Failed_Validator.class.php 2 patches
Spacing   +7 added lines, -7 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
 /**
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 class EE_Messages_Email_Payment_Failed_Validator extends EE_Messages_Validator {
19 19
 
20 20
 
21
-	public function __construct( $fields, $context ) {
21
+	public function __construct($fields, $context) {
22 22
 		$this->_m_name = 'email';
23 23
 		$this->_mt_name = 'payment_failed';
24 24
 
25
-		parent::__construct( $fields, $context );
25
+		parent::__construct($fields, $context);
26 26
 	}
27 27
 
28 28
 	/**
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
 
34 34
 		//modify just event_list
35 35
 		$new_config['event_list'] = array(
36
-			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
36
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
37 37
 			);
38 38
 		$new_config['ticket_list'] = array(
39 39
 			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
40 40
 			);
41 41
 		$new_config['content'] = array(
42
-			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
42
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
43 43
 			);
44
-		$this->_MSGR->set_validator_config( $new_config );
44
+		$this->_MSGR->set_validator_config($new_config);
45 45
 
46
-		if ( $this->_context != 'admin' )
46
+		if ($this->_context != 'admin')
47 47
 			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
48 48
 
49 49
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  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 7
 /**
7 8
  * EE_Messages_Email_Payment_Failed_Validator class
@@ -43,8 +44,9 @@  discard block
 block discarded – undo
43 44
 			);
44 45
 		$this->_MSGR->set_validator_config( $new_config );
45 46
 
46
-		if ( $this->_context != 'admin' )
47
-			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
47
+		if ( $this->_context != 'admin' ) {
48
+					$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
49
+		}
48 50
 
49 51
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
50 52
 	}
Please login to merge, or discard this patch.
message_type/payment_failed/EE_Payment_Failed_message_type.class.php 2 patches
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
  * EE_Payment_Failed_message_type extends EE_message_type
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
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
payment_reminder/EE_Messages_Email_Payment_Reminder_Validator.class.php 2 patches
Spacing   +7 added lines, -7 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
 /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 class EE_Messages_Email_Payment_Reminder_Validator extends EE_Messages_Validator {
31 31
 
32 32
 
33
-	public function __construct( $fields, $context ) {
33
+	public function __construct($fields, $context) {
34 34
 		$this->_m_name = 'email';
35 35
 		$this->_mt_name = 'payment_reminder';
36 36
 
37
-		parent::__construct( $fields, $context );
37
+		parent::__construct($fields, $context);
38 38
 	}
39 39
 
40 40
 	/**
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
 
46 46
 		//modify just event_list
47 47
 		$new_config['event_list'] = array(
48
-			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
48
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
49 49
 			);
50 50
 		$new_config['ticket_list'] = array(
51 51
 			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
52 52
 			);
53 53
 		$new_config['content'] = array(
54
-			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
54
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
55 55
 			);
56
-		$this->_MSGR->set_validator_config( $new_config );
56
+		$this->_MSGR->set_validator_config($new_config);
57 57
 
58
-		if ( $this->_context != 'admin' )
58
+		if ($this->_context != 'admin')
59 59
 			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
60 60
 
61 61
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  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 7
 /**
7 8
  * Event Espresso
@@ -48,8 +49,9 @@  discard block
 block discarded – undo
48 49
 			);
49 50
 		$this->_MSGR->set_validator_config( $new_config );
50 51
 
51
-		if ( $this->_context != 'admin' )
52
-			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
52
+		if ( $this->_context != 'admin' ) {
53
+					$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
54
+		}
53 55
 
54 56
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
55 57
 	}
Please login to merge, or discard this patch.
caffeinated/core/libraries/shortcodes/EE_Newsletter_Shortcodes.lib.php 3 patches
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -20,82 +20,82 @@
 block discarded – undo
20 20
  */
21 21
 class EE_Newsletter_Shortcodes extends EE_Shortcodes {
22 22
 
23
-    protected function _init_props() {
24
-        $this->label = __("Newsletter Shortcodes", 'event_espresso');
25
-        $this->description = __('All shortcodes used for the newsletter message type', 'event_espresso');
26
-        $this->_shortcodes = array(
27
-            '[NEWSLETTER_CONTENT]' => __('This will parse to whatever is found in the related [newsletter_content] field.  Note that when triggering a newsletter message, whatever is added for the custom message will be inserted where this shortcode is placed', 'event_espresso')
28
-            );
29
-    }
23
+	protected function _init_props() {
24
+		$this->label = __("Newsletter Shortcodes", 'event_espresso');
25
+		$this->description = __('All shortcodes used for the newsletter message type', 'event_espresso');
26
+		$this->_shortcodes = array(
27
+			'[NEWSLETTER_CONTENT]' => __('This will parse to whatever is found in the related [newsletter_content] field.  Note that when triggering a newsletter message, whatever is added for the custom message will be inserted where this shortcode is placed', 'event_espresso')
28
+			);
29
+	}
30 30
 
31 31
 
32 32
 
33
-    protected function _parser( $shortcode ) {
34
-        if ( $shortcode == '[NEWSLETTER_CONTENT]' ) {
35
-            $this->_validate_list_requirements();
36
-            $this->_set_shortcode_helper();
37
-            $valid_shortcodes = array('recipient_details', 'organization');
38
-            $template = $this->_data['template']['newsletter_content'];
39
-            $data = $this->_data;
40
-            return $this->_shortcode_helper->parse_message_template( $template, $data['data'], $valid_shortcodes, $this->_message_type, $this->_messenger, $this->_context, $this->_GRP_ID );
41
-        }
42
-    }
33
+	protected function _parser( $shortcode ) {
34
+		if ( $shortcode == '[NEWSLETTER_CONTENT]' ) {
35
+			$this->_validate_list_requirements();
36
+			$this->_set_shortcode_helper();
37
+			$valid_shortcodes = array('recipient_details', 'organization');
38
+			$template = $this->_data['template']['newsletter_content'];
39
+			$data = $this->_data;
40
+			return $this->_shortcode_helper->parse_message_template( $template, $data['data'], $valid_shortcodes, $this->_message_type, $this->_messenger, $this->_context, $this->_GRP_ID );
41
+		}
42
+	}
43 43
 
44 44
 
45
-    /**
46
-     * Callback set in args for EE_Register_Messages_Shortcode_Library::register for 'msgr_validator_callback'.
47
-     *
48
-     * EE_Register_Messages_Shortcode_Library::register registers this callback with the
49
-     * 'FHEE__EE_messenger__get_validator_config' filter.
50
-     *
51
-     * @since    4.3.0
52
-     * @param  array                $validator_config  current validator configuration array
53
-     * @param  EE_messenger  $messenger
54
-     * @return  array                                             new validator config.
55
-     */
56
-    public static function messenger_validator_config( $validator_config, EE_messenger $messenger ) {
57
-        if ( $messenger->name !== 'email' )
58
-            return $validator_config;
45
+	/**
46
+	 * Callback set in args for EE_Register_Messages_Shortcode_Library::register for 'msgr_validator_callback'.
47
+	 *
48
+	 * EE_Register_Messages_Shortcode_Library::register registers this callback with the
49
+	 * 'FHEE__EE_messenger__get_validator_config' filter.
50
+	 *
51
+	 * @since    4.3.0
52
+	 * @param  array                $validator_config  current validator configuration array
53
+	 * @param  EE_messenger  $messenger
54
+	 * @return  array                                             new validator config.
55
+	 */
56
+	public static function messenger_validator_config( $validator_config, EE_messenger $messenger ) {
57
+		if ( $messenger->name !== 'email' )
58
+			return $validator_config;
59 59
 
60
-        $validator_config['content']['shortcodes'][] = 'newsletter';
61
-        $validator_config['newsletter_content'] = array(
62
-            'shortcodes' => array('recipient_details', 'organization'),
63
-            'required' => array('[NEWSLETTER_CONTENT]')
64
-            );
65
-        return $validator_config;
66
-    }
60
+		$validator_config['content']['shortcodes'][] = 'newsletter';
61
+		$validator_config['newsletter_content'] = array(
62
+			'shortcodes' => array('recipient_details', 'organization'),
63
+			'required' => array('[NEWSLETTER_CONTENT]')
64
+			);
65
+		return $validator_config;
66
+	}
67 67
 
68 68
 
69 69
 
70 70
 
71
-    /**
72
-     * Callback set in args for EE_Register_Messages_Shortcode_Library::register for
73
-     * 'msgr_template_fields_callback'.
74
-     *
75
-     * EE_Register_Messages_Shortcode_Library::register registers this callback with the
76
-     * FHEE__EE_messenger__get_template_fields filter.
77
-     *
78
-     * @since    4.3.0
79
-     *
80
-     * @param  array                $template_fields current template fields setup array.
81
-     * @param  EE_messenger  $messenger
82
-     * @return  array                                           new/modified template fields array.
83
-     */
84
-    public static function messenger_template_fields( $template_fields, EE_messenger $messenger ) {
85
-        if ( $messenger->name !== 'email' )
86
-            return $template_fields;
71
+	/**
72
+	 * Callback set in args for EE_Register_Messages_Shortcode_Library::register for
73
+	 * 'msgr_template_fields_callback'.
74
+	 *
75
+	 * EE_Register_Messages_Shortcode_Library::register registers this callback with the
76
+	 * FHEE__EE_messenger__get_template_fields filter.
77
+	 *
78
+	 * @since    4.3.0
79
+	 *
80
+	 * @param  array                $template_fields current template fields setup array.
81
+	 * @param  EE_messenger  $messenger
82
+	 * @return  array                                           new/modified template fields array.
83
+	 */
84
+	public static function messenger_template_fields( $template_fields, EE_messenger $messenger ) {
85
+		if ( $messenger->name !== 'email' )
86
+			return $template_fields;
87 87
 
88
-        $template_fields['extra']['content']['newsletter_content'] = array(
89
-            'input' => 'wp_editor',
90
-            'label' => '[NEWSLETTER_CONTENT]',
91
-            'type' => 'string',
92
-            'required' => TRUE,
93
-            'validation' => TRUE,
94
-            'format' => '%s',
95
-            'rows' => '15',
96
-            'shortcodes_required' => array('[NEWSLETTER_CONTENT]')
97
-            );
98
-        return $template_fields;
99
-    }
88
+		$template_fields['extra']['content']['newsletter_content'] = array(
89
+			'input' => 'wp_editor',
90
+			'label' => '[NEWSLETTER_CONTENT]',
91
+			'type' => 'string',
92
+			'required' => TRUE,
93
+			'validation' => TRUE,
94
+			'format' => '%s',
95
+			'rows' => '15',
96
+			'shortcodes_required' => array('[NEWSLETTER_CONTENT]')
97
+			);
98
+		return $template_fields;
99
+	}
100 100
 
101 101
 } //end class EE_Newsletter_Shortcodes
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 
31 31
 
32 32
 
33
-    protected function _parser( $shortcode ) {
34
-        if ( $shortcode == '[NEWSLETTER_CONTENT]' ) {
33
+    protected function _parser($shortcode) {
34
+        if ($shortcode == '[NEWSLETTER_CONTENT]') {
35 35
             $this->_validate_list_requirements();
36 36
             $this->_set_shortcode_helper();
37 37
             $valid_shortcodes = array('recipient_details', 'organization');
38 38
             $template = $this->_data['template']['newsletter_content'];
39 39
             $data = $this->_data;
40
-            return $this->_shortcode_helper->parse_message_template( $template, $data['data'], $valid_shortcodes, $this->_message_type, $this->_messenger, $this->_context, $this->_GRP_ID );
40
+            return $this->_shortcode_helper->parse_message_template($template, $data['data'], $valid_shortcodes, $this->_message_type, $this->_messenger, $this->_context, $this->_GRP_ID);
41 41
         }
42 42
     }
43 43
 
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
      * @param  EE_messenger  $messenger
54 54
      * @return  array                                             new validator config.
55 55
      */
56
-    public static function messenger_validator_config( $validator_config, EE_messenger $messenger ) {
57
-        if ( $messenger->name !== 'email' )
56
+    public static function messenger_validator_config($validator_config, EE_messenger $messenger) {
57
+        if ($messenger->name !== 'email')
58 58
             return $validator_config;
59 59
 
60 60
         $validator_config['content']['shortcodes'][] = 'newsletter';
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
      * @param  EE_messenger  $messenger
82 82
      * @return  array                                           new/modified template fields array.
83 83
      */
84
-    public static function messenger_template_fields( $template_fields, EE_messenger $messenger ) {
85
-        if ( $messenger->name !== 'email' )
84
+    public static function messenger_template_fields($template_fields, EE_messenger $messenger) {
85
+        if ($messenger->name !== 'email')
86 86
             return $template_fields;
87 87
 
88 88
         $template_fields['extra']['content']['newsletter_content'] = array(
Please login to merge, or discard this patch.
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@  discard block
 block discarded – undo
5 5
  * @subpackage helpers
6 6
  * @since           4.3.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * This is the library class for the "newsletter" group shortcodes.
@@ -54,8 +56,9 @@  discard block
 block discarded – undo
54 56
      * @return  array                                             new validator config.
55 57
      */
56 58
     public static function messenger_validator_config( $validator_config, EE_messenger $messenger ) {
57
-        if ( $messenger->name !== 'email' )
58
-            return $validator_config;
59
+        if ( $messenger->name !== 'email' ) {
60
+                    return $validator_config;
61
+        }
59 62
 
60 63
         $validator_config['content']['shortcodes'][] = 'newsletter';
61 64
         $validator_config['newsletter_content'] = array(
@@ -82,8 +85,9 @@  discard block
 block discarded – undo
82 85
      * @return  array                                           new/modified template fields array.
83 86
      */
84 87
     public static function messenger_template_fields( $template_fields, EE_messenger $messenger ) {
85
-        if ( $messenger->name !== 'email' )
86
-            return $template_fields;
88
+        if ( $messenger->name !== 'email' ) {
89
+                    return $template_fields;
90
+        }
87 91
 
88 92
         $template_fields['extra']['content']['newsletter_content'] = array(
89 93
             'input' => 'wp_editor',
Please login to merge, or discard this patch.
caffeinated/core/libraries/shortcodes/EE_Question_List_Shortcodes.lib.php 2 patches
Spacing   +11 added lines, -11 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
 /**
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 	}
48 48
 
49 49
 
50
-	protected function _parser( $shortcode ) {
50
+	protected function _parser($shortcode) {
51 51
 
52 52
 
53
-		switch ( $shortcode ) {
53
+		switch ($shortcode) {
54 54
 			case '[QUESTION_LIST]' :
55 55
 				return $this->_get_question_list();
56 56
 				break;
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
 		$this->_set_shortcode_helper();
66 66
 
67 67
 		//for when [QUESTION_LIST] is used in the [attendee_list] field.
68
-		if ( $this->_data['data'] instanceof EE_Registration ) {
68
+		if ($this->_data['data'] instanceof EE_Registration) {
69 69
 			return $this->_get_question_answer_list_for_attendee();
70 70
 		}
71 71
 		//for when [QUESTION_LIST] is used in the main content field.
72
-		else if ( $this->_data['data'] instanceof EE_Messages_Addressee && $this->_data['data']->reg_obj instanceof EE_Registration ) {
73
-			return $this->_get_question_answer_list_for_attendee( $this->_data['data']->reg_obj );
72
+		else if ($this->_data['data'] instanceof EE_Messages_Addressee && $this->_data['data']->reg_obj instanceof EE_Registration) {
73
+			return $this->_get_question_answer_list_for_attendee($this->_data['data']->reg_obj);
74 74
 		} else {
75 75
 			return '';
76 76
 		}
@@ -82,18 +82,18 @@  discard block
 block discarded – undo
82 82
 	 * Note when we parse the "[question_list]" shortcode for attendees we're actually going to retrieve the list of answers for that attendee since that is what we really need (we can derive the questions from the answers);
83 83
 	 * @return string parsed template.
84 84
 	 */
85
-	private function _get_question_answer_list_for_attendee( $reg_obj = null ) {
85
+	private function _get_question_answer_list_for_attendee($reg_obj = null) {
86 86
 		$valid_shortcodes = array('question');
87 87
 		$reg_obj = $reg_obj instanceof EE_Registration ? $reg_obj : $this->_data['data'];
88
-		$template = is_array( $this->_data['template'] ) && isset($this->_data['template']['question_list']) ? $this->_data['template']['question_list'] : $this->_extra_data['template']['question_list'];
88
+		$template = is_array($this->_data['template']) && isset($this->_data['template']['question_list']) ? $this->_data['template']['question_list'] : $this->_extra_data['template']['question_list'];
89 89
 		$ans_result = '';
90 90
 		$answers = ! empty($this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs']) ? $this->_extra_data['data']->registrations[$reg_obj->ID()]['ans_objs'] : array();
91
-		foreach ( $answers as $answer ) {
91
+		foreach ($answers as $answer) {
92 92
 			$question = $answer->question();
93
-			if ( $question instanceof EE_Question and $question->admin_only() ) {
93
+			if ($question instanceof EE_Question and $question->admin_only()) {
94 94
 						continue;
95 95
 					}
96
-			$ans_result .= $this->_shortcode_helper->parse_question_list_template( $template, $answer, $valid_shortcodes, $this->_extra_data);
96
+			$ans_result .= $this->_shortcode_helper->parse_question_list_template($template, $answer, $valid_shortcodes, $this->_extra_data);
97 97
 		}
98 98
 
99 99
 		return $ans_result;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
caffeinated/core/libraries/shortcodes/EE_Question_Shortcodes.lib.php 2 patches
Spacing   +12 added lines, -12 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
 /**
@@ -57,39 +57,39 @@  discard block
 block discarded – undo
57 57
 	 * @param string $shortcode the shortcode to be parsed.
58 58
 	 * @return string parsed shortcode
59 59
 	 */
60
-	protected function _parser( $shortcode ) {
60
+	protected function _parser($shortcode) {
61 61
 
62
-		if ( ! $this->_data instanceof EE_Answer || ! isset( $this->_extra_data['data'] ) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee ) {
62
+		if ( ! $this->_data instanceof EE_Answer || ! isset($this->_extra_data['data']) || ! $this->_extra_data['data'] instanceof EE_Messages_Addressee) {
63 63
 			return '';
64 64
 		}
65 65
 
66
-		switch ( $shortcode ) {
66
+		switch ($shortcode) {
67 67
 
68 68
 			case '[QUESTION]' :
69
-				$question = isset( $this->_extra_data['data']->questions[$this->_data->ID()] ) ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
70
-				if ( ! $question instanceof EE_Question ) {
69
+				$question = isset($this->_extra_data['data']->questions[$this->_data->ID()]) ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
70
+				if ( ! $question instanceof EE_Question) {
71 71
 					return ''; //get out because we can't figure out what the question is.
72 72
 				}
73
-				return $question->get_pretty( 'QST_display_text', 'no_wpautop' );
73
+				return $question->get_pretty('QST_display_text', 'no_wpautop');
74 74
 				break;
75 75
 
76 76
 			case '[ANSWER]' :
77 77
 				//need to get the question to determine the type of question (some questions require translation of the answer).
78
-				$question = isset( $this->_extra_data['data']->questions[$this->_data->ID()] ) ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
79
-				if ( ! $question instanceof EE_Question ) {
78
+				$question = isset($this->_extra_data['data']->questions[$this->_data->ID()]) ? $this->_extra_data['data']->questions[$this->_data->ID()] : $this->_data->question();
79
+				if ( ! $question instanceof EE_Question) {
80 80
 					return ''; //get out cause we can't figure out what the question type is!
81 81
 				}
82 82
 
83 83
 				//what we show for the answer depends on the question type!
84
-				switch ( $question->get( 'QST_type' ) ) {
84
+				switch ($question->get('QST_type')) {
85 85
 
86 86
 					case 'STATE' :
87
-						$state = EEM_State::instance()->get_one_by_ID( $this->_data->get('ANS_value') );
87
+						$state = EEM_State::instance()->get_one_by_ID($this->_data->get('ANS_value'));
88 88
 						$answer = $state instanceof EE_State ? $state->name() : '';
89 89
 						break;
90 90
 
91 91
 					case 'COUNTRY' :
92
-						$country = EEM_Country::instance()->get_one_by_ID( $this->_data->get( 'ANS_value') );
92
+						$country = EEM_Country::instance()->get_one_by_ID($this->_data->get('ANS_value'));
93 93
 						$answer = $country instanceof EE_Country ? $country->name() : '';
94 94
 						break;
95 95
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
caffeinated/modules/event_single_caff/EED_Event_Single_Caff.module.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @return EED_Event_Single_Caff
30 30
 	 */
31 31
 	public static function instance() {
32
-		return parent::get_instance( __CLASS__ );
32
+		return parent::get_instance(__CLASS__);
33 33
 	}
34 34
 
35 35
 
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 	 *  @return 	void
51 51
 	 */
52 52
 	public static function set_hooks_admin() {
53
-		define( 'EVENT_SINGLE_CAFF_TEMPLATES_PATH', plugin_dir_path( __FILE__ ) . 'templates' . DS );
54
-		add_action( 'AHEE__template_settings__template__before_settings_form', array( 'EED_Event_Single_Caff', 'template_settings_form' ), 10 );
55
-		add_filter( 'FHEE__General_Settings_Admin_Page__update_template_settings__data', array( 'EED_Event_Single_Caff', 'update_template_settings' ), 10, 2 );
53
+		define('EVENT_SINGLE_CAFF_TEMPLATES_PATH', plugin_dir_path(__FILE__).'templates'.DS);
54
+		add_action('AHEE__template_settings__template__before_settings_form', array('EED_Event_Single_Caff', 'template_settings_form'), 10);
55
+		add_filter('FHEE__General_Settings_Admin_Page__update_template_settings__data', array('EED_Event_Single_Caff', 'update_template_settings'), 10, 2);
56 56
 	}
57 57
 
58 58
 
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	public static function template_settings_form() {
71 71
 		$EE = EE_Registry::instance();
72
-		$EE->CFG->template_settings->EED_Event_Single = isset( $EE->CFG->template_settings->EED_Event_Single ) ? $EE->CFG->template_settings->EED_Event_Single : new EE_Event_Single_Config();
73
-		$EE->CFG->template_settings->EED_Event_Single = apply_filters( 'FHEE__EED_Event_Single__template_settings_form__event_list_config', $EE->CFG->template_settings->EED_Event_Single );
74
-		EEH_Template::display_template( EVENT_SINGLE_CAFF_TEMPLATES_PATH . 'admin-event-single-settings.template.php', $EE->CFG->template_settings->EED_Event_Single );
72
+		$EE->CFG->template_settings->EED_Event_Single = isset($EE->CFG->template_settings->EED_Event_Single) ? $EE->CFG->template_settings->EED_Event_Single : new EE_Event_Single_Config();
73
+		$EE->CFG->template_settings->EED_Event_Single = apply_filters('FHEE__EED_Event_Single__template_settings_form__event_list_config', $EE->CFG->template_settings->EED_Event_Single);
74
+		EEH_Template::display_template(EVENT_SINGLE_CAFF_TEMPLATES_PATH.'admin-event-single-settings.template.php', $EE->CFG->template_settings->EED_Event_Single);
75 75
 	}
76 76
 
77 77
 
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
 	 * @param $REQ
85 85
 	 * @return    void
86 86
 	 */
87
-	public static function update_template_settings( $CFG, $REQ ) {
87
+	public static function update_template_settings($CFG, $REQ) {
88 88
 		$CFG->EED_Event_Single = new EE_Event_Single_Config();
89
-		$CFG->EED_Event_Single->display_status_banner_single = !empty( $REQ['display_status_banner_single'] ) && $REQ['display_status_banner_single'] ? TRUE : FALSE;
90
-		$CFG->EED_Event_Single->display_venue = !empty( $REQ['display_venue'] ) && $REQ['display_venue'] ? TRUE : FALSE;
89
+		$CFG->EED_Event_Single->display_status_banner_single = ! empty($REQ['display_status_banner_single']) && $REQ['display_status_banner_single'] ? TRUE : FALSE;
90
+		$CFG->EED_Event_Single->display_venue = ! empty($REQ['display_venue']) && $REQ['display_venue'] ? TRUE : FALSE;
91 91
 		return $CFG;
92 92
 	}
93 93
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	 * @param WP $WP
101 101
 	 * @return    void
102 102
 	 */
103
-	public function run( $WP ) {
103
+	public function run($WP) {
104 104
 	}
105 105
 
106 106
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 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
  *
Please login to merge, or discard this patch.
event_single_caff/templates/admin-event-single-settings.template.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 					</label>
20 20
 				</th>
21 21
 				<td>
22
-					<?php echo EEH_Form_Fields::select_input( 'display_status_banner_single', $values, $display_status_banner_single, 'id="display_status_banner_single"' ); ?>
22
+					<?php echo EEH_Form_Fields::select_input('display_status_banner_single', $values, $display_status_banner_single, 'id="display_status_banner_single"'); ?>
23 23
 					<p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso'); ?></p>
24 24
 				</td>
25 25
 			</tr>
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 			<tr>
28 28
 				<th>
29 29
 					<label for="display_venue">
30
-						<?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');?>
30
+						<?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?>
31 31
 					</label>
32 32
 				</th>
33 33
 				<td>
34
-					<?php echo EEH_Form_Fields::select_input( 'display_venue', $values, $display_venue, 'id="display_venue"' ); ?>
34
+					<?php echo EEH_Form_Fields::select_input('display_venue', $values, $display_venue, 'id="display_venue"'); ?>
35 35
 					<p class="description"><?php _e('Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso'); ?></p>
36 36
 				</td>
37 37
 			</tr>
Please login to merge, or discard this patch.
modules/mijireh_payment_checker/EED_Mijireh_Payment_Checker.module.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 
6 6
 /**
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  * @author				Mike Nelson
20 20
  *
21 21
  */
22
-class EED_Mijireh_Payment_Checker extends EED_Module{
22
+class EED_Mijireh_Payment_Checker extends EED_Module {
23 23
 
24 24
 	/**
25 25
 	 * 	set_hooks - for hooking into EE Core, other modules, etc
@@ -40,18 +40,18 @@  discard block
 block discarded – undo
40 40
 	 *  @return 	void
41 41
 	 */
42 42
 	public static function set_hooks_admin() {
43
-		add_action( 'AHEE__Transactions_Admin_Page__transaction_details__start', array( 'EED_Mijireh_Payment_Checker', 'check_for_payment_update_on_transaction' ), 10, 1 );
43
+		add_action('AHEE__Transactions_Admin_Page__transaction_details__start', array('EED_Mijireh_Payment_Checker', 'check_for_payment_update_on_transaction'), 10, 1);
44 44
 	}
45 45
 
46
-	public static function check_for_payment_update_on_transaction( $transaction ) {
47
-		if( $transaction instanceof EE_Transaction ) {
46
+	public static function check_for_payment_update_on_transaction($transaction) {
47
+		if ($transaction instanceof EE_Transaction) {
48 48
 			$last_payment = $transaction->last_payment();
49 49
 			//if this payment is from Mijireh and so far unapproved
50
-			if( $last_payment instanceof EE_Payment &&
50
+			if ($last_payment instanceof EE_Payment &&
51 51
 					$last_payment->payment_method() &&
52 52
 					$last_payment->payment_method()->type_obj() instanceof EE_PMT_Mijireh &&
53
-					$last_payment->status() != EEM_Payment::status_id_approved ) {
54
-				$updated_payment = $last_payment->payment_method()->type_obj()->handle_ipn( NULL, $transaction );
53
+					$last_payment->status() != EEM_Payment::status_id_approved) {
54
+				$updated_payment = $last_payment->payment_method()->type_obj()->handle_ipn(NULL, $transaction);
55 55
 				$updated_payment->save();
56 56
 			}
57 57
 		}
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 *  @access 	public
63 63
 	 *  @return 	void
64 64
 	 */
65
-	public function run( $WP ) {
65
+	public function run($WP) {
66 66
 	}
67 67
 }
68 68
 
Please login to merge, or discard this patch.