Avoid 'Access to an undefined property' PHPStan errors

Created on 4 December 2023, over 1 year ago
Updated 12 December 2023, over 1 year ago

Problem/Motivation

In a custom module I am accessing the display_id and data properties resulting in an PHPStan error Access to an undefined property

Steps to reproduce

Access a property like $item->data and run PHPStan checks.

Proposed resolution

Declare properties

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

🇦🇹Austria arthur_lorenz Vienna

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024