Test Failed
Pull Request — master (#306)
by Kiran
16:19
created
geodirectory-admin/option-pages/general_settings_array.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
 
123 123
     array('type' => 'sectionend', 'id' => 'general_options'),
124 124
 
125
-));/* General Options End*/
125
+)); /* General Options End*/
126 126
 
127 127
 /**
128 128
  * Filter GD Google Analytic Settings array.
Please login to merge, or discard this patch.
geodirectory-admin/option-pages/notifications_settings_array.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         'id' => 'geodir_post_submited_success_email_subject_admin',
130 130
         'type' => 'text',
131 131
         'css' => 'min-width:300px;',
132
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
132
+        'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings
133 133
     ),
134 134
     array(
135 135
         'name' => '',
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         'id' => 'geodir_post_submited_success_email_content_admin',
138 138
         'css' => 'width:500px; height: 150px;',
139 139
         'type' => 'textarea',
140
-        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>','geodirectory')
140
+        'std' => __('<p>Dear Admin,</p><p>A new  listing has been published [#listing_link#]. This email is just for your information.</p><br><p>[#site_name#]</p>', 'geodirectory')
141 141
     ),
142 142
 
143 143
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         'id' => 'geodir_post_submited_success_email_subject',
155 155
         'type' => 'text',
156 156
         'css' => 'min-width:300px;',
157
-        'std' => __('Post Submitted Successfully','geodirectory') // Default value for the page title - changed in settings
157
+        'std' => __('Post Submitted Successfully', 'geodirectory') // Default value for the page title - changed in settings
158 158
     ),
159 159
     array(
160 160
         'name' => '',
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         'id' => 'geodir_post_submited_success_email_content',
163 163
         'css' => 'width:500px; height: 150px;',
164 164
         'type' => 'textarea',
165
-        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>','geodirectory')
165
+        'std' => __('<p>Dear [#client_name#],</p><p>You submitted the below listing information. This email is just for your information.</p><p>[#listing_link#]</p><br><p>Thank you for your contribution.</p><p>[#site_name#]</p>', 'geodirectory')
166 166
     ),
167 167
 
168 168
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         'id' => 'geodir_forgot_password_content',
181 181
         'css' => 'width:500px; height: 150px;',
182 182
         'type' => 'textarea',
183
-        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
183
+        'std' => __("<p>Dear [#client_name#],<p><p>You requested a new password for [#site_name_url#]</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
184 184
     ),
185 185
 
186 186
     array(
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         'id' => 'geodir_registration_success_email_content',
198 198
         'css' => 'width:500px; height: 150px;',
199 199
         'type' => 'textarea',
200
-        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
200
+        'std' => __("<p>Dear [#client_name#],</p><p>You can log in  with the following information:</p><p>[#login_details#]</p><p>You can login here: [#login_url#]</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
201 201
     ),
202 202
     array(
203 203
         'name' => __('Listing published email', 'geodirectory'),
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         'id' => 'geodir_email_friend_content',
237 237
         'css' => 'width:500px; height: 150px;',
238 238
         'type' => 'textarea',
239
-        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>",'geodirectory')
239
+        'std' => __("<p>Dear [#to_name#],<p><p>Your friend has sent you a message from <b>[#site_name#]</b> </p><p>===============================</p><p><b>Subject : [#subject#]</b></p><p>[#comments#] [#listing_link#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name#].</p>", 'geodirectory')
240 240
     ),
241 241
 
242 242
     array(
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         'id' => 'geodir_email_enquiry_content',
254 254
         'css' => 'width:500px; height: 150px;',
255 255
         'type' => 'textarea',
256
-        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>",'geodirectory')
256
+        'std' => __("<p>Dear [#to_name#],<p><p>An enquiry has been sent from <b>[#listing_link#]</b></p><p>===============================</p><p>[#comments#]</p><p>===============================</p><p>Thank you,<br /><br />[#site_name_url#].</p>", 'geodirectory')
257 257
     ),
258 258
 
259 259
     array('type' => 'sectionend', 'id' => 'other_emails'),
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         'id' => 'geodir_post_added_success_msg_content',
270 270
         'css' => 'width:500px; height: 150px;',
271 271
         'type' => 'textarea',
272
-        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>','geodirectory')
272
+        'std' => __('<p>Thank you, your information has been successfully received.</p><p><a href="[#submited_information_link#]" >View your submitted information &raquo;</a></p><p>Thank you for visiting us at [#site_name#].</p>', 'geodirectory')
273 273
     ),
274 274
 
275 275
 
Please login to merge, or discard this patch.
geodirectory-functions/wp-session/class-recursive-arrayaccess.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly
14
-if ( ! defined( 'ABSPATH' ) ) exit;
14
+if (!defined('ABSPATH')) exit;
15 15
 
16 16
 /**
17 17
  * Recursive array class to allow multidimensional array access.
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @param array $data
41 41
 	 */
