Add ::getTree() and ::getInputs() helpers to ComponentTreeItem

Created on 19 February 2025, about 2 months ago

Overview

Over at πŸ“Œ Remove ComponentTreeMeetsRequirementsConstraint::$nested Active , a trivial MR failed phpstan.

Turns out it was because of

$detected_component_ids = $component_tree->get('tree')->getComponentIdList();
…
$detected_prop_source_prefixes = $component_tree->get('inputs')->getPropSourceTypePrefixList();

… not knowing that the return type for get('tree') is a ComponentTreeStructure and a ComponentInputs, respectively.

Proposed resolution

  1. Add ::getTree() and ::getInputs() helpers
  2. OR leverage PHPStan infrastructure: https://phpstan.org/developing-extensions/dynamic-return-type-extensions

User interface changes

πŸ“Œ Task
Status

Active

Version

0.0

Component

Data model

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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