@@ -7,6 +7,9 @@ discard block |
||
7 | 7 | class Builder { |
8 | 8 | public $capability; |
9 | 9 | |
10 | + /** |
|
11 | + * @param string $name |
|
12 | + */ |
|
10 | 13 | function create_capability( $name ) { |
11 | 14 | $this->capability = new Capability( $name ); |
12 | 15 | return $this; |
@@ -16,11 +19,17 @@ discard block |
||
16 | 19 | return $this->capability; |
17 | 20 | } |
18 | 21 | |
22 | + /** |
|
23 | + * @param string $wp_role |
|
24 | + */ |
|
19 | 25 | function require_wp_role( $wp_role ) { |
20 | 26 | $this->capability->add_rule( new WPRoleRule( $wp_role ) ); |
21 | 27 | return $this; |
22 | 28 | } |
23 | 29 | |
30 | + /** |
|
31 | + * @param string $wp_capability |
|
32 | + */ |
|
24 | 33 | function require_wp_capability( $wp_capability ) { |
25 | 34 | $this->capability->add_rule( new WPCapabilityRule( $wp_capability ) ); |
26 | 35 | return $this; |