Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I get a report of twig template #53

Closed
benchegg opened this issue Sep 22, 2014 · 3 comments
Closed

Can I get a report of twig template #53

benchegg opened this issue Sep 22, 2014 · 3 comments

Comments

@benchegg
Copy link

I notice sometime developer will also put logic into the template. I wonder is it possible we can create Cyclomatic Complexity report of a twig template

@Halleck45
Copy link
Collaborator

Hum, I don't think that PhpMetrics has to analyze twig templates, even if sometime developers put logic into views.

Otherwize, calculating complexity of view can be very difficult ; do we need to take care about Twig Php extensions ? How about macros ? etc.

Any opinion about this issue ?

@benchegg
Copy link
Author

Thank you! I think I can compile twig template into php class. The main reason I want this add-on because I saw developer loves template system but some of them didn't use it right. Therefore, after few persons edit the same template, that template become hard to maintain. If we can build a tool to protect them to warm them before they commit the template might help protect the large code base.

@Halleck45
Copy link
Collaborator

Sorry for the response time. I don't think that PhpMetrics has to analyze Twig views, but you can propose a PR if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants