PHP Composite Pattern Generator
Generates robust Composite design patterns for PHP 8.4 to manage complex tree structures and part-whole hierarchies with a uniform interface.
This skill streamlines the implementation of the Composite structural design pattern within PHP 8.4 applications, specifically tailored for Domain-Driven Design (DDD) and Clean Architecture. It automates the creation of Component interfaces, Leaf objects, and Composite containers, allowing developers to treat individual objects and compositions of objects identically. By generating standardized boilerplate and corresponding unit tests, this skill ensures type-safe, recursive structures suitable for menus, file systems, permission hierarchies, and complex calculation engines while strictly adhering to PSR standards.