{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/12244","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12244/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12244/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12244/events","html_url":"https://github.com/joomla/joomla-cms/pull/12244","id":180472719,"number":12244,"title":"Replace concatenated and array-style strings with HEREDOC","user":{"login":"frankmayer","id":825497,"avatar_url":"https://avatars.githubusercontent.com/u/825497?v=3","gravatar_id":"","url":"https://api.github.com/users/frankmayer","html_url":"https://github.com/frankmayer","followers_url":"https://api.github.com/users/frankmayer/followers","following_url":"https://api.github.com/users/frankmayer/following{/other_user}","gists_url":"https://api.github.com/users/frankmayer/gists{/gist_id}","starred_url":"https://api.github.com/users/frankmayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankmayer/subscriptions","organizations_url":"https://api.github.com/users/frankmayer/orgs","repos_url":"https://api.github.com/users/frankmayer/repos","events_url":"https://api.github.com/users/frankmayer/events{/privacy}","received_events_url":"https://api.github.com/users/frankmayer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-01T18:44:53Z","updated_at":"2016-10-02T13:28:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/12244","html_url":"https://github.com/joomla/joomla-cms/pull/12244","diff_url":"https://github.com/joomla/joomla-cms/pull/12244.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/12244.patch"},"body":"This is a small PR which essentially is a proposal to change some string concatenations and array style concatenations to the HEREDOC format.\r\n\r\nWhy?\r\n\r\n- Personally I always hated it when Javascript or HTML with dynamic content is created using multiple lines of strings bound together with .= and then having a string at every end to include the whitespaces \"\\n\\t\\t...\"\r\n- Another thing was the constant escaping of quotes or double-quotes... And also in order to embed the variable or whatever makes the thing dynamic, one has to close the string insert the variable and reopen the string again. Too much quoting-unquoting escaping, etc...\r\n\r\nThose first two points make it quite difficult to read the code.\r\n\r\n- Also, in modern development environments one can inject a language into a string by either a phpdoc block (like I did in this PR) or just make the IDE remember that a specific string is a specific language. As soon as that happens, the IDE treats the string as code of that specific language and all the helping functionality of the IDE for that language is available for that string. With concatenated strings that often not possible or too much work to apply to each and every string, and one has still do deal with the first two points...\r\n\r\n\r\nThe changes in this PR are addressing all of the above. If you're OK with those, I've spotted some more, which can be changed as well.\r\n"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/250971274","html_url":"https://github.com/joomla/joomla-cms/pull/12244#issuecomment-250971274","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12244","id":250971274,"user":{"login":"sovainfo","id":1137613,"avatar_url":"https://avatars.githubusercontent.com/u/1137613?v=3","gravatar_id":"","url":"https://api.github.com/users/sovainfo","html_url":"https://github.com/sovainfo","followers_url":"https://api.github.com/users/sovainfo/followers","following_url":"https://api.github.com/users/sovainfo/following{/other_user}","gists_url":"https://api.github.com/users/sovainfo/gists{/gist_id}","starred_url":"https://api.github.com/users/sovainfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sovainfo/subscriptions","organizations_url":"https://api.github.com/users/sovainfo/orgs","repos_url":"https://api.github.com/users/sovainfo/repos","events_url":"https://api.github.com/users/sovainfo/events{/privacy}","received_events_url":"https://api.github.com/users/sovainfo/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T13:28:47Z","updated_at":"2016-10-02T13:28:47Z","body":"Like it that it tells you the language you are importing (JS, CSS & HTML), only hope it is not going to be used for a combination.\r\n\r\nAs you discovered, the last line requires a return."}}
{"actor":{"display_login":"sovainfo"}}