PluginProbe
Plugin Check (PCP) / 1.3.1
Plugin Check (PCP) v1.3.1
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 / Check.php

Check.php in Plugin Check (PCP) 1.3.1, at includes/Checker/Check.php

88 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Interface WordPress\Plugin_Check\Checker\Check
4 *
5 * @package plugin-check
6 */
7
8 namespace WordPress\Plugin_Check\Checker;
9
10 use Exception;
11
12 /**
13 * Interface for a single check.
14 *
15 * @since 1.0.0
16 */
17 interface Check {
18 /**
19 * Stability value for stable checks.
20 *
21 * @since 1.0.0
22 * @var string
23 */
24 const STABILITY_STABLE = 'STABLE';
25
26 /**
27 * Stability value for experimental checks.
28 *
29 * @since 1.0.0
30 * @var string
31 */
32 const STABILITY_EXPERIMENTAL = 'EXPERIMENTAL';
33
34 /**
35 * Returns the check's stability.
36 *
37 * @since 1.0.0
38 *
39 * @return string One of the check stability constant values.
40 */
41 public function get_stability();
42
43 /**
44 * Amends the given result by running the check on the associated plugin.
45 *
46 * @since 1.0.0
47 *
48 * @param Check_Result $result The check result to amend, including the plugin context to check.
49 *
50 * @throws Exception Thrown when the check fails with a critical error (unrelated to any errors detected as part of
51 * the check).
52 */
53 public function run( Check_Result $result );
54
55 /**
56 * Gets the categories for the check.
57 *
58 * Every check must have at least one category.
59 *
60 * @since 1.0.0
61 *
62 * @return array The categories for the check.
63 */
64 public function get_categories();
65
66 /**
67 * Gets the description for the check.
68 *
69 * Every check must have a short description explaining what the check does.
70 *
71 * @since 1.1.0
72 *
73 * @return string Description.
74 */
75 public function get_description(): string;
76
77 /**
78 * Gets the documentation URL for the check.
79 *
80 * Every check must have a URL with further information about the check.
81 *
82 * @since 1.1.0
83 *
84 * @return string The documentation URL.
85 */
86 public function get_documentation_url(): string;
87 }
88