zombor / KOstache

Logic-less View/Mustache Module for Kohana v3
MIT License
138 stars 43 forks source link

Don't use an anonymous function for the escape option #57

Closed evanpurkhiser closed 10 years ago

evanpurkhiser commented 11 years ago

The escape option must be of type callable, since the anonymous function was just calling the HTML::chars method we can instead just pass an array representing this method and it will be seen as a callable type

See: http://php.net/manual/en/language.types.callable.php

zombor commented 11 years ago

This is functionally the same, eh? Why bother changing it?

evanpurkhiser commented 11 years ago

I suppose just because it's slightly cleaner. Nothing to tag a new version over though.

evanpurkhiser commented 11 years ago

Would you like me to target this at develop while I'm at it as well?

evanpurkhiser commented 10 years ago

Hey @zombor, I'm going through all my open PRs to see if I can get a resolution on them. Any chance of seeing this small change merged in? Or should I just go ahead and close it?

Sorry for the bother. Thanks!

zombor commented 10 years ago

I think I actually prefer the existing code, as it reveals it's intentions better.

shadowhand commented 10 years ago

@zombor Agree.

evanpurkhiser commented 10 years ago

Thanks guys, appreciate the resolution!