PluginProbe
Plugin Check (PCP) / 1.5.0
Plugin Check (PCP) v1.5.0
2.1.0 trunk 0.1 0.2.0 0.2.1 0.2.2 0.2.3 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.3.0 1.3.1 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 1.9.0 2.0.0 ci-artifacts
plugin-check / includes / Checker / Checks / Abstract_Runtime_Check.php

Abstract_Runtime_Check.php in Plugin Check (PCP) 1.5.0, at includes/Checker/Checks/Abstract_Runtime_Check.php

45 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class WordPress\Plugin_Check\Checker\Checks\Abstract_Runtime_Check
4 *
5 * @package plugin-check
6 */
7
8 namespace WordPress\Plugin_Check\Checker\Checks;
9
10 use Exception;
11 use WordPress\Plugin_Check\Checker\Check_Result;
12 use WordPress\Plugin_Check\Checker\Preparation;
13 use WordPress\Plugin_Check\Checker\Runtime_Check;
14
15 /**
16 * Abstract Runtime Check class.
17 *
18 * @since 1.0.0
19 */
20 abstract class Abstract_Runtime_Check implements Runtime_Check, Preparation {
21
22 /**
23 * Runs preparation step for the environment and returns a closure as a cleanup function.
24 *
25 * @since 1.0.0
26 *
27 * @return callable Cleanup function to revert the changes made here.
28 *
29 * @throws Exception Thrown when preparation fails.
30 */
31 abstract public function prepare();
32
33 /**
34 * Amends the given result by running the check on the associated plugin.
35 *
36 * @since 1.0.0
37 *
38 * @param Check_Result $result The check result to amend, including the plugin context to check.
39 *
40 * @throws Exception Thrown when the check fails with a critical error (unrelated to any errors detected as part of
41 * the check).
42 */
43 abstract public function run( Check_Result $result );
44 }
45