Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 161-176 (lines=16) @@
158
	 * @param array $schedules Schedules.
159
	 * @return array
160
	 */
161
	public function schedule_cron_healthcheck( $schedules ) {
162
		$interval = apply_filters( $this->identifier . '_cron_interval', 5 );
163
164
		if ( property_exists( $this, 'cron_interval' ) ) {
165
			$interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval );
166
		}
167
168
		// Adds every 5 minutes to the existing schedules.
169
		$schedules[ $this->identifier . '_cron_interval' ] = array(
170
			'interval' => MINUTE_IN_SECONDS * $interval,
171
			/* translators: %d: interval */
172
			'display'  => sprintf( __( 'Every %d minutes', 'geodirectory' ), $interval ),
173
		);
174
175
		return $schedules;
176
	}
177
178
	/**
179
	 * Delete all batches.

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

@@ 413-427 (lines=15) @@
410
	 * @param mixed $schedules Schedules.
411
	 * @return mixed
412
	 */
413
	public function schedule_cron_healthcheck( $schedules ) {
414
		$interval = apply_filters( $this->identifier . '_cron_interval', 5 );
415
416
		if ( property_exists( $this, 'cron_interval' ) ) {
417
			$interval = apply_filters( $this->identifier . '_cron_interval', $this->cron_interval_identifier );
418
		}
419
420
		// Adds every 5 minutes to the existing schedules.
421
		$schedules[ $this->identifier . '_cron_interval' ] = array(
422
			'interval' => MINUTE_IN_SECONDS * $interval,
423
			'display'  => sprintf( __( 'Every %d Minutes' ), $interval ),
424
		);
425
426
		return $schedules;
427
	}
428
429
	/**
430
	 * Handle cron healthcheck