Skip to content

Commit

Permalink
Clean up some documentation in API
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed May 24, 2021
1 parent f24a952 commit 453bee1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/class-wp-rest-pattern-directory-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function register_routes() {
*
* @return WP_Error|bool True if the request has permission, WP_Error object otherwise.
*/
public function get_items_permissions_check( $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- Method must match signature of parent class.
public function get_items_permissions_check( $request ) {
if ( current_user_can( 'edit_posts' ) ) {
return true;
}
Expand Down Expand Up @@ -158,7 +158,7 @@ public function get_items( $request ) {
*
* @return WP_REST_Response
*/
public function prepare_item_for_response( $raw_pattern, $request ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable -- Method must match signature of parent class.
public function prepare_item_for_response( $raw_pattern, $request ) {
$prepared_pattern = array(
'id' => absint( $raw_pattern->id ),
'title' => sanitize_text_field( $raw_pattern->title->rendered ),
Expand Down Expand Up @@ -269,7 +269,7 @@ public function get_item_schema() {
/**
* Retrieves the search params for the patterns collection.
*
* @since 5.5.0
* @since 5.8.0
*
* @return array Collection parameters.
*/
Expand Down Expand Up @@ -298,7 +298,7 @@ public function get_collection_params() {
/**
* Filter collection parameters for the pattern directory controller.
*
* @since 5.5.0
* @since 5.8.0
*
* @param array $query_params JSON Schema-formatted collection parameters.
*/
Expand Down

0 comments on commit 453bee1

Please sign in to comment.