Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public function __construct( $callback ) {
* @since UT (3.7.0)
*
* @param int $object_id ID of the object to apply the callback on.
*
* @return mixed Updated object field.
*/
public function call( $object_id ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class WP_UnitTest_Factory_For_Attachment extends WP_UnitTest_Factory_For_Post {
* }
* @param int $legacy_parent Deprecated.
* @param array $legacy_args Deprecated.
*
* @return int|WP_Error The attachment ID on success, WP_Error object on failure.
*/
public function create_object( $args, $legacy_parent = 0, $legacy_args = array() ) {
Expand Down Expand Up @@ -58,7 +57,6 @@ public function create_object( $args, $legacy_parent = 0, $legacy_args = array()
* @param string $file Full path to the file to create an attachment object for.
* The name of the file will be used as the attachment name.
* @param int $parent_post_id ID of the post to attach the file to.
*
* @return int|WP_Error The attachment ID on success, WP_Error object on failure.
*/
public function create_upload_object( $file, $parent_post_id = 0 ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function __construct( $factory = null ) {
* Creates a site object.
*
* @param array $args Arguments for the site object.
*
* @return int|WP_Error The site ID on success, WP_Error object on failure.
*/
public function create_object( $args ) {
Expand Down Expand Up @@ -80,7 +79,6 @@ public function update_object( $blog_id, $fields ) {}
* Retrieves a site by a given ID.
*
* @param int $blog_id ID of the site to retrieve.
*
* @return WP_Site|null The site object on success, null on failure.
*/
public function get_object_by_id( $blog_id ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function __construct( $factory = null ) {
* @since 6.2.0 Returns a WP_Error object on failure.
*
* @param array $args Arguments for the link object.
*
* @return int|WP_Error The link ID on success, WP_Error object on failure.
*/
public function create_object( $args ) {
Expand All @@ -44,7 +43,6 @@ public function create_object( $args ) {
*
* @param int $link_id ID of the link to update.
* @param array $fields The fields to update.
*
* @return int|WP_Error The link ID on success, WP_Error object on failure.
*/
public function update_object( $link_id, $fields ) {
Expand All @@ -65,7 +63,6 @@ public function update_object( $link_id, $fields ) {
* @since 4.6.0
*
* @param int $link_id ID of the link to retrieve.
*
* @return object|null The link object on success, null on failure.
*/
public function get_object_by_id( $link_id ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function __construct( $factory = null ) {
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param array $args The comment details.
*
* @return int|WP_Error The comment ID on success, WP_Error object on failure.
*/
public function create_object( $args ) {
Expand All @@ -58,7 +57,6 @@ public function create_object( $args ) {
*
* @param int $comment_id The comment ID.
* @param array $fields The comment details.
*
* @return int|WP_Error The value 1 if the comment was updated, 0 if not updated.
* WP_Error object on failure.
*/
Expand All @@ -76,7 +74,6 @@ public function update_object( $comment_id, $fields ) {
* @param int $count Total amount of comments to create.
* @param array $args The comment details.
* @param null $generation_definitions Default values.
*
* @return int[] Array with the comment IDs.
*/
public function create_post_comments( $post_id, $count = 1, $args = array(), $generation_definitions = null ) {
Expand All @@ -90,7 +87,6 @@ public function create_post_comments( $post_id, $count = 1, $args = array(), $ge
* @since UT (3.7.0)
*
* @param int $comment_id ID of the comment to retrieve.
*
* @return WP_Comment|null WP_Comment object on success, null on failure.
*/
public function get_object_by_id( $comment_id ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public function __construct( $factory = null ) {
* @since 6.2.0 Returns a WP_Error object on failure.
*
* @param array $args Arguments for the network object.
*
* @return int|WP_Error The network ID on success, WP_Error object on failure.
*/
public function create_object( $args ) {
Expand Down Expand Up @@ -74,7 +73,6 @@ public function update_object( $network_id, $fields ) {}
* @since 3.9.0
*
* @param int $network_id ID of the network to retrieve.
*
* @return WP_Network|null The network object on success, null on failure.
*/
public function get_object_by_id( $network_id ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public function __construct( $factory = null ) {
* @since 6.2.0 Returns a WP_Error object on failure.
*
* @param array $args Array with elements for the post.
*
* @return int|WP_Error The post ID on success, WP_Error object on failure.
*/
public function create_object( $args ) {
Expand All @@ -45,7 +44,6 @@ public function create_object( $args ) {
*
* @param int $post_id ID of the post to update.
* @param array $fields Post data.
*
* @return int|WP_Error The post ID on success, WP_Error object on failure.
*/
public function update_object( $post_id, $fields ) {
Expand All @@ -59,7 +57,6 @@ public function update_object( $post_id, $fields ) {
* @since UT (3.7.0)
*
* @param int $post_id ID of the post to retrieve.
*
* @return WP_Post|null WP_Post object on success, null on failure.
*/
public function get_object_by_id( $post_id ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function __construct( $factory = null, $taxonomy = null ) {
* @since UT (3.7.0)
*
* @param array $args Array of arguments for inserting a term.
*
* @return int|WP_Error The term ID on success, WP_Error object on failure.
*/
public function create_object( $args ) {
Expand All @@ -53,7 +52,6 @@ public function create_object( $args ) {
*
* @param int|object $term The term to update.
* @param array $fields Array of arguments for updating a term.
*
* @return int|WP_Error The term ID on success, WP_Error object on failure.
*/
public function update_object( $term, $fields ) {
Expand Down Expand Up @@ -99,7 +97,6 @@ public function add_post_terms( $post_id, $terms, $taxonomy, $append = true ) {
*
* @param array $args Array or string of arguments for inserting a term.
* @param null $generation_definitions The default values.
*
* @return WP_Term|WP_Error|null WP_Term on success. WP_Error if taxonomy does not exist. Null for miscellaneous failure.
*/
public function create_and_get( $args = array(), $generation_definitions = null ) {
Expand All @@ -120,7 +117,6 @@ public function create_and_get( $args = array(), $generation_definitions = null
* @since UT (3.7.0)
*
* @param int $term_id ID of the term to retrieve.
*
* @return WP_Term|WP_Error|null WP_Term on success. WP_Error if taxonomy does not exist. Null for miscellaneous failure.
*/
public function get_object_by_id( $term_id ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function __construct( $factory, $default_generation_definitions = array()
* @since UT (3.7.0)
*
* @param array $args The arguments.
*
* @return int|WP_Error The object ID on success, WP_Error object on failure.
*/
abstract public function create_object( $args );
Expand All @@ -46,7 +45,6 @@ abstract public function create_object( $args );
*
* @param int $object_id The object ID.
* @param array $fields The values to update.
*
* @return int|WP_Error The object ID on success, WP_Error object on failure.
*/
abstract public function update_object( $object_id, $fields );
Expand Down Expand Up @@ -115,7 +113,6 @@ public function create_and_get( $args = array(), $generation_definitions = null
* @since UT (3.7.0)
*
* @param int $object_id The object ID.
*
* @return mixed The object. Can be anything.
*/
abstract public function get_object_by_id( $object_id );
Expand Down Expand Up @@ -197,7 +194,6 @@ public function generate_args( $args = array(), $generation_definitions = null,
*
* @param WP_UnitTest_Factory_Callback_After_Create[] $callbacks Array with callback functions.
* @param int $object_id ID of the object to apply callbacks for.
*
* @return array The altered fields.
*/
public function apply_callbacks( $callbacks, $object_id ) {
Expand All @@ -216,7 +212,6 @@ public function apply_callbacks( $callbacks, $object_id ) {
* @since UT (3.7.0)
*
* @param callable $callback The callback function.
*
* @return WP_UnitTest_Factory_Callback_After_Create
*/
public function callback( $callback ) {
Expand All @@ -229,7 +224,6 @@ public function callback( $callback ) {
* @since UT (3.7.0)
*
* @param array|object|string|mixed $value The value to add slashes to.
*
* @return array|string The value with the possibly applied slashes.
*/
public function addslashes_deep( $value ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function __construct( $factory = null ) {
* @since UT (3.7.0)
*
* @param array $args The user data to insert.
*
* @return int|WP_Error The user ID on success, WP_Error object on failure.
*/
public function create_object( $args ) {
Expand All @@ -41,7 +40,6 @@ public function create_object( $args ) {
*
* @param int $user_id ID of the user to update.
* @param array $fields The user data to update.
*
* @return int|WP_Error The user ID on success, WP_Error object on failure.
*/
public function update_object( $user_id, $fields ) {
Expand All @@ -55,7 +53,6 @@ public function update_object( $user_id, $fields ) {
* @since UT (3.7.0)
*
* @param int $user_id ID of the user ID to retrieve.
*
* @return WP_User The user object.
*/
public function get_object_by_id( $user_id ) {
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/tests/ajax/wpAjaxCropImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ private function prepare_post( WP_Post $attachment ) {

/**
* @param WP_Post $attachment
*
* @return string
*/
private function get_attachment_filename( WP_Post $attachment ) {
Expand Down
7 changes: 0 additions & 7 deletions tests/phpunit/tests/ajax/wpAjaxWpPrivacyErasePersonalData.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ protected function _set_eraser_callback( $callback ) {
* @since 5.2.0
*
* @param array $erasers List of data erasers.
*
* @return array Array of data erasers.
*/
public function filter_eraser_callback_value( $erasers ) {
Expand All @@ -197,7 +196,6 @@ protected function _unset_eraser_key( $key ) {
* @since 5.2.0
*
* @param array $erasers Erasers.
*
* @return array Erasers.
*/
public function filter_unset_eraser_index( $erasers ) {
Expand Down Expand Up @@ -229,7 +227,6 @@ protected function _unset_response_key( $key ) {
*
* @param string $email_address The requester's email address.
* @param int $page Page number.
*
* @return array Export data.
*/
public function filter_unset_response_index( $email_address, $page = 1 ) {
Expand Down Expand Up @@ -639,7 +636,6 @@ public function test_error_when_eraser_messages_not_array() {
*
* @param string $email_address The requester's email address.
* @param int $page Page number.
*
* @return array Export data.
*/
public function filter_response_messages_invalid( $email_address, $page = 1 ) {
Expand Down Expand Up @@ -741,7 +737,6 @@ public function test_output_should_be_filterable() {
* @param int $page The page for this response.
* @param int $request_id The privacy request post ID associated with this request.
* @param string $eraser_key The key (slug) of the eraser that provided this data.
*
* @return array Filtered erase response.
*/
public function filter_eraser_data_response( $response, $eraser_index, $email_address, $page, $request_id, $eraser_key ) {
Expand All @@ -760,7 +755,6 @@ public function filter_eraser_data_response( $response, $eraser_index, $email_ad
* @since 5.2.0
*
* @param array $erasers An array of personal data erasers.
*
* @return array An array of personal data erasers.
*/
public function register_custom_personal_data_eraser( $erasers ) {
Expand All @@ -778,7 +772,6 @@ public function register_custom_personal_data_eraser( $erasers ) {
*
* @param string $email_address The comment author email address.
* @param int $page Page number.
*
* @return array Erase data.
*/
public function callback_personal_data_eraser( $email_address, $page = 1 ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ protected function _unset_exporter_key( $key ) {
* Unset a specified key in the test exporter array.
*
* @param array $exporters List of data exporters.
*
* @return array List of data exporters.
*/
public function filter_unset_exporter_key( $exporters ) {
Expand Down Expand Up @@ -579,7 +578,6 @@ public function test_error_when_exporter_missing_data_response() {
*
* @param string $email_address The requester's email address.
* @param int $page Page number.
*
* @return array Export data.
*/
public function callback_missing_data_response( $email_address, $page = 1 ) {
Expand Down Expand Up @@ -615,7 +613,6 @@ public function test_function_should_error_when_exporter_missing_data_array_resp
*
* @param string $email_address The requester's email address.
* @param int $page Page number.
*
* @return array Export data.
*/
public function callback_missing_data_array_response( $email_address, $page = 1 ) {
Expand Down Expand Up @@ -650,7 +647,6 @@ public function test_error_when_exporter_missing_done_response() {
*
* @param string $email_address The requester's email address.
* @param int $page Page number.
*
* @return array Export data.
*/
public function callback_missing_done_response( $email_address, $page = 1 ) {
Expand Down Expand Up @@ -729,7 +725,6 @@ public function test_output_should_be_filterable() {
* @param int $request_id The privacy request post ID associated with this request.
* @param bool $send_as_email Whether the final results of the export should be emailed to the user.
* @param string $exporter_key The key (slug) of the exporter that provided this data.
*
* @return array The personal data for the given exporter and page.
*/
public function filter_exporter_data_response( $response, $exporter_index, $email_address, $page, $request_id, $send_as_email, $exporter_key ) {
Expand Down Expand Up @@ -757,7 +752,6 @@ public function filter_exporter_data_response( $response, $exporter_index, $emai
* @since 5.2.0
*
* @param array $exporters An array of personal data exporters.
*
* @return array An array of personal data exporters.
*/
public function filter_register_custom_personal_data_exporter( $exporters ) {
Expand All @@ -775,7 +769,6 @@ public function filter_register_custom_personal_data_exporter( $exporters ) {
*
* @param string $email_address The requester's email address.
* @param int $page Page number.
*
* @return array Export data response.
*/
public function callback_custom_personal_data_exporter( $email_address, $page = 1 ) {
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/tests/block-supports/aria-label.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public function tear_down() {
*
* @param string $block_name Name for the test block.
* @param array $supports Array defining block support configuration.
*
* @return WP_Block_Type The block type for the newly registered test block.
*/
private function register_aria_label_block_with_support( $block_name, $supports = array() ) {
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/tests/block-supports/shadow.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public function tear_down() {
*
* @param string $block_name Name for the test block.
* @param array $supports Array defining block support configuration.
*
* @return WP_Block_Type The block type for the newly registered test block.
*/
private function register_shadow_block_with_support( $block_name, $supports = array() ) {
Expand Down
1 change: 0 additions & 1 deletion tests/phpunit/tests/blocks/wpBlockType.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ public function test_variations_callback_happens_only_once() {
*
* @param array $variations Block variations before filter.
* @param WP_Block_Type $block_type Block type.
*
* @return array Block variations after filter.
*/
public function filter_test_variations( $variations, $block_type ) {
Expand Down
Loading
Loading