Completed
Branch RELEASE (416965)
by
unknown
06:57 queued 14s
created
core/libraries/form_sections/inputs/EE_Datepicker_Input.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             )
30 30
         );
31 31
         parent::__construct($input_settings);
32
-        $this->set_html_class($this->html_class() . ' datepicker');
32
+        $this->set_html_class($this->html_class().' datepicker');
33 33
         // add some style and make it dance
34 34
         add_action('wp_enqueue_scripts', array('EE_Datepicker_Input', 'enqueue_styles_and_scripts'));
35 35
         add_action('admin_enqueue_scripts', array('EE_Datepicker_Input', 'enqueue_styles_and_scripts'));
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         // load css
49 49
         wp_register_style(
50 50
             'espresso-ui-theme',
51
-            EE_GLOBAL_ASSETS_URL . 'css/espresso-ui-theme/jquery-ui-1.10.3.custom.min.css',
51
+            EE_GLOBAL_ASSETS_URL.'css/espresso-ui-theme/jquery-ui-1.10.3.custom.min.css',
52 52
             array(),
53 53
             EVENT_ESPRESSO_VERSION
54 54
         );
Please login to merge, or discard this patch.
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -9,45 +9,45 @@
 block discarded – undo
9 9
  */
10 10
 class EE_Datepicker_Input extends EE_Form_Input_Base
11 11
 {
12
-    /**
13
-     * @param array $input_settings
14
-     */
15
-    public function __construct($input_settings = array())
16
-    {
17
-        $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('datepicker'));
18
-        $this->_set_normalization_strategy(new EE_Text_Normalization());
19
-        // we could do better for validation, but at least verify its plaintext
20
-        $this->_add_validation_strategy(
21
-            new EE_Plaintext_Validation_Strategy(
22
-                isset($input_settings['validation_error_message'])
23
-                    ? $input_settings['validation_error_message']
24
-                    : null
25
-            )
26
-        );
27
-        parent::__construct($input_settings);
28
-        $this->set_html_class($this->html_class() . ' datepicker');
29
-        // add some style and make it dance
30
-        add_action('wp_enqueue_scripts', array('EE_Datepicker_Input', 'enqueue_styles_and_scripts'));
31
-        add_action('admin_enqueue_scripts', array('EE_Datepicker_Input', 'enqueue_styles_and_scripts'));
32
-    }
12
+	/**
13
+	 * @param array $input_settings
14
+	 */
15
+	public function __construct($input_settings = array())
16
+	{
17
+		$this->_set_display_strategy(new EE_Text_Input_Display_Strategy('datepicker'));
18
+		$this->_set_normalization_strategy(new EE_Text_Normalization());
19
+		// we could do better for validation, but at least verify its plaintext
20
+		$this->_add_validation_strategy(
21
+			new EE_Plaintext_Validation_Strategy(
22
+				isset($input_settings['validation_error_message'])
23
+					? $input_settings['validation_error_message']
24
+					: null
25
+			)
26
+		);
27
+		parent::__construct($input_settings);
28
+		$this->set_html_class($this->html_class() . ' datepicker');
29
+		// add some style and make it dance
30
+		add_action('wp_enqueue_scripts', array('EE_Datepicker_Input', 'enqueue_styles_and_scripts'));
31
+		add_action('admin_enqueue_scripts', array('EE_Datepicker_Input', 'enqueue_styles_and_scripts'));
32
+	}
33 33
 
34 34
 
35 35
 
36
-    /**
37
-     *    enqueue_styles_and_scripts
38
-     *
39
-     * @access        public
40
-     * @return        void
41
-     */
42
-    public static function enqueue_styles_and_scripts()
43
-    {
44
-        // load css
45
-        wp_register_style(
46
-            'espresso-ui-theme',
47
-            EE_GLOBAL_ASSETS_URL . 'css/espresso-ui-theme/jquery-ui-1.10.3.custom.min.css',
48
-            array(),
49
-            EVENT_ESPRESSO_VERSION
50
-        );
51
-        wp_enqueue_style('espresso-ui-theme');
52
-    }
36
+	/**
37
+	 *    enqueue_styles_and_scripts
38
+	 *
39
+	 * @access        public
40
+	 * @return        void
41
+	 */
42
+	public static function enqueue_styles_and_scripts()
43
+	{
44
+		// load css
45
+		wp_register_style(
46
+			'espresso-ui-theme',
47
+			EE_GLOBAL_ASSETS_URL . 'css/espresso-ui-theme/jquery-ui-1.10.3.custom.min.css',
48
+			array(),
49
+			EVENT_ESPRESSO_VERSION
50
+		);
51
+		wp_enqueue_style('espresso-ui-theme');
52
+	}
53 53
 }
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/loop-espresso_event_attendees.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @type bool       $show_gravatar  whether to show gravatar or not.
16 16
  */
17 17
 
18
-$no_attendees_message =  apply_filters( 'FHEE__loop-espresso_attendees-shortcode__template__no_attendees_message', __('No Attendees Yet', 'event_espresso' ) );
18
+$no_attendees_message = apply_filters('FHEE__loop-espresso_attendees-shortcode__template__no_attendees_message', __('No Attendees Yet', 'event_espresso'));
19 19
 
20 20
 
21 21
 ?>
@@ -31,16 +31,16 @@  discard block
 block discarded – undo
31 31
             $show_gravatar,
32 32
         )
33 33
     ); ?>
34
-	<?php if ( $contacts ) : ?>
34
+	<?php if ($contacts) : ?>
35 35
 		<ul class="event-attendees-list">
36
-			<?php foreach( $contacts as $contact ) :
37
-				EEH_Template::get_template_part( 'content', 'espresso_event_attendees', array( 
36
+			<?php foreach ($contacts as $contact) :
37
+				EEH_Template::get_template_part('content', 'espresso_event_attendees', array( 
38 38
 					'contact'       => $contact, 
39 39
 					'event'         => $event,
40 40
 					'datetime'      => $datetime,
41 41
 					'ticket'        => $ticket,
42 42
 					'show_gravatar' => $show_gravatar 
43
-				) );
43
+				));
44 44
 				endforeach; ?>
