WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#48155 closed enhancement (fixed)

Different capitalisation in assertArrayhasKey method call

Reported by: david.binda Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: trivial Version:
Component: REST API Keywords: has-patch
Focuses: Cc:
PR Number:

Description

The r46252 introduced assertArrayhasKey method call, which is capitalised differently than then rest of the calls in the same method.

157                     $this->assertArrayHasKey( 'name', $properties );
158                     $this->assertArrayHasKey( 'private', $properties );
159                     $this->assertArrayHasKey( 'protected', $properties );
160                     $this->assertArrayHasKey( 'public', $properties );
161                     $this->assertArrayHasKey( 'queryable', $properties );
162                     $this->assertArrayHasKey( 'show_in_list', $properties );
163                     $this->assertArrayHasKey( 'slug', $properties );
164                     $this->assertArrayhasKey( 'date_floating', $properties );

Note the lower-case "h" in "has" on line 164, vs. capital H on the other lines. This is, obviously, not breaking anything as function names in PHP are case-insensitive, it just makes the code less readable.

Attachments (1)

48155.patch (682 bytes) - added by dkarfa 2 months ago.

Download all attachments as: .zip

Change History (5)

@dkarfa
2 months ago

#1 @dkarfa
2 months ago

  • Keywords has-patch added
  • Resolution set to invalid
  • Status changed from new to closed

#2 @johnbillion
2 months ago

  • Component changed from General to REST API
  • Resolution invalid deleted
  • Status changed from closed to reopened

#3 @SergeyBiryukov
2 months ago

  • Milestone changed from Awaiting Review to 5.3

#4 @SergeyBiryukov
2 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from reopened to closed

In 46329:

Tests: Correct ::assertArrayHasKey() capitalization in [46252].

Props dkarfa, david.binda.
Fixes #48155.

Note: See TracTickets for help on using tickets.