PluginProbe
Plugin Check (PCP) / trunk
Plugin Check (PCP) vtrunk
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_Repository.php

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

71 lines 1.2 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\Check_Repository
4 *
5 * @package plugin-check
6 */
7
8 namespace WordPress\Plugin_Check\Checker;
9
10 /**
11 * Check Repository interface.
12 *
13 * @since 1.0.0
14 */
15 interface Check_Repository {
16
17 /**
18 * Bitwise flag for static type checks.
19 *
20 * @since 1.0.0
21 * @var int
22 */
23 const TYPE_STATIC = 1;
24
25 /**
26 * Bitwise flag for runtime type checks.
27 *
28 * @since 1.0.0
29 * @var int
30 */
31 const TYPE_RUNTIME = 2;
32
33 /**
34 * Bitwise flag for all check types.
35 *
36 * This is the same as `TYPE_STATIC | TYPE_RUNTIME`.
37 *
38 * @since 1.0.0
39 * @var int
40 */
41 const TYPE_ALL = 3;
42
43 /**
44 * Bitwise flag for experimental checks.
45 *
46 * @since 1.0.0
47 * @var int
48 */
49 const INCLUDE_EXPERIMENTAL = 4;
50
51 /**
52 * Registers a check to the repository.
53 *
54 * @since 1.0.0
55 *
56 * @param string $slug The checks slug.
57 * @param Check $check The Check instance.
58 */
59 public function register_check( $slug, Check $check );
60
61 /**
62 * Returns an array of checks.
63 *
64 * @since 1.0.0
65 *
66 * @param int $flags The check type flag.
67 * @return Check_Collection Check collection providing an indexed array of check instances.
68 */
69 public function get_checks( $flags = self::TYPE_ALL );
70 }
71