Skip to content

Instantly share code, notes, and snippets.

@vikbert
Last active February 8, 2019 16:38
Show Gist options
  • Select an option

  • Save vikbert/de227a8353d41ca1971737b5672ebe42 to your computer and use it in GitHub Desktop.

Select an option

Save vikbert/de227a8353d41ca1971737b5672ebe42 to your computer and use it in GitHub Desktop.
[coding guideline] coding guideline, coding convention

Coding Guideline

coding like shakespeare

https://dmitripavlutin.com/coding-like-shakespeare-practical-function-naming-conventions/

Prefer to symfony best practice

Param converter

/**
* @ParamConverter("subscription", options={"id" = "subscriptionId"})
* @ParamConverter("subscriptionTimes", options={"id" = "timesId"})
*/

assign query params in twig

{% set isSwapPage = app.request.attributes.get('isSwapPage') == 1 ? true : false %}
{% set swapFilter = app.request.attributes.get('swapFilter') %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment