Replace assert* involving an instanceof operator with assertInstanceOf()/assertNotInstanceOf()

Created on 22 May 2020, about 4 years ago
Updated 26 September 2023, 9 months ago

Problem/Motivation

As title

Proposed resolution

Recommended regex for searching: assert\w+\(.+instanceof.+\)

Example:

-    $this->assertTrue($property instanceof StringInterface, 'Got the right wrapper fo the page.front property.');
+    $this->assertInstanceOf(StringInterface::class, $property, 'Got the right wrapper fo the page.front property.');

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine alexshipilov

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024