1 | <?php |
||
9 | class Requirements { |
||
10 | |||
11 | /** |
||
12 | * The array of requirements |
||
13 | * |
||
14 | * Should be of the format array( (string) group => __CLASS__ ); |
||
15 | * @var array |
||
16 | */ |
||
17 | private static $requirements = array(); |
||
18 | |||
19 | |||
20 | /** |
||
21 | * Get the array of registered requirements |
||
22 | * |
||
23 | * @param bool $group |
||
24 | * @return array |
||
25 | */ |
||
26 | public static function get_requirements( $group = false ) { |
||
35 | |||
36 | /** |
||
37 | * Get the requirement groups |
||
38 | * |
||
39 | * @return array |
||
|
|||
40 | */ |
||
41 | public static function get_requirement_groups() { |
||
44 | |||
45 | /** |
||
46 | * Register a new requirement |
||
47 | * |
||
48 | * @param $class |
||
49 | * @param string $group |
||
50 | * @return WP_Error |
||
51 | */ |
||
52 | public static function register( $class, $group = 'misc' ) { |
||
55 | |||
56 | /** |
||
57 | * Instantiate the individual requirement classes |
||
58 | * |
||
59 | * @access private |
||
60 | * @param string $class |
||
61 | * @return array An array of instantiated classes |
||
62 | */ |
||
63 | private static function instantiate( $class ) { |
||
70 | } |
||
71 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.