Skip to content

Commit 337514b

Browse files
committed
Remove PHPStan comments in PHPDoc
1 parent 14935e7 commit 337514b

File tree

5 files changed

+0
-71
lines changed

5 files changed

+0
-71
lines changed

src/wp-includes/abilities-api.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,6 @@
4444
* @type string $ability_class Optional. Custom class to instantiate instead of WP_Ability.
4545
* }
4646
* @return WP_Ability|null An instance of registered ability on success, null on failure.
47-
*
48-
* @phpstan-param array{
49-
* label?: string,
50-
* description?: string,
51-
* category?: string,
52-
* execute_callback?: callable( mixed $input= ): (mixed|WP_Error),
53-
* permission_callback?: callable( mixed $input= ): (bool|WP_Error),
54-
* input_schema?: array<string, mixed>,
55-
* output_schema?: array<string, mixed>,
56-
* meta?: array{
57-
* annotations?: array<string, (bool|string)>,
58-
* show_in_rest?: bool,
59-
* ...<string, mixed>,
60-
* },
61-
* ability_class?: class-string<WP_Ability>,
62-
* ...<string, mixed>
63-
* } $args
6447
*/
6548
function wp_register_ability( string $name, array $args ): ?WP_Ability {
6649
if ( ! did_action( 'wp_abilities_api_init' ) ) {
@@ -138,13 +121,6 @@ function wp_get_abilities(): array {
138121
* @type array<string, mixed> $meta Optional. Additional metadata for the category.
139122
* }
140123
* @return WP_Ability_Category|null The registered category instance on success, null on failure.
141-
*
142-
* @phpstan-param array{
143-
* label: string,
144-
* description: string,
145-
* meta?: array<string, mixed>,
146-
* ...<string, mixed>
147-
* } $args
148124
*/
149125
function wp_register_ability_category( string $slug, array $args ): ?WP_Ability_Category {
150126
return WP_Abilities_Category_Registry::get_instance()->register( $slug, $args );

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@ final class WP_Abilities_Category_Registry {
5353
* @type array<string, mixed> $meta Optional. Additional metadata for the category.
5454
* }
5555
* @return WP_Ability_Category|null The registered category instance on success, null on failure.
56-
*
57-
* @phpstan-param array{
58-
* label: string,
59-
* description: string,
60-
* meta?: array<string, mixed>,
61-
* ...<string, mixed>
62-
* } $args
6356
*/
6457
public function register( string $slug, array $args ): ?WP_Ability_Category {
6558
if ( ! doing_action( 'wp_abilities_api_categories_init' ) ) {

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,6 @@ final class WP_Abilities_Registry {
6767
* @type string $ability_class Optional. Custom class to instantiate instead of WP_Ability.
6868
* }
6969
* @return WP_Ability|null The registered ability instance on success, null on failure.
70-
*
71-
* @phpstan-param array{
72-
* label?: string,
73-
* description?: string,
74-
* category?: string,
75-
* execute_callback?: callable( mixed $input= ): (mixed|WP_Error),
76-
* permission_callback?: callable( mixed $input= ): (bool|WP_Error),
77-
* input_schema?: array<string, mixed>,
78-
* output_schema?: array<string, mixed>,
79-
* meta?: array{
80-
* annotations?: array<string, (bool|string)>,
81-
* show_in_rest?: bool,
82-
* ...<string, mixed>
83-
* },
84-
* ability_class?: class-string<WP_Ability>,
85-
* ...<string, mixed>
86-
* } $args
8770
*/
8871
public function register( string $name, array $args ): ?WP_Ability {
8972
if ( ! preg_match( '/^[a-z0-9-]+\/[a-z0-9-]+$/', $name ) ) {

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ public function __construct( string $slug, array $args ) {
123123
* @type array<string, mixed> $meta Optional. Additional metadata for the category.
124124
* }
125125
* @throws InvalidArgumentException if an argument is invalid.
126-
*
127-
* @phpstan-return array{
128-
* label: string,
129-
* description: string,
130-
* meta?: array<string, mixed>,
131-
* ...<string, mixed>,
132-
* }
133126
*/
134127
protected function prepare_properties( array $args ): array {
135128
// Required args must be present and of the correct type.

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -231,22 +231,6 @@ public function __construct( string $name, array $args ) {
231231
* }
232232
* }
233233
* @throws InvalidArgumentException if an argument is invalid.
234-
*
235-
* @phpstan-return array{
236-
* label: string,
237-
* description: string,
238-
* category: string,
239-
* execute_callback: callable( mixed $input= ): (mixed|WP_Error),
240-
* permission_callback: callable( mixed $input= ): (bool|WP_Error),
241-
* input_schema?: array<string, mixed>,
242-
* output_schema?: array<string, mixed>,
243-
* meta?: array{
244-
* annotations?: array<string, (bool|string)>,
245-
* show_in_rest?: bool,
246-
* ...<string, mixed>
247-
* },
248-
* ...<string, mixed>,
249-
* } $args
250234
*/
251235
protected function prepare_properties( array $args ): array {
252236
// Required args must be present and of the correct type.

0 commit comments

Comments
 (0)