45 45
 		</ul>
46 46
 	<?php else : ?>
Please login to merge, or discard this patch.
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -22,15 +22,15 @@  discard block
 block discarded – undo
22 22
 
23 23
 <div class="event-attendees">
24 24
     <?php do_action_ref_array(
25
-        'AHEE__loop-espresso_event_attendees__before',
26
-        array(
27
-            $contacts,
28
-            $event,
29
-            $datetime,
30
-            $ticket,
31
-            $show_gravatar,
32
-        )
33
-    ); ?>
25
+		'AHEE__loop-espresso_event_attendees__before',
26
+		array(
27
+			$contacts,
28
+			$event,
29
+			$datetime,
30
+			$ticket,
31
+			$show_gravatar,
32
+		)
33
+	); ?>
34 34
 	<?php if ( $contacts ) : ?>
35 35
 		<ul class="event-attendees-list">
36 36
 			<?php foreach( $contacts as $contact ) :
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
 		<p><?php echo esc_html($no_attendees_message); ?></p>
48 48
 	<?php endif; ?>
49 49
     <?php do_action_ref_array(
50
-        'AHEE__loop-espresso_event_attendees__after',
51
-        array(
52
-            $contacts,
53
-            $event,
54
-            $datetime,
55
-            $ticket,
56
-            $show_gravatar,
57
-        )
58
-    ); ?>
50
+		'AHEE__loop-espresso_event_attendees__after',
51
+		array(
52
+			$contacts,
53
+			$event,
54
+			$datetime,
55
+			$ticket,
56
+			$show_gravatar,
57
+		)
58
+	); ?>
59 59
 </div>
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,11 @@
 block discarded – undo
43 43
 				) );
44 44
 				endforeach; ?>
45 45
 		</ul>
46
-	<?php else : ?>
47
-		<p><?php echo esc_html($no_attendees_message); ?></p>
46
+	<?php else {
47
+	: ?>
48
+		<p><?php echo esc_html($no_attendees_message);
49
+}
50
+?></p>
48 51
 	<?php endif; ?>
