Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#48155 closed enhancement (fixed)

Different capitalisation in assertArrayhasKey method call

Reported by: davidbinda's profile david.binda Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: trivial Version:
Component: REST API Keywords: has-patch
Focuses: Cc:

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 5 years ago.

Download all attachments as: .zip

Change History (5)

@dkarfa
5 years ago

#1 @dkarfa
5 years ago

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

#2 @johnbillion
5 years ago

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

#3 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.3

#4 @SergeyBiryukov
5 years 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.