Make WordPress Core


Ignore:
Timestamp:
09/25/2023 03:34:34 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Fix a few newly introduced WPCS issues.

Follow-up to [56570], [56573], [56589], [56604], [56612], [56620], [56629], [56631], [56638], [56642], [56644], [56649].

Props jrf.
See #59161, #58831.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/vars.php

    r56638 r56680  
    3535         * @return array
    3636         */
    37         function get_data_to_test_wp_is_mobile(): array {
     37        public function get_data_to_test_wp_is_mobile(): array {
    3838                return array(
    3939                        'mobile client hint'  => array(
    … …  
    105105
    106106        /**
    107          * Tests that wp_is_mobile() .
    108          *
    109107         * @ticket 59370
    110108         *
    … …  
    116114         * @param bool  $expected Whether expected.
    117115         */
    118         function test_wp_is_mobile( array $headers, bool $expected ) {
     116        public function test_wp_is_mobile( array $headers, bool $expected ) {
    119117                foreach ( $headers as $key => $value ) {
    120118                        $_SERVER[ $key ] = $value;
    … …  
    128126         * @covers ::wp_is_mobile
    129127         */
    130         function test_wp_is_mobile_is_true_with_filter() {
     128        public function test_wp_is_mobile_is_true_with_filter() {
    131129                $this->assertFalse( wp_is_mobile() );
    132130                add_filter( 'wp_is_mobile', '__return_true' );
    … …  
    139137         * @covers ::wp_is_mobile
    140138         */
    141         function test_wp_is_mobile_is_false_with_filter() {
     139        public function test_wp_is_mobile_is_false_with_filter() {
    142140                $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.60 Mobile Safari/537.36';
    143141                $this->assertTrue( wp_is_mobile() );
Note: See TracChangeset for help on using the changeset viewer.