Skip to content

Commit 45cfa27

Browse files
gziolojonathanbossenger
andauthored
Prepare the branch for v0.2.0 release (WordPress#90)
* Fix issues reported by PHPCS in WP core * Set the next release version in PHPDoc * Set the proper next version Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
1 parent 41ec679 commit 45cfa27

File tree

4 files changed

+23
-20
lines changed

4 files changed

+23
-20
lines changed

includes/abilities-api/class-wp-abilities-registry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function register( string $name, array $args ): ?WP_Ability {
8787
/**
8888
* Filters the ability arguments before they are validated and used to instantiate the ability.
8989
*
90-
* @since n.e.x.t
90+
* @since 0.2.0
9191
*
9292
* @param array<string,mixed> $args The arguments used to instantiate the ability.
9393
* @param string $name The name of the ability, with its namespace.

includes/abilities-api/class-wp-ability.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ protected function validate_input( $input = null ) {
312312
*
313313
* The input is validated against the input schema before it is passed to to permission callback.
314314
*
315-
* @since N.E.X.T
315+
* @since 0.2.0
316316
*
317317
* @param mixed $input Optional. The input data for permission checking. Default `null`.
318318
* @return bool|\WP_Error Whether the ability has the necessary permission.
@@ -335,7 +335,7 @@ public function check_permissions( $input = null ) {
335335
*
336336
* The input is validated against the input schema before it is passed to to permission callback.
337337
*
338-
* @deprecated N.E.X.T Use check_permissions() instead.
338+
* @deprecated 0.2.0 Use check_permissions() instead.
339339
* @see WP_Ability::check_permissions()
340340
*
341341
* @since 0.1.0
@@ -344,7 +344,7 @@ public function check_permissions( $input = null ) {
344344
* @return bool|\WP_Error Whether the ability has the necessary permission.
345345
*/
346346
public function has_permission( $input = null ) {
347-
_deprecated_function( __METHOD__, 'N.E.X.T', 'WP_Ability::check_permissions()' );
347+
_deprecated_function( __METHOD__, '0.2.0', 'WP_Ability::check_permissions()' );
348348
return $this->check_permissions( $input );
349349
}
350350

@@ -436,7 +436,7 @@ public function execute( $input = null ) {
436436
/**
437437
* Fires before an ability gets executed.
438438
*
439-
* @since n.e.x.t
439+
* @since 0.2.0
440440
*
441441
* @param string $ability_name The name of the ability.
442442
* @param mixed $input The input data for the ability.
@@ -456,7 +456,7 @@ public function execute( $input = null ) {
456456
/**
457457
* Fires immediately after an ability finished executing.
458458
*
459-
* @since n.e.x.t
459+
* @since 0.2.0
460460
*
461461
* @param string $ability_name The name of the ability.
462462
* @param mixed $input The input data for the ability.

tests/unit/abilities-api/wpAbility.php

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function set_up(): void {
4040
*/
4141
public function data_execute_input() {
4242
return array(
43-
'null input' => array(
43+
'null input' => array(
4444
array(
4545
'type' => array( 'null', 'integer' ),
4646
'description' => 'The null or integer to convert to integer.',
@@ -52,7 +52,7 @@ static function ( $input ): int {
5252
null,
5353
0,
5454
),
55-
'boolean input' => array(
55+
'boolean input' => array(
5656
array(
5757
'type' => 'boolean',
5858
'description' => 'The boolean to convert to integer.',
@@ -64,7 +64,7 @@ static function ( bool $input ): int {
6464
true,
6565
1,
6666
),
67-
'integer input' => array(
67+
'integer input' => array(
6868
array(
6969
'type' => 'integer',
7070
'description' => 'The integer to add 5 to.',
@@ -76,7 +76,7 @@ static function ( int $input ): int {
7676
2,
7777
7,
7878
),
79-
'number input' => array(
79+
'number input' => array(
8080
array(
8181
'type' => 'number',
8282
'description' => 'The floating number to round.',
@@ -88,7 +88,7 @@ static function ( float $input ): int {
8888
2.7,
8989
3,
9090
),
91-
'string input' => array(
91+
'string input' => array(
9292
array(
9393
'type' => 'string',
9494
'description' => 'The string to measure the length of.',
@@ -100,7 +100,7 @@ static function ( string $input ): int {
100100
'Hello world!',
101101
12,
102102
),
103-
'object input' => array(
103+
'object input' => array(
104104
array(
105105
'type' => 'object',
106106
'description' => 'An object containing two numbers to add.',
@@ -117,24 +117,27 @@ static function ( string $input ): int {
117117
),
118118
),
119119
'additionalProperties' => false,
120-
),
120+
),
121121
static function ( array $input ): int {
122122
return $input['a'] + $input['b'];
123123
},
124-
array( 'a' => 2, 'b' => 3 ),
124+
array(
125+
'a' => 2,
126+
'b' => 3,
127+
),
125128
5,
126129
),
127-
'array input' => array(
130+
'array input' => array(
128131
array(
129132
'type' => 'array',
130133
'description' => 'An array containing two numbers to add.',
131134
'required' => true,
132135
'minItems' => 2,
133-
'maxItems' => 2,
136+
'maxItems' => 2,
134137
'items' => array(
135138
'type' => 'integer',
136139
),
137-
),
140+
),
138141
static function ( array $input ): int {
139142
return $input[0] + $input[1];
140143
},

tests/unit/rest-api/wpRestAbilitiesListController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ public function test_pagination_links(): void {
300300
$request->set_param( 'page', 1 );
301301
$response = $this->server->dispatch( $request );
302302

303-
$headers = $response->get_headers();
303+
$headers = $response->get_headers();
304304
$link_header = $headers['Link'] ?? '';
305305

306306
// Parse Link header for rel="next" and rel="prev"
@@ -311,7 +311,7 @@ public function test_pagination_links(): void {
311311
$request->set_param( 'page', 3 );
312312
$response = $this->server->dispatch( $request );
313313

314-
$headers = $response->get_headers();
314+
$headers = $response->get_headers();
315315
$link_header = $headers['Link'] ?? '';
316316

317317
$this->assertStringContainsString( 'rel="next"', $link_header );
@@ -323,7 +323,7 @@ public function test_pagination_links(): void {
323323
$request->set_param( 'page', $last_page );
324324
$response = $this->server->dispatch( $request );
325325

326-
$headers = $response->get_headers();
326+
$headers = $response->get_headers();
327327
$link_header = $headers['Link'] ?? '';
328328

329329
$this->assertStringNotContainsString( 'rel="next"', $link_header );

0 commit comments

Comments
 (0)