Code Duplication    Length = 15-15 lines in 2 locations

geodirectory-functions/privacy/class-geodir-background-process.php 1 location

@@ 139-153 (lines=15) @@
136
	 *
137
	 * @return int
138
	 */
139
	protected function get_memory_limit() {
140
		if ( function_exists( 'ini_get' ) ) {
141
			$memory_limit = ini_get( 'memory_limit' );
142
		} else {
143
			// Sensible default.
144
			$memory_limit = '128M';
145
		}
146
147
		if ( ! $memory_limit || -1 === intval( $memory_limit ) ) {
148
			// Unlimited, set to 32GB.
149
			$memory_limit = '32000M';
150
		}
151
152
		return intval( $memory_limit ) * 1024 * 1024;
153
	}
154
155
	/**
156
	 * Schedule cron healthcheck.

geodirectory-functions/privacy/libraries/wp-background-process.php 1 location

@@ 360-374 (lines=15) @@
357
	 *
358
	 * @return int
359
	 */
360
	protected function get_memory_limit() {
361
		if ( function_exists( 'ini_get' ) ) {
362
			$memory_limit = ini_get( 'memory_limit' );
363
		} else {
364
			// Sensible default.
365
			$memory_limit = '128M';
366
		}
367
368
		if ( ! $memory_limit || -1 === $memory_limit ) {
369
			// Unlimited, set to 32GB.
370
			$memory_limit = '32000M';
371
		}
372
373
		return intval( $memory_limit ) * 1024 * 1024;
374
	}
375
376
	/**
377
	 * Time exceeded.