Skip to content

Commit c1e4a75

Browse files
gziolowestonruter
andcommitted
Update src/wp-includes/rest-api/endpoints/class-wp-rest-abilities-list-controller.php
Co-authored-by: Weston Ruter <[email protected]>
1 parent a1216ab commit c1e4a75

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class WP_Abilities_Category_Registry {
3030
* Holds the registered categories.
3131
*
3232
* @since 6.9.0
33-
* @var \WP_Ability_Category[]
33+
* @var WP_Ability_Category[]
3434
*/
3535
private $registered_categories = array();
3636

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class WP_Abilities_Registry {
3030
* Holds the registered abilities.
3131
*
3232
* @since 6.9.0
33-
* @var \WP_Ability[]
33+
* @var WP_Ability[]
3434
*/
3535
private $registered_abilities = array();
3636

src/wp-includes/rest-api/endpoints/class-wp-rest-abilities-list-controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public function get_collection_params(): array {
315315
'description' => __( 'Current page of the collection.' ),
316316
'type' => 'integer',
317317
'default' => 1,
318-
'sanitize_callback' => 'absint',
318+
'sanitize_callback' => 'intval',
319319
'validate_callback' => 'rest_validate_request_arg',
320320
'minimum' => 1,
321321
),
@@ -325,7 +325,7 @@ public function get_collection_params(): array {
325325
'default' => self::DEFAULT_PER_PAGE,
326326
'minimum' => 1,
327327
'maximum' => 100,
328-
'sanitize_callback' => 'absint',
328+
'sanitize_callback' => 'intval',
329329
'validate_callback' => 'rest_validate_request_arg',
330330
),
331331
'category' => array(

tests/phpunit/tests/abilities-api/wpAbilitiesRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Tests_Abilities_API_WpAbilitiesRegistry extends WP_UnitTestCase {
1515
/**
1616
* Mock abilities registry.
1717
*
18-
* @var \WP_Abilities_Registry
18+
* @var WP_Abilities_Registry
1919
*/
2020
private $registry = null;
2121

tests/phpunit/tests/abilities-api/wpAbilityCategory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Tests_Abilities_API_WpAbilityCategory extends WP_UnitTestCase {
1717
/**
1818
* Category registry instance.
1919
*
20-
* @var \WP_Abilities_Category_Registry
20+
* @var WP_Abilities_Category_Registry
2121
*/
2222
private $registry;
2323

tests/phpunit/tests/rest-api/wpRestAbilitiesListController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Tests_REST_API_WpRestAbilitiesListController extends WP_UnitTestCase {
1313
/**
1414
* REST Server instance.
1515
*
16-
* @var \WP_REST_Server
16+
* @var WP_REST_Server
1717
*/
1818
protected $server;
1919

@@ -50,7 +50,6 @@ public static function set_up_before_class(): void {
5050

5151
// Initialize Abilities API.
5252
do_action( 'abilities_api_init' );
53-
5453
}
5554

5655
/**

tests/phpunit/tests/rest-api/wpRestAbilitiesRunController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Tests_REST_API_WpRestAbilitiesRunController extends WP_UnitTestCase {
1313
/**
1414
* REST Server instance.
1515
*
16-
* @var \WP_REST_Server
16+
* @var WP_REST_Server
1717
*/
1818
protected $server;
1919

0 commit comments

Comments
 (0)