| 1 |
<?php |
| 2 |
/** |
| 3 |
* Interface WordPress\Plugin_Check\Checker\Check_Runner |
| 4 |
* |
| 5 |
* @package plugin-check |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace WordPress\Plugin_Check\Checker; |
| 9 |
|
| 10 |
use Exception; |
| 11 |
|
| 12 |
/** |
| 13 |
* Interface for runner classes like AJAX runner or CLI runner. |
| 14 |
* |
| 15 |
* @since 1.0.0 |
| 16 |
*/ |
| 17 |
interface Check_Runner { |
| 18 |
|
| 19 |
/** |
| 20 |
* Determines if the current request is intended for the plugin checker. |
| 21 |
* |
| 22 |
* @since 1.0.0 |
| 23 |
* |
| 24 |
* @return boolean Returns true if the check is for plugin else false. |
| 25 |
*/ |
| 26 |
public static function is_plugin_check(); |
| 27 |
|
| 28 |
/** |
| 29 |
* Prepares the environment for running the requested checks. |
| 30 |
* |
| 31 |
* @since 1.0.0 |
| 32 |
* |
| 33 |
* @return callable Cleanup function to revert any changes made here. |
| 34 |
* |
| 35 |
* @throws Exception Thrown exception when preparation fails. |
| 36 |
*/ |
| 37 |
public function prepare(); |
| 38 |
|
| 39 |
/** |
| 40 |
* Runs the requested checks against the plugin context and returns the results. |
| 41 |
* |
| 42 |
* @since 1.0.0 |
| 43 |
* |
| 44 |
* @return Check_Result Object containing all check results. |
| 45 |
* |
| 46 |
* @throws Exception Thrown exception if a check fails. |
| 47 |
*/ |
| 48 |
public function run(); |
| 49 |
} |
| 50 |
|