49 52
     <?php do_action_ref_array(
50 53
         'AHEE__loop-espresso_event_attendees__after',
Please login to merge, or discard this patch.
core/services/notices/ConvertNoticesToAdminNotices.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             $error_string = esc_html__('The following errors occurred:', 'event_espresso');
37 37
             foreach ($notices->getError() as $notice) {
38 38
                 if ($this->getThrowExceptions()) {
39
-                    $error_string .= '<br />' . $notice->message();
39
+                    $error_string .= '<br />'.$notice->message();
40 40
                 } else {
41 41
                     new AdminNotice($notice);
42 42
                 }
Please login to merge, or discard this patch.
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -13,42 +13,42 @@
 block discarded – undo
13 13
  */
14 14
 class ConvertNoticesToAdminNotices extends NoticeConverter
15 15
 {
16
-    /**
17
-     * Converts Notice objects into AdminNotice notifications
18
-     *
19
-     * @param NoticesContainerInterface $notices
20
-     * @throws DomainException
21
-     */
22
-    public function process($notices)
23
-    {
24
-        if ($notices->hasAttention()) {
25
-            foreach ($notices->getAttention() as $notice) {
26
-                new AdminNotice($notice);
27
-            }
28
-        }
29
-        if ($notices->hasError()) {
30
-            $error_string = esc_html__('The following errors occurred:', 'event_espresso');
31
-            foreach ($notices->getError() as $notice) {
32
-                if ($this->getThrowExceptions()) {
33
-                    $error_string .= '<br />' . $notice->message();
34
-                } else {
35
-                    new AdminNotice($notice);
36
-                }
37
-            }
38
-            if ($this->getThrowExceptions()) {
39
-                throw new DomainException($error_string);
40
-            }
41
-        }
42
-        if ($notices->hasSuccess()) {
43
-            foreach ($notices->getSuccess() as $notice) {
44
-                new AdminNotice($notice);
45
-            }
46
-        }
47
-        if ($notices->hasInformation()) {
48
-            foreach ($notices->getInformation() as $notice) {
49
-                new AdminNotice($notice);
50
-            }
51
-        }
52
-        $this->clearNotices();
53
-    }
16
+	/**
17
+	 * Converts Notice objects into AdminNotice notifications
18
+	 *
19
+	 * @param NoticesContainerInterface $notices
20
+	 * @throws DomainException
21
+	 */
22
+	public function process($notices)
23
+	{
24
+		if ($notices->hasAttention()) {
25
+			foreach ($notices->getAttention() as $notice) {
26
+				new AdminNotice($notice);
27
+			}
28
+		}
29
+		if ($notices->hasError()) {
30
+			$error_string = esc_html__('The following errors occurred:', 'event_espresso');
31
+			foreach ($notices->getError() as $notice) {
32
+				if ($this->getThrowExceptions()) {
33
+					$error_string .= '<br />' . $notice->message();
34
+				} else {
35
+					new AdminNotice($notice);
36
+				}
37
+			}
38
+			if ($this->getThrowExceptions()) {
39
+				throw new DomainException($error_string);
40
+			}
41
+		}
42
+		if ($notices->hasSuccess()) {
43
+			foreach ($notices->getSuccess() as $notice) {
44
+				new AdminNotice($notice);
45
+			}
46
+		}
47
+		if ($notices->hasInformation()) {
48
+			foreach ($notices->getInformation() as $notice) {
49
+				new AdminNotice($notice);
50
+			}
51
+		}
52
+		$this->clearNotices();
53
+	}
54 54
 }
Please login to merge, or discard this patch.
core/domain/entities/contexts/RequestTypeContext.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
     public function __construct($slug, $description)
92 92
     {
93 93
         parent::__construct($slug, $description);
94
-        if (! in_array($this->slug(), $this->validRequestTypes(), true)) {
94
+        if ( ! in_array($this->slug(), $this->validRequestTypes(), true)) {
95 95
             throw new InvalidArgumentException(
96 96
                 sprintf(
97 97
                     esc_html__(
Please login to merge, or discard this patch.
Indentation   +181 added lines, -181 removed lines patch added patch discarded remove patch
@@ -15,185 +15,185 @@
 block discarded – undo
15 15
  */
16 16
 class RequestTypeContext extends Context
17 17
 {
18
-    /**
19
-     * indicates that the current request involves some form of activation
20
-     */
21
-    const ACTIVATION = 'activation-request';
22
-
23
-    /**
24
-     * indicates that the current request is for the admin but is not being made via AJAX
25
-     */
26
-    const ADMIN = 'non-ajax-admin-request';
27
-
28
-    /**
29
-     * indicates that the current request is for the admin AND is being made via AJAX
30
-     */
31
-    const AJAX_ADMIN = 'admin-ajax-request';
32
-
33
-    /**
34
-     * indicates that the current request is for the frontend AND is being made via AJAX
35
-     */
36
-    const AJAX_FRONT = 'frontend-ajax-request';
37
-
38
-    /**
39
-     * indicates that the current request is for the WP Heartbeat
40
-     */
41
-    const AJAX_HEARTBEAT = 'admin-ajax-heartbeat';
42
-
43
-    /**
44
-     * indicates that the current request is being made via AJAX, but is NOT for EE
45
-     */
46
-    const AJAX_OTHER = 'other-ajax-request';
47
-
48
-    /**
49
-     * indicates that the current request is for the EE REST API
50
-     */
51
-    const API = 'rest-api';
52
-
53
-    /**
54
-     * indicates that the current request is from the command line
55
-     */
56
-    const CLI = 'command-line';
57
-
58
-    /**
59
-     * indicates that the current request is for a WP_Cron
60
-     */
61
-    const CRON = 'wp-cron';
62
-
63
-    /**
64
-     * indicates that the current request is for a feed (ie: RSS)
65
-     */
66
-    const FEED = 'feed-request';
67
-
68
-    /**
69
-     * indicates that the current request is for the frontend but is not being made via AJAX
70
-     */
71
-    const FRONTEND = 'non-ajax-frontend-request';
72
-
73
-    /**
74
-     * indicates that the current request is for content that is to be displayed within an iframe
75
-     */
76
-    const IFRAME = 'iframe-request';
77
-
78
-    /**
79
-     * indicates that the current request is for the EE GraphQL manager
80
-     */
81
-    const GQL = 'graphql';
82
-
83
-    /**
84
-     * indicates that the current request is for the WP REST API
85
-     */
86
-    const WP_API = 'wp-rest-api';
87
-
88
-    /**
89
-     * indicates that the current request is a loopback sent from WP core to test for errors
90
-     */
91
-    const WP_SCRAPE = 'wordpress-scrape';
92
-
93
-    /**
94
-     * @var boolean $is_activation
95
-     */
96
-    private $is_activation = false;
97
-
98
-    /**
99
-     * @var boolean $is_unit_testing
100
-     */
101
-    private $is_unit_testing = false;
102
-
103
-    /**
104
-     * @var array $valid_request_types
105
-     */
106
-    private $valid_request_types = array();
107
-
108
-
109
-    /**
110
-     * RequestTypeContext constructor.
111
-     *
112
-     * @param string $slug
113
-     * @param string $description
114
-     * @throws InvalidArgumentException
115
-     */
116
-    public function __construct($slug, $description)
117
-    {
118
-        parent::__construct($slug, $description);
119
-        if (! in_array($this->slug(), $this->validRequestTypes(), true)) {
120
-            throw new InvalidArgumentException(
121
-                sprintf(
122
-                    esc_html__(
123
-                        'The RequestTypeContext slug must be one of the following values: %1$s %2$s',
124
-                        'event_espresso'
125
-                    ),
126
-                    '<br />',
127
-                    var_export($this->validRequestTypes(), true)
128
-                )
129
-            );
130
-        }
131
-    }
132
-
133
-
134
-    /**
135
-     * @return array
136
-     */
137
-    public function validRequestTypes()
138
-    {
139
-        if (empty($this->valid_request_types)) {
140
-            $this->valid_request_types = apply_filters(
141
-                'FHEE__EventEspresso_core_domain_entities_contexts_RequestTypeContext__validRequestTypes',
142
-                array(
143
-                    RequestTypeContext::ACTIVATION,
144
-                    RequestTypeContext::ADMIN,
145
-                    RequestTypeContext::AJAX_ADMIN,
146
-                    RequestTypeContext::AJAX_FRONT,
147
-                    RequestTypeContext::AJAX_HEARTBEAT,
148
-                    RequestTypeContext::AJAX_OTHER,
149
-                    RequestTypeContext::API,
150
-                    RequestTypeContext::CLI,
151
-                    RequestTypeContext::CRON,
152
-                    RequestTypeContext::FEED,
153
-                    RequestTypeContext::FRONTEND,
154
-                    RequestTypeContext::GQL,
155
-                    RequestTypeContext::IFRAME,
156
-                    RequestTypeContext::WP_API,
157
-                    RequestTypeContext::WP_SCRAPE,
158
-                )
159
-            );
160
-        }
161
-        return $this->valid_request_types;
162
-    }
163
-
164
-
165
-    /**
166
-     * @return bool
167
-     */
168
-    public function isActivation()
169
-    {
170
-        return $this->is_activation;
171
-    }
172
-
173
-
174
-    /**
175
-     * @param bool $is_activation
176
-     */
177
-    public function setIsActivation($is_activation = false)
178
-    {
179
-        $this->is_activation = filter_var($is_activation, FILTER_VALIDATE_BOOLEAN);
180
-    }
181
-
182
-
183
-    /**
184
-     * @return bool
185
-     */
186
-    public function isUnitTesting()
187
-    {
188
-        return $this->is_unit_testing;
189
-    }
190
-
191
-
192
-    /**
193
-     * @param bool $is_unit_testing
194
-     */
195
-    public function setIsUnitTesting($is_unit_testing = false)
196
-    {
197
-        $this->is_unit_testing = filter_var($is_unit_testing, FILTER_VALIDATE_BOOLEAN);
198
-    }
18
+	/**
19
+	 * indicates that the current request involves some form of activation
20
+	 */
21
+	const ACTIVATION = 'activation-request';
22
+
23
+	/**
24
+	 * indicates that the current request is for the admin but is not being made via AJAX
25
+	 */
26
+	const ADMIN = 'non-ajax-admin-request';
27
+
28
+	/**
29
+	 * indicates that the current request is for the admin AND is being made via AJAX
30
+	 */
31
+	const AJAX_ADMIN = 'admin-ajax-request';
32
+
33
+	/**
34
+	 * indicates that the current request is for the frontend AND is being made via AJAX
35
+	 */
36
+	const AJAX_FRONT = 'frontend-ajax-request';
37
+
38
+	/**
39
+	 * indicates that the current request is for the WP Heartbeat
40
+	 */
41
+	const AJAX_HEARTBEAT = 'admin-ajax-heartbeat';
42
+
43
+	/**
44
+	 * indicates that the current request is being made via AJAX, but is NOT for EE
45
+	 */
46
+	const AJAX_OTHER = 'other-ajax-request';
47
+
48
+	/**
49
+	 * indicates that the current request is for the EE REST API
50
+	 */
51
+	const API = 'rest-api';
52
+
53
+	/**
54
+	 * indicates that the current request is from the command line
55
+	 */
56
+	const CLI = 'command-line';
57
+
58
+	/**
59
+	 * indicates that the current request is for a WP_Cron
60
+	 */
61
+	const CRON = 'wp-cron';
62
+
63
+	/**
64
+	 * indicates that the current request is for a feed (ie: RSS)
65
+	 */
66
+	const FEED = 'feed-request';
67
+
68
+	/**
69
+	 * indicates that the current request is for the frontend but is not being made via AJAX
70
+	 */
71
+	const FRONTEND = 'non-ajax-frontend-request';
72
+
73
+	/**
74
+	 * indicates that the current request is for content that is to be displayed within an iframe
75
+	 */
76
+	const IFRAME = 'iframe-request';
77
+
78
+	/**
79
+	 * indicates that the current request is for the EE GraphQL manager
80
+	 */
81
+	const GQL = 'graphql';
82
+
83
+	/**
84
+	 * indicates that the current request is for the WP REST API
85
+	 */
86
+	const WP_API = 'wp-rest-api';
87
+
88
+	/**
89
+	 * indicates that the current request is a loopback sent from WP core to test for errors
90
+	 */
91
+	const WP_SCRAPE = 'wordpress-scrape';
92
+
93
+	/**
94
+	 * @var boolean $is_activation
95
+	 */
96
+	private $is_activation = false;
97
+
98
+	/**
99
+	 * @var boolean $is_unit_testing
100
+	 */
101
+	private $is_unit_testing = false;
102
+
103
+	/**
104
+	 * @var array $valid_request_types
105
+	 */
106
+	private $valid_request_types = array();
107
+
108
+
109
+	/**
110
+	 * RequestTypeContext constructor.
111
+	 *
112
+	 * @param string $slug
113
+	 * @param string $description
114
+	 * @throws InvalidArgumentException
115
+	 */
116
+	public function __construct($slug, $description)
117
+	{
118
+		parent::__construct($slug, $description);
119
+		if (! in_array($this->slug(), $this->validRequestTypes(), true)) {
120
+			throw new InvalidArgumentException(
121
+				sprintf(
122
+					esc_html__(
123
+						'The RequestTypeContext slug must be one of the following values: %1$s %2$s',
124
+						'event_espresso'
125
+					),
126
+					'<br />',
127
+					var_export($this->validRequestTypes(), true)
128
+				)
129
+			);
130
+		}
131
+	}
132
+
133
+
134
+	/**
135
+	 * @return array
136
+	 */
137
+	public function validRequestTypes()
138
+	{
139
+		if (empty($this->valid_request_types)) {
140
+			$this->valid_request_types = apply_filters(
141
+				'FHEE__EventEspresso_core_domain_entities_contexts_RequestTypeContext__validRequestTypes',
142
+				array(
143
+					RequestTypeContext::ACTIVATION,
144
+					RequestTypeContext::ADMIN,
145
+					RequestTypeContext::AJAX_ADMIN,
146
+					RequestTypeContext::AJAX_FRONT,
147
+					RequestTypeContext::AJAX_HEARTBEAT,
148
+					RequestTypeContext::AJAX_OTHER,
149
+					RequestTypeContext::API,
150
+					RequestTypeContext::CLI,
151
+					RequestTypeContext::CRON,
152
+					RequestTypeContext::FEED,
153
+					RequestTypeContext::FRONTEND,
154
+					RequestTypeContext::GQL,
155
+					RequestTypeContext::IFRAME,
156
+					RequestTypeContext::WP_API,
157
+					RequestTypeContext::WP_SCRAPE,
158
+				)
159
+			);
160
+		}
161
+		return $this->valid_request_types;
162
+	}
163
+
164
+
165
+	/**
166
+	 * @return bool
167
+	 */
168
+	public function isActivation()
169
+	{
170
+		return $this->is_activation;
171
+	}
172
+
173
+
174
+	/**
175
+	 * @param bool $is_activation
176
+	 */
177
+	public function setIsActivation($is_activation = false)
178
+	{
179
+		$this->is_activation = filter_var($is_activation, FILTER_VALIDATE_BOOLEAN);
180
+	}
181
+
182
+
183
+	/**
184
+	 * @return bool
185
+	 */
186
+	public function isUnitTesting()
187
+	{
188
+		return $this->is_unit_testing;
189
+	}
190
+
191
+
192
+	/**
193
+	 * @param bool $is_unit_testing
194
+	 */
195
+	public function setIsUnitTesting($is_unit_testing = false)
196
+	{
197
+		$this->is_unit_testing = filter_var($is_unit_testing, FILTER_VALIDATE_BOOLEAN);
198
+	}
199 199
 }
Please login to merge, or discard this patch.
core/db_classes/EE_WP_User.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      */
52 52
     public function wp_user_obj()
53 53
     {
54
-        if (! $this->_wp_user_obj) {
54
+        if ( ! $this->_wp_user_obj) {
55 55
             $this->_wp_user_obj = get_user_by('ID', $this->ID());
56 56
         }
57 57
         return $this->_wp_user_obj;
Please login to merge, or discard this patch.
Indentation   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -12,111 +12,111 @@
 block discarded – undo
12 12
  */
13 13
 class EE_WP_User extends EE_Base_Class implements EEI_Admin_Links
14 14
 {
15
-    /**
16
-     * @var WP_User
17
-     */
18
-    protected $_wp_user_obj;
19
-
20
-
21
-    /**
22
-     * @param array $props_n_values
23
-     * @return EE_WP_User|mixed
24
-     * @throws EE_Error
25
-     * @throws ReflectionException
26
-     */
27
-    public static function new_instance($props_n_values = [])
28
-    {
29
-        $has_object = parent::_check_for_object($props_n_values, __CLASS__);
30
-        return $has_object ?: new self($props_n_values);
31
-    }
32
-
33
-
34
-    /**
35
-     * @param array $props_n_values
36
-     * @return EE_WP_User
37
-     * @throws EE_Error
38
-     * @throws ReflectionException
39
-     */
40
-    public static function new_instance_from_db($props_n_values = [])
41
-    {
42
-        return new self($props_n_values, true);
43
-    }
44
-
45
-
46
-    /**
47
-     * Return a normal WP_User object (caches the object for future calls)
48
-     *
49
-     * @return WP_User
50
-     * @throws EE_Error
51
-     * @throws ReflectionException
52
-     */
53
-    public function wp_user_obj()
54
-    {
55
-        if (! $this->_wp_user_obj) {
56
-            $this->_wp_user_obj = get_user_by('ID', $this->ID());
57
-        }
58
-        return $this->_wp_user_obj;
59
-    }
60
-
61
-
62
-    /**
63
-     * Return the link to the admin details for the object.
64
-     *
65
-     * @return string
66
-     * @throws EE_Error
67
-     * @throws ReflectionException
68
-     */
69
-    public function get_admin_details_link()
70
-    {
71
-        return $this->get_admin_edit_link();
72
-    }
73
-
74
-
75
-    /**
76
-     * Returns the link to the editor for the object.  Sometimes this is the same as the details.
77
-     *
78
-     * @return string
79
-     * @throws EE_Error
80
-     * @throws ReflectionException
81
-     */
82
-    public function get_admin_edit_link()
83
-    {
84
-        /** @var RequestInterface $request */
85
-        $request = LoaderFactory::getLoader()->getShared(RequestInterface::class);
86
-        return esc_url(
87
-            add_query_arg(
88
-                'wp_http_referer',
89
-                urlencode(
90
-                    wp_unslash(
91
-                        $request->getServerParam('REQUEST_URI')
92
-                    )
93
-                ),
94
-                get_edit_user_link($this->ID())
95
-            )
96
-        );
97
-    }
98
-
99
-
100
-    /**
101
-     * Returns the link to a settings page for the object.
102
-     *
103
-     * @return string
104
-     * @throws EE_Error
105
-     * @throws ReflectionException
106
-     */
107
-    public function get_admin_settings_link()
108
-    {
109
-        return $this->get_admin_edit_link();
110
-    }
111
-
112
-
113
-    /**
114
-     * Returns the link to the "overview" for the object (typically the "list table" view).
115
-     *
116
-     * @return string
117
-     */
118
-    public function get_admin_overview_link()
119
-    {
120
-        return admin_url('users.php');
121
-    }
15
+	/**
16
+	 * @var WP_User
17
+	 */
18
+	protected $_wp_user_obj;
19
+
20
+
21
+	/**
22
+	 * @param array $props_n_values
23
+	 * @return EE_WP_User|mixed
24
+	 * @throws EE_Error
25
+	 * @throws ReflectionException
26
+	 */
27
+	public static function new_instance($props_n_values = [])
28
+	{
29
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__);
30
+		return $has_object ?: new self($props_n_values);
31
+	}
32
+
33
+
34
+	/**
35
+	 * @param array $props_n_values
36
+	 * @return EE_WP_User
37
+	 * @throws EE_Error
38
+	 * @throws ReflectionException
39
+	 */
40
+	public static function new_instance_from_db($props_n_values = [])
41
+	{
42
+		return new self($props_n_values, true);
43
+	}
44
+
45
+
46
+	/**
47
+	 * Return a normal WP_User object (caches the object for future calls)
48
+	 *
49
+	 * @return WP_User
50
+	 * @throws EE_Error
51
+	 * @throws ReflectionException
52
+	 */
53
+	public function wp_user_obj()
54
+	{
55
+		if (! $this->_wp_user_obj) {
56
+			$this->_wp_user_obj = get_user_by('ID', $this->ID());
57
+		}
58
+		return $this->_wp_user_obj;
59
+	}
60
+
61
+
62
+	/**
63
+	 * Return the link to the admin details for the object.
64
+	 *
65
+	 * @return string
66
+	 * @throws EE_Error
67
+	 * @throws ReflectionException
68
+	 */
69
+	public function get_admin_details_link()
70
+	{
71
+		return $this->get_admin_edit_link();
72
+	}
73
+
74
+
75
+	/**
76
+	 * Returns the link to the editor for the object.  Sometimes this is the same as the details.
77
+	 *
78
+	 * @return string
79
+	 * @throws EE_Error
80
+	 * @throws ReflectionException
81
+	 */
82
+	public function get_admin_edit_link()
83
+	{
84
+		/** @var RequestInterface $request */
85
+		$request = LoaderFactory::getLoader()->getShared(RequestInterface::class);
86
+		return esc_url(
87
+			add_query_arg(
88
+				'wp_http_referer',
89
+				urlencode(
90
+					wp_unslash(
91
+						$request->getServerParam('REQUEST_URI')
92
+					)
93
+				),
94
+				get_edit_user_link($this->ID())
95
+			)
96
+		);
97
+	}
98
+
99
+
100
+	/**
101
+	 * Returns the link to a settings page for the object.
102
+	 *
103
+	 * @return string
104
+	 * @throws EE_Error
105
+	 * @throws ReflectionException
106
+	 */
107
+	public function get_admin_settings_link()
108
+	{
109
+		return $this->get_admin_edit_link();
110
+	}
111
+
112
+
113
+	/**
114
+	 * Returns the link to the "overview" for the object (typically the "list table" view).
115
+	 *
116
+	 * @return string
117
+	 */
118
+	public function get_admin_overview_link()
119
+	{
120
+		return admin_url('users.php');
121
+	}
122 122
 }
Please login to merge, or discard this patch.
core/services/request/middleware/PreProductionVersionWarning.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     public function preProductionVersionAdminNotice()
79 79
     {
80 80
         new PersistentAdminNotice(
81
-            'preProductionVersionAdminNotice_' . EVENT_ESPRESSO_VERSION,
81
+            'preProductionVersionAdminNotice_'.EVENT_ESPRESSO_VERSION,
82 82
             $this->warningNotice()
83 83
         );
84 84
     }
Please login to merge, or discard this patch.
Indentation   +79 added lines, -79 removed lines patch added patch discarded remove patch
@@ -18,91 +18,91 @@
 block discarded – undo
18 18
  */
19 19
 class PreProductionVersionWarning extends Middleware
20 20
 {
21
-    /**
22
-     * converts a Request to a Response
23
-     *
24
-     * @param RequestInterface  $request
25
-     * @param ResponseInterface $response
26
-     * @return ResponseInterface
27
-     */
28
-    public function handleRequest($request, $response)
29
-    {
30
-        $this->request = $request;
31
-        $this->response = $response;
32
-        $this->displayPreProductionVersionWarning();
33
-        $this->response = $this->processRequestStack($this->request, $this->response);
34
-        return $this->response;
35
-    }
21
+	/**
22
+	 * converts a Request to a Response
23
+	 *
24
+	 * @param RequestInterface  $request
25
+	 * @param ResponseInterface $response
26
+	 * @return ResponseInterface
27
+	 */
28
+	public function handleRequest($request, $response)
29
+	{
30
+		$this->request = $request;
31
+		$this->response = $response;
32
+		$this->displayPreProductionVersionWarning();
33
+		$this->response = $this->processRequestStack($this->request, $this->response);
34
+		return $this->response;
35
+	}
36 36
 
37 37
 
38
-    /**
39
-     * displays message on frontend of site notifying admin that EE has been temporarily placed into maintenance mode
40
-     *
41
-     * @return void
42
-     */
43
-    public function displayPreProductionVersionWarning()
44
-    {
45
-        // skip AJAX requests
46
-        if ($this->request->isAjax()) {
47
-            return;
48
-        }
49
-        // skip stable releases
50
-        if (substr(EVENT_ESPRESSO_VERSION, -5) !== '.beta') {
51
-            return;
52
-        }
53
-        // site admin has authorized use of non-stable release candidate for production
54
-        if (defined('ALLOW_NON_STABLE_RELEASE_ON_LIVE_SITE') && ALLOW_NON_STABLE_RELEASE_ON_LIVE_SITE) {
55
-            return;
56
-        }
57
-        // post release candidate warning
58
-        if ($this->request->isAdmin()) {
59
-            add_action('admin_notices', array($this, 'preProductionVersionAdminNotice'), -999);
60
-        } else {
61
-            add_action('shutdown', array($this, 'preProductionVersionWarningNotice'));
62
-        }
63
-    }
38
+	/**
39
+	 * displays message on frontend of site notifying admin that EE has been temporarily placed into maintenance mode
40
+	 *
41
+	 * @return void
42
+	 */
43
+	public function displayPreProductionVersionWarning()
44
+	{
45
+		// skip AJAX requests
46
+		if ($this->request->isAjax()) {
47
+			return;
48
+		}
49
+		// skip stable releases
50
+		if (substr(EVENT_ESPRESSO_VERSION, -5) !== '.beta') {
51
+			return;
52
+		}
53
+		// site admin has authorized use of non-stable release candidate for production
54
+		if (defined('ALLOW_NON_STABLE_RELEASE_ON_LIVE_SITE') && ALLOW_NON_STABLE_RELEASE_ON_LIVE_SITE) {
55
+			return;
56
+		}
57
+		// post release candidate warning
58
+		if ($this->request->isAdmin()) {
59
+			add_action('admin_notices', array($this, 'preProductionVersionAdminNotice'), -999);
60
+		} else {
61
+			add_action('shutdown', array($this, 'preProductionVersionWarningNotice'));
62
+		}
63
+	}
64 64
 
65 65
 
66
-    /**
67
-     * displays admin notice that current version of EE is not a stable release
68
-     *
69
-     * @return void
70
-     * @throws InvalidDataTypeException
71
-     */
72
-    public function preProductionVersionAdminNotice()
73
-    {
74
-        new PersistentAdminNotice(
75
-            'preProductionVersionAdminNotice_' . EVENT_ESPRESSO_VERSION,
76
-            $this->warningNotice()
77
-        );
78
-    }
66
+	/**
67
+	 * displays admin notice that current version of EE is not a stable release
68
+	 *
69
+	 * @return void
70
+	 * @throws InvalidDataTypeException
71
+	 */
72
+	public function preProductionVersionAdminNotice()
73
+	{
74
+		new PersistentAdminNotice(
75
+			'preProductionVersionAdminNotice_' . EVENT_ESPRESSO_VERSION,
76
+			$this->warningNotice()
77
+		);
78
+	}
79 79
 
80 80
 
81
-    /**
82
-     * displays message on frontend of site notifying admin that current version of EE is not a stable release
83
-     *
84
-     * @return void
85
-     */
86
-    public function preProductionVersionWarningNotice()
87
-    {
88
-        echo '<div id="ee-release-candidate-notice-dv" class="ee-really-important-notice-dv"><p>';
89
-        echo wp_kses($this->warningNotice(), AllowedTags::getAllowedTags());
90
-        echo '</p></div>';
91
-    }
81
+	/**
82
+	 * displays message on frontend of site notifying admin that current version of EE is not a stable release
83
+	 *
84
+	 * @return void
85
+	 */
86
+	public function preProductionVersionWarningNotice()
87
+	{
88
+		echo '<div id="ee-release-candidate-notice-dv" class="ee-really-important-notice-dv"><p>';
89
+		echo wp_kses($this->warningNotice(), AllowedTags::getAllowedTags());
90
+		echo '</p></div>';
91
+	}
92 92
 
93 93
 
94
-    /**
95
-     * @return string
96
-     */
97
-    private function warningNotice()
98
-    {
99
-        return sprintf(
100
-            esc_html__(
101
-                'This version of Event Espresso is for testing and/or evaluation purposes only. It is %1$snot%2$s considered a stable release and should therefore %1$snot%2$s be activated on a live or production website.',
102
-                'event_espresso'
103
-            ),
104
-            '<strong>',
105
-            '</strong>'
106
-        );
107
-    }
94
+	/**
95
+	 * @return string
96
+	 */
97
+	private function warningNotice()
98
+	{
99
+		return sprintf(
100
+			esc_html__(
101
+				'This version of Event Espresso is for testing and/or evaluation purposes only. It is %1$snot%2$s considered a stable release and should therefore %1$snot%2$s be activated on a live or production website.',
102
+				'event_espresso'
103
+			),
104
+			'<strong>',
105
+			'</strong>'
106
+		);
107
+	}
108 108
 }
Please login to merge, or discard this patch.
core/services/request/middleware/Middleware.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     {
75 75
         $this->request  = $request;
76 76
         $this->response = $response;
77
-        if (! $this->response->requestTerminated()) {
77
+        if ( ! $this->response->requestTerminated()) {
78 78
             $this->response = $this->request_stack_app->handleRequest($this->request, $this->response);
79 79
         }
80 80
         return $this->response;
Please login to merge, or discard this patch.
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -24,52 +24,52 @@
 block discarded – undo
24 24
  */
25 25
 abstract class Middleware implements RequestDecoratorInterface
26 26
 {
27
-    /**
28
-     * @var LoaderInterface
29
-     */
30
-    protected $loader;
27
+	/**
28
+	 * @var LoaderInterface
29
+	 */
30
+	protected $loader;
31 31
 
32
-    /**
33
-     * @var RequestDecoratorInterface
34
-     */
35
-    protected $request_stack_app;
32
+	/**
33
+	 * @var RequestDecoratorInterface
34
+	 */
35
+	protected $request_stack_app;
36 36
 
37
-    /**
38
-     * @var RequestInterface
39
-     */
40
-    protected $request;
37
+	/**
38
+	 * @var RequestInterface
39
+	 */
40
+	protected $request;
41 41
 
42
-    /**
43
-     * @var ResponseInterface
44
-     */
45
-    protected $response;
42
+	/**
43
+	 * @var ResponseInterface
44
+	 */
45
+	protected $response;
46 46
 
47 47
 
48
-    /**
49
-     * @param RequestDecoratorInterface $request_stack_app
50
-     * @param LoaderInterface           $loader
51
-     */
52
-    public function __construct(RequestDecoratorInterface $request_stack_app, LoaderInterface $loader)
53
-    {
54
-        $this->request_stack_app = $request_stack_app;
55
-        $this->loader            = $loader;
56
-    }
48
+	/**
49
+	 * @param RequestDecoratorInterface $request_stack_app
50
+	 * @param LoaderInterface           $loader
51
+	 */
52
+	public function __construct(RequestDecoratorInterface $request_stack_app, LoaderInterface $loader)
53
+	{
54
+		$this->request_stack_app = $request_stack_app;
55
+		$this->loader            = $loader;
56
+	}
57 57
 
58 58
 
59
-    /**
60
-     * process_request_stack
61
-     *
62
-     * @param RequestInterface  $request
63
-     * @param ResponseInterface $response
64
-     * @return ResponseInterface
65
-     */
66
-    protected function processRequestStack($request, $response)
67
-    {
68
-        $this->request  = $request;
69
-        $this->response = $response;
70
-        if (! $this->response->requestTerminated()) {
71
-            $this->response = $this->request_stack_app->handleRequest($this->request, $this->response);
72
-        }
73
-        return $this->response;
74
-    }
59
+	/**
60
+	 * process_request_stack
61
+	 *
62
+	 * @param RequestInterface  $request
63
+	 * @param ResponseInterface $response
64
+	 * @return ResponseInterface
65
+	 */
66
+	protected function processRequestStack($request, $response)
67
+	{
68
+		$this->request  = $request;
69
+		$this->response = $response;
70
+		if (! $this->response->requestTerminated()) {
71
+			$this->response = $this->request_stack_app->handleRequest($this->request, $this->response);
72
+		}
73
+		return $this->response;
74
+	}
75 75
 }
Please login to merge, or discard this patch.
core/domain/services/commands/transaction/CreateTransactionCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     public function getCapCheck()
58 58
     {
59 59
         // need cap for non-AJAX admin requests
60
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
60
+        if ( ! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
61 61
             // there's no specific caps for editing/creating transactions,
62 62
             // so that's why we are using ee_edit_registrations
63 63
             return new CapCheck('ee_edit_registrations', 'create_new_transaction');
Please login to merge, or discard this patch.
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -20,60 +20,60 @@
 block discarded – undo
20 20
  */
21 21
 class CreateTransactionCommand extends Command implements CommandRequiresCapCheckInterface
22 22
 {
23
-    /**
24
-     * @var EE_Checkout $checkout
25
-     */
26
-    protected $checkout;
23
+	/**
24
+	 * @var EE_Checkout $checkout
25
+	 */
26
+	protected $checkout;
27 27
 
28
-    /**
29
-     * @var array $transaction_details
30
-     */
31
-    protected $transaction_details;
28
+	/**
29
+	 * @var array $transaction_details
30
+	 */
31
+	protected $transaction_details;
32 32
 
33 33
 
34
-    /**
35
-     * CreateTransactionCommand constructor.
36
-     *
37
-     * @param EE_Checkout|null $checkout
38
-     * @param array            $transaction_details
39
-     */
40
-    public function __construct(EE_Checkout $checkout = null, array $transaction_details = [])
41
-    {
42
-        $this->checkout            = $checkout;
43
-        $this->transaction_details = $transaction_details;
44
-    }
34
+	/**
35
+	 * CreateTransactionCommand constructor.
36
+	 *
37
+	 * @param EE_Checkout|null $checkout
38
+	 * @param array            $transaction_details
39
+	 */
40
+	public function __construct(EE_Checkout $checkout = null, array $transaction_details = [])
41
+	{
42
+		$this->checkout            = $checkout;
43
+		$this->transaction_details = $transaction_details;
44
+	}
45 45
 
46 46
 
47
-    /**
48
-     * @return CapCheckInterface
49
-     * @throws InvalidDataTypeException
50
-     */
51
-    public function getCapCheck()
52
-    {
53
-        // need cap for non-AJAX admin requests
54
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
55
-            // there's no specific caps for editing/creating transactions,
56
-            // so that's why we are using ee_edit_registrations
57
-            return new CapCheck('ee_edit_registrations', 'create_new_transaction');
58
-        }
59
-        return new PublicCapabilities('', 'create_new_transaction');
60
-    }
47
+	/**
48
+	 * @return CapCheckInterface
49
+	 * @throws InvalidDataTypeException
50
+	 */
51
+	public function getCapCheck()
52
+	{
53
+		// need cap for non-AJAX admin requests
54
+		if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
55
+			// there's no specific caps for editing/creating transactions,
56
+			// so that's why we are using ee_edit_registrations
57
+			return new CapCheck('ee_edit_registrations', 'create_new_transaction');
58
+		}
59
+		return new PublicCapabilities('', 'create_new_transaction');
60
+	}
61 61
 
62 62
 
63
-    /**
64
-     * @return EE_Checkout
65
-     */
66
-    public function checkout()
67
-    {
68
-        return $this->checkout;
69
-    }
63
+	/**
64
+	 * @return EE_Checkout
65
+	 */
66
+	public function checkout()
67
+	{
68
+		return $this->checkout;
69
+	}
70 70
 
71 71
 
72
-    /**
73
-     * @return array
74
-     */
75
-    public function transactionDetails()
76
-    {
77
-        return $this->transaction_details;
78
-    }
72
+	/**
73
+	 * @return array
74
+	 */
75
+	public function transactionDetails()
76
+	{
77
+		return $this->transaction_details;
78
+	}
79 79
 }
Please login to merge, or discard this patch.
core/domain/services/commands/attendee/CreateAttendeeCommand.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     public function getCapCheck()
82 82
     {
83 83
         // need cap for non-AJAX admin requests
84
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
84
+        if ( ! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
85 85
             return new CapCheck('ee_edit_contacts', 'create_new_contact');
86 86
         }
87 87
         return new PublicCapabilities('', 'create_new_contact');
Please login to merge, or discard this patch.
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -20,62 +20,62 @@
 block discarded – undo
20 20
  */
21 21
 class CreateAttendeeCommand extends Command implements CommandRequiresCapCheckInterface
22 22
 {
23
-    /**
24
-     * array of details where keys are names of EEM_Attendee model fields
25
-     *
26
-     * @var array $attendee_details
27
-     */
28
-    protected $attendee_details;
23
+	/**
24
+	 * array of details where keys are names of EEM_Attendee model fields
25
+	 *
26
+	 * @var array $attendee_details
27
+	 */
28
+	protected $attendee_details;
29 29
 
30
-    /**
31
-     * an existing registration to associate this attendee with
32
-     *
33
-     * @var EE_Registration $registration
34
-     */
35
-    protected $registration;
30
+	/**
31
+	 * an existing registration to associate this attendee with
32
+	 *
33
+	 * @var EE_Registration $registration
34
+	 */
35
+	protected $registration;
36 36
 
37 37
 
38
-    /**
39
-     * CreateAttendeeCommand constructor.
40
-     *
41
-     * @param array           $attendee_details
42
-     * @param EE_Registration $registration
43
-     */
44
-    public function __construct(array $attendee_details, EE_Registration $registration)
45
-    {
46
-        $this->attendee_details = $attendee_details;
47
-        $this->registration     = $registration;
48
-    }
38
+	/**
39
+	 * CreateAttendeeCommand constructor.
40
+	 *
41
+	 * @param array           $attendee_details
42
+	 * @param EE_Registration $registration
43
+	 */
44
+	public function __construct(array $attendee_details, EE_Registration $registration)
45
+	{
46
+		$this->attendee_details = $attendee_details;
47
+		$this->registration     = $registration;
48
+	}
49 49
 
50 50
 
51
-    /**
52
-     * @return array
53
-     */
54
-    public function attendeeDetails()
55
-    {
56
-        return $this->attendee_details;
57
-    }
51
+	/**
52
+	 * @return array
53
+	 */
54
+	public function attendeeDetails()
55
+	{
56
+		return $this->attendee_details;
57
+	}
58 58
 
59 59
 
60
-    /**
61
-     * @return EE_Registration
62
-     */
63
-    public function registration()
64
-    {
65
-        return $this->registration;
66
-    }
60
+	/**
61
+	 * @return EE_Registration
62
+	 */
63
+	public function registration()
64
+	{
65
+		return $this->registration;
66
+	}
67 67
 
68 68
 
69
-    /**
70
-     * @return CapCheckInterface
71
-     * @throws InvalidDataTypeException
72
-     */
73
-    public function getCapCheck()
74
-    {
75
-        // need cap for non-AJAX admin requests
76
-        if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
77
-            return new CapCheck('ee_edit_contacts', 'create_new_contact');
78
-        }
79
-        return new PublicCapabilities('', 'create_new_contact');
80
-    }
69
+	/**
70
+	 * @return CapCheckInterface
71
+	 * @throws InvalidDataTypeException
72
+	 */
73
+	public function getCapCheck()
74
+	{
75
+		// need cap for non-AJAX admin requests
76
+		if (! (defined('DOING_AJAX') && DOING_AJAX) && is_admin()) {
77
+			return new CapCheck('ee_edit_contacts', 'create_new_contact');
78
+		}
79
+		return new PublicCapabilities('', 'create_new_contact');
80
+	}
81 81
 }
Please login to merge, or discard this patch.