Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Preparation interface #52

Merged
merged 1 commit into from
Jan 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions includes/Checker/Preparation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Interface WordPress\Plugin_Check\Checker\Preparation
*
* @package plugin-check
*/

namespace WordPress\Plugin_Check\Checker;

use Exception;

/**
* Interface for a single preparation step.
*
* @since n.e.x.t
*/
interface Preparation {

/**
* Runs preparation step for the environment and returns a closure as a cleanup function.
*
* @since n.e.x.t
*
* @return callable Cleanup function to revert the changes made here.
*
* @throws Exception Thrown when preparation fails.
*/
public function prepare();
}