Skip to content

Commit

Permalink
Data providers should always be declared as static. Props @swisspidy.
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-vlasenko authored and Anton Vlasenko committed Dec 12, 2024
1 parent 9c91e45 commit 2e17f2b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ public function test_get_items_only_fetches_ids_for_head_requests( $method ) {
*
* @return array
*/
public function data_readable_http_methods() {
public static function data_readable_http_methods() {
return array(
'GET request' => array( 'GET' ),
'HEAD request' => array( 'HEAD' ),
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/rest-comments-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ public function test_get_items_no_permission_for_no_post( $method ) {
*
* @return array
*/
public function data_readable_http_methods() {
public static function data_readable_http_methods() {
return array(
'GET request' => array( 'GET' ),
'HEAD request' => array( 'HEAD' ),
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/rest-posts-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,7 @@ public function test_get_items_pagination_headers( $method ) {
*
* @return array
*/
public function data_readable_http_methods() {
public static function data_readable_http_methods() {
return array(
'GET request' => array( 'GET' ),
'HEAD request' => array( 'HEAD' ),
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/rest-tags-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,7 @@ public function test_get_items_only_fetches_ids_for_head_requests( $method ) {
*
* @return array
*/
public function data_readable_http_methods() {
public static function data_readable_http_methods() {
return array(
'GET request' => array( 'GET' ),
'HEAD request' => array( 'HEAD' ),
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/rest-api/rest-users-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public function test_get_items_with_edit_context( $method ) {
*
* @return array
*/
public function data_readable_http_methods() {
public static function data_readable_http_methods() {
return array(
'GET request' => array( 'GET' ),
'HEAD request' => array( 'HEAD' ),
Expand Down

0 comments on commit 2e17f2b

Please sign in to comment.