HEX
Server: Apache
System: Linux flamboyant-gauss.194-164-62-186.plesk.page 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64
User: gamesamphora (10001)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/amphoragames.com/httpdocs/wp-content/plugins/backwpup/src/Adapters/CronAdapter.php
<?php

declare(strict_types=1);

namespace WPMedia\BackWPup\Adapters;

/**
 * Class CronAdapter
 *
 * Adapter for BackWPup_Cron static methods.
 */
class CronAdapter {
	/**
	 * Get the next run time for a cron expression.
	 *
	 * @param string $cron_expression The cron expression.
	 *
	 * @return int
	 */
	public function cron_next( string $cron_expression ): int {
		return \BackWPup_Cron::cron_next( $cron_expression );
	}

	/**
	 * Get the basic cron expression.
	 *
	 * @param string     $basic_expression Basic expression.
	 * @param int|string $hours Hours of the cron.
	 * @param int        $minutes Minutes of the cron.
	 * @param int        $day_of_week Day of the week default = 0.
	 * @param string     $day_of_month Day of the month.
	 *
	 * @return string Cron expression
	 * @throws InvalidArgumentException If the cron expression is unsupported.
	 */
	public function get_basic_cron_expression( string $basic_expression, $hours = 0, int $minutes = 0, int $day_of_week = 0, string $day_of_month = '' ): string {
		return \BackWPup_Cron::get_basic_cron_expression( $basic_expression, $hours, $minutes, $day_of_week, $day_of_month );
	}
}