Tags: Phauthentic/phpstan-rules
Tags
Fixed MethodMustReturnTypeRule to support nullable object return types ( #15) - Added a new method `mustReturnNullableObject` to `ReturnTypeTestClass` that returns a nullable object. - Updated `MethodMustReturnTypeRule` to unwrap `NullableType` for accurate type checking. - Added test cases to validate the new nullable object return type functionality. Co-authored-by: Florian Krämer <f.kraemer@clipmyhorse.tv>
Improving the MethodMustReturnType to support unions (#7) * Improving the MethodMustReturnType rule * Fixing edge cases * Add regex support for method return type validation - Introduced new classes for testing regex patterns in method return types. - Enhanced the MethodMustReturnTypeRule to support regex matching for expected return types. - Updated documentation to reflect regex usage in return type rules. - Added comprehensive tests for various valid and invalid cases involving regex patterns. --------- Co-authored-by: Florian Krämer <f.kraemer@clipmyhorse.tv>