Skip to content

Commit 434c770

Browse files
committed
Docs: Document exceptions in WP_Ability_Category
Adds a missing `@throws` annotation to `WP_Ability_Category::__construct()` and normalizes capitalization for the existing `@throws` description in `WP_Ability_Category::prepare_properties()`. Props igar-bhanushali. Fixes #65512. git-svn-id: https://develop.svn.wordpress.org/trunk@62552 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a2d90ce commit 434c770

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ final class WP_Ability_Category {
7171
* @type string $description A description of the ability category.
7272
* @type array<string, mixed> $meta Optional. Additional metadata for the ability category.
7373
* }
74+
* @throws InvalidArgumentException If an argument is invalid.
7475
*/
7576
public function __construct( string $slug, array $args ) {
7677
if ( empty( $slug ) ) {
@@ -122,7 +123,7 @@ public function __construct( string $slug, array $args ) {
122123
* @type string $description A description of the ability category.
123124
* @type array<string, mixed> $meta Optional. Additional metadata for the ability category.
124125
* }
125-
* @throws InvalidArgumentException if an argument is invalid.
126+
* @throws InvalidArgumentException If an argument is invalid.
126127
*/
127128
protected function prepare_properties( array $args ): array {
128129
// Required args must be present and of the correct type.

0 commit comments

Comments
 (0)