Try Rector
Documentation
Find Rule
Blog
Codebase Audit
Contact
Try Rector
Documentation
Find Rule
Blog
Codebase Audit
Contact
Hire Upgrade Team
Hire Team
Type Declarations set
Rule source on GitHub
← Find rule
Configurable
TypedPropertyFromAssignsRector
Add typed property from assigned types
Other rules in the Type Declarations set
ReturnIteratorInDataProviderRector
- Add Iterator type on known PHPUnit data providers
AddClosureParamTypeFromIterableMethodCallRector
- Applies type hints to closures on Iterable method calls where key/value types are documented
AddReturnTypeDeclarationFromYieldsRector
- Add return type declarations from yields
AddClosureParamTypeForArrayReduceRector
- Applies type hints to array_map closures
AddClosureParamTypeForArrayMapRector
- Applies type hints to array_map closures
AddParamTypeSplFixedArrayRector
- Add exact fixed array type in known cases
AddClosureParamTypeFromVariableCallRector
- Add closure param object type based on the argument the assigned closure variable is called with
AddClosureVoidReturnTypeWhereNoReturnRector
- Add closure return type void if there is no return
ClosureReturnTypeRector
- Add return type to closures based on known return values
ClosureReturnTypeFromAssertInstanceOfRector
- Add return type to closures narrowed by assertInstanceOf() inside PHPUnit test case classes