@@ -65,15 +65,15 @@ class WP_Ability {
6565 * The ability execute callback.
6666 *
6767 * @since 0.1.0
68- * @var callable
68+ * @var callable( array<string,mixed> $input): (mixed|\WP_Error)
6969 */
7070 protected $ execute_callback ;
7171
7272 /**
7373 * The optional ability permission callback.
7474 *
7575 * @since 0.1.0
76- * @var ?callable
76+ * @var ?callable( array<string,mixed> $input ): (bool|\WP_Error)
7777 */
7878 protected $ permission_callback = null ;
7979
@@ -107,7 +107,7 @@ class WP_Ability {
107107 * input_schema?: array<string,mixed>,
108108 * output_schema?: array<string,mixed>,
109109 * execute_callback: callable( array<string,mixed> $input): (mixed|\WP_Error),
110- * permission_callback?: ?callable( ? array<string,mixed> $input ): bool,
110+ * permission_callback?: ?callable( array<string,mixed> $input ): ( bool|\WP_Error) ,
111111 * meta?: array<string,mixed>,
112112 * ...<string, mixed>,
113113 * } $properties
@@ -240,7 +240,7 @@ protected function validate_input( array $input = array() ) {
240240 * @since 0.1.0
241241 *
242242 * @param array<string,mixed> $input Optional. The input data for permission checking.
243- * @return true |\WP_Error Whether the ability has the necessary permission.
243+ * @return bool |\WP_Error Whether the ability has the necessary permission.
244244 */
245245 public function has_permission ( array $ input = array () ) {
246246 $ is_valid = $ this ->validate_input ( $ input );
0 commit comments