@@ -44,7 +44,7 @@ |
||
44 | 44 | * @param array $attr The attributes of the shortcode. |
45 | 45 | * @param array $old_attr Optional array of attributes from the old shortcode format. |
46 | 46 | * |
47 | - * @return array Width and height. |
|
47 | + * @return integer[] Width and height. |
|
48 | 48 | */ |
49 | 49 | function jetpack_shortcode_get_vimeo_dimensions( $attr, $old_attr = array() ) { |
50 | 50 | global $content_width; |
@@ -24,6 +24,10 @@ |
||
24 | 24 | private $required_value; |
25 | 25 | |
26 | 26 | // phpcs:ignore Squiz.Commenting.FunctionComment.Missing |
27 | + |
|
28 | + /** |
|
29 | + * @param string $filter_name |
|
30 | + */ |
|
27 | 31 | public function __construct( $filter_name, $required_value, $initial_value = false ) { |
28 | 32 | $this->filter_name = $filter_name; |
29 | 33 | $this->required_value = $required_value; |
@@ -22,12 +22,16 @@ discard block |
||
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Utility functions |
25 | + * @param string $role |
|
25 | 26 | */ |
26 | 27 | protected function setUserRole( $role ) { |
27 | 28 | $user = wp_get_current_user(); |
28 | 29 | $user->set_role( $role ); |
29 | 30 | } |
30 | 31 | |
32 | + /** |
|
33 | + * @param string $cap |
|
34 | + */ |
|
31 | 35 | protected function addUserCapability( $cap ) { |
32 | 36 | $user = wp_get_current_user(); |
33 | 37 | $user->add_cap( $cap ); |
@@ -102,6 +106,9 @@ discard block |
||
102 | 106 | $this->assertFalse( $capability->check()->granted() ); |
103 | 107 | } |
104 | 108 | |
109 | + /** |
|
110 | + * @param string $product_slug |
|
111 | + */ |
|
105 | 112 | private function mockJetpackPlan( $product_slug ) { |
106 | 113 | $this->current_product_slug = $product_slug; |
107 | 114 | |
@@ -134,6 +141,9 @@ discard block |
||
134 | 141 | $this->assertFalse( $capability->check()->granted() ); |
135 | 142 | } |
136 | 143 | |
144 | + /** |
|
145 | + * @param string $supports_slug |
|
146 | + */ |
|
137 | 147 | private function mockJetpackPlanSupports( $supports_slug ) { |
138 | 148 | $this->current_supports_slug = $supports_slug; |
139 | 149 | |
@@ -217,6 +227,9 @@ discard block |
||
217 | 227 | $this->assertTrue( $capability->check()->granted() ); |
218 | 228 | } |
219 | 229 | |
230 | + /** |
|
231 | + * @param boolean $is_active |
|
232 | + */ |
|
220 | 233 | private function mockJetpackIsActive( $is_active ) { |
221 | 234 | $this->current_is_active = $is_active; |
222 | 235 |
@@ -27,6 +27,7 @@ |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * @param string slug The slug for the rule being built |
30 | + * @param string $slug |
|
30 | 31 | */ |
31 | 32 | static function build( $slug ) { |
32 | 33 | return Capabilities::build( $slug ); |
@@ -24,11 +24,19 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | // phpcs:ignore Squiz.Commenting.FunctionComment.Missing |
27 | + |
|
28 | + /** |
|
29 | + * @param string $name |
|
30 | + */ |
|
27 | 31 | public static function get( $name ) { |
28 | 32 | return self::$capabilities[ $name ]; |
29 | 33 | } |
30 | 34 | |
31 | 35 | // phpcs:ignore Squiz.Commenting.FunctionComment.Missing |
36 | + |
|
37 | + /** |
|
38 | + * @param string $name |
|
39 | + */ |
|
32 | 40 | public static function granted( $name ) { |
33 | 41 | return isset( self::$capabilities[ $name ] ) ? self::$capabilities[ $name ]->check()->granted() : false; |
34 | 42 | } |
@@ -39,6 +47,10 @@ discard block |
||
39 | 47 | } |
40 | 48 | |
41 | 49 | // phpcs:ignore Squiz.Commenting.FunctionComment.Missing |
50 | + |
|
51 | + /** |
|
52 | + * @param Capabilities\AggregateRule $capability |
|
53 | + */ |
|
42 | 54 | public static function register( $capability, $name ) { |
43 | 55 | self::$capabilities[ $name ] = $capability; |
44 | 56 | } |