Rules for static analysis of Latte templates and Latte render() methods
- See Rules Overview
Install
composer require symplify/phpstan-latte-rules --dev
Usage
@todo
Configuration
LatteCompleteCheckRule can check usage of all default latte filters. If you use some additional filters, register them in your phpstan.neon as latteFilters parameter. Use array [className, methodName] for static and dynamic method calls, and simple string for function calls:
parameters: latteFilters: someStaticFilter: [SomeFilterClass, processStatic] someDynamicFilter: [SomeFilterClass, processDynamic] someFunctionFilter: some_function
With application mapping registered in phpstan.neon LatteCompleteCheckRule can also check if your links are correct:
parameters: presenterFactoryMapping: *: App\*Module\*Presenter
Report Issues
In case you are experiencing a bug or want to request a new feature head over to the Symplify monorepo issue tracker
Contribute
The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on symplify/symplify.