Skip to content

Added generics to 2 methods for better PHPStan checks

Choose a tag to compare

@senaranya senaranya released this 18 Aug 11:29
· 3 commits to master since this release
8dfc721

What's Changed

Added @template annotations to getSegmentsByClass() and getFirstSegmentInstanceByClass(). PHPStan/Psalm/IDEs can now recognize the exact Segment subclass returned, eliminating the need for manual type casting or @var annotations.

Full Changelog: 4.0.1...4.0.2