42
-	protected function __construct( $data = array() ) {
43
-		foreach ( $data as $key => $value ) {
44
-			$this[ $key ] = $value;
42
+	protected function __construct($data = array()) {
43
+		foreach ($data as $key => $value) {
44
+			$this[$key] = $value;
45 45
 		}
46 46
 	}
47 47
 
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
 	 * Allow deep copies of objects
50 50
 	 */
51 51
 	public function __clone() {
52
-		foreach ( $this->container as $key => $value ) {
53
-			if ( $value instanceof self ) {
54
-				$this[ $key ] = clone $value;
52
+		foreach ($this->container as $key => $value) {
53
+			if ($value instanceof self) {
54
+				$this[$key] = clone $value;
55 55
 			}
56 56
 		}
57 57
 	}
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function toArray() {
65 65
 		$data = $this->container;
66
-		foreach ( $data as $key => $value ) {
67
-			if ( $value instanceof self ) {
68
-				$data[ $key ] = $value->toArray();
66
+		foreach ($data as $key => $value) {
67
+			if ($value instanceof self) {
68
+				$data[$key] = $value->toArray();
69 69
 			}
70 70
 		}
71 71
 		return $data;
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 	 *
85 85
 	 * @return boolean true on success or false on failure.
86 86
 	 */
87
-	public function offsetExists( $offset ) {
88
-		return isset( $this->container[ $offset ]) ;
87
+	public function offsetExists($offset) {
88
+		return isset($this->container[$offset]);
89 89
 	}
90 90
 
91 91
 	/**
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 	 *
98 98
 	 * @return mixed Can return all value types.
99 99
 	 */
100
-	public function offsetGet( $offset ) {
101
-		return isset( $this->container[ $offset ] ) ? $this->container[ $offset ] : null;
100
+	public function offsetGet($offset) {
101
+		return isset($this->container[$offset]) ? $this->container[$offset] : null;
102 102
 	}
103 103
 
104 104
 	/**
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
 	 *
112 112
 	 * @return void
113 113
 	 */
114
-	public function offsetSet( $offset, $data ) {
115
-		if ( is_array( $data ) ) {
116
-			$data = new self( $data );
114
+	public function offsetSet($offset, $data) {
115
+		if (is_array($data)) {
116
+			$data = new self($data);
117 117
 		}
118
-		if ( $offset === null ) { // don't forget this!
118
+		if ($offset === null) { // don't forget this!
119 119
 			$this->container[] = $data;
120 120
 		} else {
121
-			$this->container[ $offset ] = $data;
121
+			$this->container[$offset] = $data;
122 122
 		}
123 123
 
124 124
 		$this->dirty = true;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 *
134 134
 	 * @return void
135 135
 	 */
136
-	public function offsetUnset( $offset ) {
137
-		unset( $this->container[ $offset ] );
136
+	public function offsetUnset($offset) {
137
+		unset($this->container[$offset]);
138 138
 	}
139 139
 }
Please login to merge, or discard this patch.
geodirectory-functions/wp-session/wp-session.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly
14
-if ( ! defined( 'ABSPATH' ) ) exit;
14
+if (!defined('ABSPATH')) exit;
15 15
 
16 16
 /**
17 17
  * Return the current cache expire setting.
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
  *
37 37
  * @param string $data
38 38
  */
39
-function wp_session_decode( $data ) {
39
+function wp_session_decode($data) {
40 40
 	$wp_session = WP_Session::get_instance();
41 41
 
42
-	return $wp_session->json_in( $data );
42
+	return $wp_session->json_in($data);
43 43
 }
44 44
 
45 45
 /**
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
  *
61 61
  * @return bool
62 62
  */
63
-function wp_session_regenerate_id( $delete_old_session = false ) {
63
+function wp_session_regenerate_id($delete_old_session = false) {
64 64
 	$wp_session = WP_Session::get_instance();
65 65
 
66
-	$wp_session->regenerate_id( $delete_old_session );
66
+	$wp_session->regenerate_id($delete_old_session);
67 67
 
68 68
 	return true;
69 69
 }
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
  */
78 78
 function wp_session_start() {
79 79
 	$wp_session = WP_Session::get_instance();
80
-	do_action( 'wp_session_start' );
80
+	do_action('wp_session_start');
81 81
 
82 82
 	return $wp_session->session_started();
83 83
 }
84
-add_action( 'plugins_loaded', 'wp_session_start' );
84
+add_action('plugins_loaded', 'wp_session_start');
85 85
 
86 86
 /**
87 87
  * Return the current session status.
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 function wp_session_status() {
92 92
 	$wp_session = WP_Session::get_instance();
93 93
 
94
-	if ( $wp_session->session_started() ) {
94
+	if ($wp_session->session_started()) {
95 95
 		return PHP_SESSION_ACTIVE;
96 96
 	}
97 97
 
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 	$wp_session = WP_Session::get_instance();
115 115
 
116 116
 	$wp_session->write_data();
117
-	do_action( 'wp_session_commit' );
117
+	do_action('wp_session_commit');
118 118
 }
119
-add_action( 'shutdown', 'wp_session_write_close' );
119
+add_action('shutdown', 'wp_session_write_close');
120 120
 
121 121
 /**
122 122
  * Clean up expired sessions by removing data and their expiration entries from
@@ -128,51 +128,51 @@  discard block
 block discarded – undo
128 128
 function wp_session_cleanup() {
129 129
 	global $wpdb;
130 130
 
131
-	if ( defined( 'WP_SETUP_CONFIG' ) ) {
131
+	if (defined('WP_SETUP_CONFIG')) {
132 132
 		return;
133 133
 	}
134 134
 
135
-	if ( ! defined( 'WP_INSTALLING' ) ) {
136
-		$expiration_keys = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'" );
135
+	if (!defined('WP_INSTALLING')) {
136
+		$expiration_keys = $wpdb->get_results("SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'");
137 137
 
138
-		$now = current_time( 'timestamp' );
138
+		$now = current_time('timestamp');
139 139
 		$expired_sessions = array();
140 140
 
141
-		foreach( $expiration_keys as $expiration ) {
141
+		foreach ($expiration_keys as $expiration) {
142 142
 
143 143
 			// If the session has expired
144
-			if ( $now > intval( $expiration->option_value ) ) {
144
+			if ($now > intval($expiration->option_value)) {
145 145
 
146 146
 				// Get the session ID by parsing the option_name
147
-				$session_id = substr( $expiration->option_name, 20 );
147
+				$session_id = substr($expiration->option_name, 20);
148 148
 
149
-				if( (int) -1 === (int) $session_id || ! preg_match( '/^[a-f0-9]{32}$/', $session_id ) ) {
149
+				if ((int) -1 === (int) $session_id || !preg_match('/^[a-f0-9]{32}$/', $session_id)) {
150 150
 					continue;
151 151
 				}
152 152
 
153 153
 				$expired_sessions[] = $expiration->option_name;
154
-				$expired_sessions[] = esc_sql( "_wp_session_$session_id" );
154
+				$expired_sessions[] = esc_sql("_wp_session_$session_id");
155 155
 			}
156 156
 		}
157 157
 
158 158
 		// Delete all expired sessions in a single query
159
-		if ( ! empty( $expired_sessions ) ) {
160
-			$option_names = implode( "','", $expired_sessions );
161
-			$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')"  );
159
+		if (!empty($expired_sessions)) {
160
+			$option_names = implode("','", $expired_sessions);
161
+			$wpdb->query("DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')");
162 162
 		}
163 163
 	}
164 164
 
165 165
 	// Allow other plugins to hook in to the garbage collection process.
166
-	do_action( 'wp_session_cleanup' );
166
+	do_action('wp_session_cleanup');
167 167
 }
168
-add_action( 'wp_session_garbage_collection', 'wp_session_cleanup' );
168
+add_action('wp_session_garbage_collection', 'wp_session_cleanup');
169 169
 
170 170
 /**
171 171
  * Register the garbage collector as a twice daily event.
172 172
  */
173 173
 function wp_session_register_garbage_collection() {
174
-	if ( ! wp_next_scheduled( 'wp_session_garbage_collection' ) ) {
175
-		wp_schedule_event( current_time( 'timestamp' ), 'twicedaily', 'wp_session_garbage_collection' );
174
+	if (!wp_next_scheduled('wp_session_garbage_collection')) {
175
+		wp_schedule_event(current_time('timestamp'), 'twicedaily', 'wp_session_garbage_collection');
176 176
 	}
177 177
 }
178
-add_action( 'wp', 'wp_session_register_garbage_collection' );
178
+add_action('wp', 'wp_session_register_garbage_collection');
Please login to merge, or discard this patch.
geodirectory-widgets/geodirectory_related_listing_widget.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     public function form($instance)
138 138
     {
139 139
         //widgetform in backend
140
-        $instance = wp_parse_args((array)$instance,
140
+        $instance = wp_parse_args((array) $instance,
141 141
             array('title' => '',
142 142
                 'list_sort' => '',
143 143
                 'list_order' => '',
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         ?>
171 171
         <p>
172
-            <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory');?>
172
+            <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory'); ?>
173 173
 
174 174
                 <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>"
175 175
                        name="<?php echo $this->get_field_name('title'); ?>" type="text"
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         </p>
179 179
         <p>
180 180
             <label
181
-                for="<?php echo $this->get_field_id('list_sort'); ?>"><?php _e('Sort by:', 'geodirectory');?>
181
+                for="<?php echo $this->get_field_id('list_sort'); ?>"><?php _e('Sort by:', 'geodirectory'); ?>
182 182
 
183 183
                 <select class="widefat" id="<?php echo $this->get_field_id('list_sort'); ?>"
184 184
                         name="<?php echo $this->get_field_name('list_sort'); ?>">
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
         </p>
209 209
         <p>
210 210
             <label
211
-                for="<?php echo $this->get_field_id('post_number'); ?>"><?php _e('Number of posts:', 'geodirectory');?>
211
+                for="<?php echo $this->get_field_id('post_number'); ?>"><?php _e('Number of posts:', 'geodirectory'); ?>
212 212
 
213 213
                 <input class="widefat" id="<?php echo $this->get_field_id('post_number'); ?>"
214 214
                        name="<?php echo $this->get_field_name('post_number'); ?>" type="text"
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         </p>
218 218
         <p>
219 219
             <label for="<?php echo $this->get_field_id('relate_to'); ?>">
220
-                <?php _e('Relate to:', 'geodirectory');?>
220
+                <?php _e('Relate to:', 'geodirectory'); ?>
221 221
                 <select class="widefat" id="<?php echo $this->get_field_id('relate_to'); ?>"
222 222
                         name="<?php echo $this->get_field_name('relate_to'); ?>">
223 223
                     <option <?php if ($relate_to == 'category') {
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         <p>
233 233
         <p>
234 234
             <label for="<?php echo $this->get_field_id('layout'); ?>">
235
-                <?php _e('Layout:', 'geodirectory');?>
235
+                <?php _e('Layout:', 'geodirectory'); ?>
236 236
                 <select class="widefat" id="<?php echo $this->get_field_id('layout'); ?>"
237 237
                         name="<?php echo $this->get_field_name('layout'); ?>">
238 238
                     <option <?php if ($layout == 'gridview_onehalf') {
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         </p>
261 261
         <p>
262 262
             <label
263
-                for="<?php echo $this->get_field_id('listing_width'); ?>"><?php _e('Listing width:', 'geodirectory');?>
263
+                for="<?php echo $this->get_field_id('listing_width'); ?>"><?php _e('Listing width:', 'geodirectory'); ?>
264 264
 
265 265
                 <input class="widefat" id="<?php echo $this->get_field_id('listing_width'); ?>"
266 266
                        name="<?php echo $this->get_field_name('listing_width'); ?>" type="text"
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         </p>
270 270
         <p>
271 271
             <label
272
-                for="<?php echo $this->get_field_id('character_count'); ?>"><?php _e('Post Content excerpt character count :', 'geodirectory');?>
272
+                for="<?php echo $this->get_field_id('character_count'); ?>"><?php _e('Post Content excerpt character count :', 'geodirectory'); ?>
273 273
                 <input class="widefat" id="<?php echo $this->get_field_id('character_count'); ?>"
274 274
                        name="<?php echo $this->get_field_name('character_count'); ?>" type="text"
275 275
                        value="<?php echo esc_attr($character_count); ?>"/>
@@ -277,9 +277,9 @@  discard block
 block discarded – undo
277 277
         </p>
278 278
         <p>
279 279
             <label for="<?php echo $this->get_field_id('add_location_filter'); ?>">
280
-                <?php _e('Enable Location Filter:', 'geodirectory');?>
280
+                <?php _e('Enable Location Filter:', 'geodirectory'); ?>
281 281
                 <input type="checkbox" id="<?php echo $this->get_field_id('add_location_filter'); ?>"
282
-                       name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"';?>
282
+                       name="<?php echo $this->get_field_name('add_location_filter'); ?>" <?php if ($add_location_filter) echo 'checked="checked"'; ?>
283 283
                        value="1"/>
284 284
             </label>
285 285
         </p>
Please login to merge, or discard this patch.
tests/test-Favourites.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
             'posts_per_page' => 1,
18 18
         );
19 19
 
20
-        $all_posts = new WP_Query( $query_args );
20
+        $all_posts = new WP_Query($query_args);
21 21
         $post_id = null;
22
-        while ( $all_posts->have_posts() ) : $all_posts->the_post();
22
+        while ($all_posts->have_posts()) : $all_posts->the_post();
23 23
             $post_id = get_the_ID();
24 24
         endwhile;
25 25
 
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
         ob_start();
29 29
         geodir_add_to_favorite($post_id);
30 30
         $output = ob_get_clean();
31
-        $this->assertContains( 'Remove from Favorites', $output );
31
+        $this->assertContains('Remove from Favorites', $output);
32 32
 
33 33
         $user_id = $current_user->ID;
34 34
 
35 35
         $user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true);
36 36
 
37
-        $this->assertContains( $post_id, $user_fav_posts );
37
+        $this->assertContains($post_id, $user_fav_posts);
38 38
 
39 39
 
40 40
     }
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
             'posts_per_page' => 1,
50 50
         );
51 51
 
52
-        $all_posts = new WP_Query( $query_args );
52
+        $all_posts = new WP_Query($query_args);
53 53
         $post_id = null;
54
-        while ( $all_posts->have_posts() ) : $all_posts->the_post();
54
+        while ($all_posts->have_posts()) : $all_posts->the_post();
55 55
             $post_id = get_the_ID();
56 56
         endwhile;
57 57
 
@@ -60,22 +60,22 @@  discard block
 block discarded – undo
60 60
         ob_start();
61 61
         geodir_add_to_favorite($post_id);
62 62
         $output = ob_get_clean();
63
-        $this->assertContains( 'Remove from Favorites', $output );
63
+        $this->assertContains('Remove from Favorites', $output);
64 64
 
65 65
         $user_id = $current_user->ID;
66 66
 
67 67
         $user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true);
68 68
 
69
-        $this->assertContains( $post_id, $user_fav_posts );
69
+        $this->assertContains($post_id, $user_fav_posts);
70 70
 
71 71
         ob_start();
72 72
         geodir_remove_from_favorite($post_id);
73 73
         $output = ob_get_clean();
74
-        $this->assertContains( 'Add to Favorites', $output );
74
+        $this->assertContains('Add to Favorites', $output);
75 75
 
76 76
         $user_fav_posts = get_user_meta($user_id, 'gd_user_favourite_post', true);
77 77
 
78
-        $this->assertNotContains( $post_id, $user_fav_posts );
78
+        $this->assertNotContains($post_id, $user_fav_posts);
79 79
     }
80 80
 
81 81
 
Please login to merge, or discard this patch.
tests/test-Send_Enquiry.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
             'posts_per_page' => 1,
15 15
         );
16 16
 
17
-        $all_posts = new WP_Query( $query_args );
17
+        $all_posts = new WP_Query($query_args);
18 18
         $post_id = null;
19
-        while ( $all_posts->have_posts() ) : $all_posts->the_post();
19
+        while ($all_posts->have_posts()) : $all_posts->the_post();
20 20
             $post_id = get_the_ID();
21 21
         endwhile;
22 22
 
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
             'posts_per_page' => 1,
46 46
         );
47 47
 
48
-        $all_posts = new WP_Query( $query_args );
48
+        $all_posts = new WP_Query($query_args);
49 49
         $post_id = null;
50
-        while ( $all_posts->have_posts() ) : $all_posts->the_post();
50
+        while ($all_posts->have_posts()) : $all_posts->the_post();
51 51
             $post_id = get_the_ID();
52 52
         endwhile;
53 53
 
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
             'posts_per_page' => 1,
79 79
         );
80 80
 
81
-        $all_posts = new WP_Query( $query_args );
81
+        $all_posts = new WP_Query($query_args);
82 82
         $post_id = null;
83
-        while ( $all_posts->have_posts() ) : $all_posts->the_post();
83
+        while ($all_posts->have_posts()) : $all_posts->the_post();
84 84
             $post_id = get_the_ID();
85 85
         endwhile;
86 86
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         ob_start();
104 104
         geodir_send_friend($data);
105 105
         $output = ob_get_clean();
106
-        $this->assertContains( 'Email from GeoDirectory failed to send', $output );
106
+        $this->assertContains('Email from GeoDirectory failed to send', $output);
107 107
         remove_filter('wp_mail', 'print_mail');
108 108
         remove_filter('wp_redirect', '__return_false');
109 109
     }
Please login to merge, or discard this patch.
tests/lib/wordpress-tests-lib/includes/wp-profiler.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 		// reset the wpdb queries log, storing it on the profile stack if necessary
41 41
 		global $wpdb;
42 42
 		if ($this->stack) {
43
-			$this->stack[count($this->stack)-1]['queries'] = $wpdb->queries;
43
+			$this->stack[count($this->stack) - 1]['queries'] = $wpdb->queries;
44 44
 		}
45 45
 		$wpdb->queries = array();
46 46
 
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 
75 75
 		if (isset($this->profile[$name])) {
76 76
 			$this->profile[$name]['time'] += $time;
77
-			$this->profile[$name]['calls'] ++;
77
+			$this->profile[$name]['calls']++;
78 78
 			$this->profile[$name]['cache_cold_hits'] += ($wp_object_cache->cold_cache_hits - $item['cache_cold_hits']);
79 79
 			$this->profile[$name]['cache_warm_hits'] += ($wp_object_cache->warm_cache_hits - $item['cache_warm_hits']);
80 80
 			$this->profile[$name]['cache_misses'] += ($wp_object_cache->cache_misses - $item['cache_misses']);
81
-			$this->profile[$name]['cache_dirty_objects'] = array_add( $this->profile[$name]['cache_dirty_objects'], $cache_dirty_delta) ;
82
-			$this->profile[$name]['actions'] = array_add( $this->profile[$name]['actions'], $item['actions'] );
83
-			$this->profile[$name]['filters'] = array_add( $this->profile[$name]['filters'], $item['filters'] );
84
-			$this->profile[$name]['queries'] = array_add( $this->profile[$name]['queries'], $item['queries'] );
81
+			$this->profile[$name]['cache_dirty_objects'] = array_add($this->profile[$name]['cache_dirty_objects'], $cache_dirty_delta);
82
+			$this->profile[$name]['actions'] = array_add($this->profile[$name]['actions'], $item['actions']);
83
+			$this->profile[$name]['filters'] = array_add($this->profile[$name]['filters'], $item['filters']);
84
+			$this->profile[$name]['queries'] = array_add($this->profile[$name]['queries'], $item['queries']);
85 85
 			#$this->_query_summary($item['queries'], $this->profile[$name]['queries']);
86 86
 
87 87
 		}
@@ -109,28 +109,28 @@  discard block
 block discarded – undo
109 109
 
110 110
 	function microtime($since = 0.0) {
111 111
 		list($usec, $sec) = explode(' ', microtime());
112
-		return (float)$sec + (float)$usec - $since;
112
+		return (float) $sec + (float) $usec - $since;
113 113
 	}
114 114
 
115 115
 	function log_filter($tag) {
116 116
 		if ($this->stack) {
117 117
 			global $wp_actions;
118 118
 			if ($tag == end($wp_actions))
119
-				@$this->stack[count($this->stack)-1]['actions'][$tag] ++;
119
+				@$this->stack[count($this->stack) - 1]['actions'][$tag]++;
120 120
 			else
121
-				@$this->stack[count($this->stack)-1]['filters'][$tag] ++;
121
+				@$this->stack[count($this->stack) - 1]['filters'][$tag]++;
122 122
 		}
123 123
 		return $arg;
124 124
 	}
125 125
 
126 126
 	function log_action($tag) {
127 127
 		if ($this->stack)
128
-			@$this->stack[count($this->stack)-1]['actions'][$tag] ++;
128
+			@$this->stack[count($this->stack) - 1]['actions'][$tag]++;
129 129
 	}
130 130
 
131 131
 	function _current_action() {
132 132
 		global $wp_actions;
133
-		return $wp_actions[count($wp_actions)-1];
133
+		return $wp_actions[count($wp_actions) - 1];
134 134
 	}
135 135
 
136 136
 	function results() {
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 			$sql = preg_replace('/(WHERE \w+ =) \d+/', '$1 x', $sql);
144 144
 			$sql = preg_replace('/(WHERE \w+ =) \'\[-\w]+\'/', '$1 \'xxx\'', $sql);
145 145
 
146
-			@$out[$sql] ++;
146
+			@$out[$sql]++;
147 147
 		}
148 148
 		asort($out);
149 149
 		return;
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
 		$out = array();
155 155
 		foreach ($queries as $q) {
156 156
 			if (empty($q[2]))
157
-				@$out['unknown'] ++;
157
+				@$out['unknown']++;
158 158
 			else
159
-				@$out[$q[2]] ++;
159
+				@$out[$q[2]]++;
160 160
 		}
161 161
 		return $out;
162 162
 	}
Please login to merge, or discard this patch.
tests/lib/wordpress-tests-lib/includes/mock-image-editor.php 1 patch
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 (class_exists( 'WP_Image_Editor' ) ) :
3
+if (class_exists('WP_Image_Editor')) :
4 4
 
5 5
 	class WP_Image_Editor_Mock extends WP_Image_Editor {
6 6
 
@@ -9,38 +9,38 @@  discard block
 block discarded – undo
9 9
 		public static $save_return = array();
10 10
 
11 11
 		// Allow testing of jpeg_quality filter.
12
-		public function set_mime_type( $mime_type = null ) {
12
+		public function set_mime_type($mime_type = null) {
13 13
 			$this->mime_type = $mime_type;
14 14
 		}
15 15
 
16 16
 		public function load() {
17 17
 			return self::$load_return;
18 18
 		}
19
-		public static function test( $args = array() ) {
19
+		public static function test($args = array()) {
20 20
 			return self::$test_return;
21 21
 		}
22
-		public static function supports_mime_type( $mime_type ) {
22
+		public static function supports_mime_type($mime_type) {
23 23
 			return true;
24 24
 		}
25
-		public function resize( $max_w, $max_h, $crop = false ) {
25
+		public function resize($max_w, $max_h, $crop = false) {
26 26
 
27 27
 		}
28
-		public function multi_resize( $sizes ) {
28
+		public function multi_resize($sizes) {
29 29
 
30 30
 		}
31
-		public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) {
31
+		public function crop($src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false) {
32 32
 
33 33
 		}
34
-		public function rotate( $angle ) {
34
+		public function rotate($angle) {
35 35
 
36 36
 		}
37
-		public function flip( $horz, $vert ) {
37
+		public function flip($horz, $vert) {
38 38
 
39 39
 		}
40
-		public function save( $destfilename = null, $mime_type = null ) {
40
+		public function save($destfilename = null, $mime_type = null) {
41 41
 			return self::$save_return;
42 42
 		}
43
-		public function stream( $mime_type = null ) {
43
+		public function stream($mime_type = null) {
44 44
 
45 45
 		}
46 46
 	}
Please login to merge, or discard this patch.