Naming Convention For Acronyms In Method Name (As Per PSRs)

41 views
Skip to first unread message

Daniyal Hamid

unread,
Oct 17, 2019, 1:57:11 PM10/17/19
to PHP Framework Interoperability Group
Hi Guys,

We were having a debate at work about the proper casing for acronyms in method names, but upon searching through PSR-1, 2 and 12, I couldn't find anything specific on the topic. What's the group's take on this?

Thanks!

Matthew Weier O'Phinney

unread,
Oct 17, 2019, 5:04:07 PM10/17/19
to php...@googlegroups.com
On Thu, Oct 17, 2019 at 12:57 PM Daniyal Hamid <daniya...@gmail.com> wrote:
Hi Guys,

We were having a debate at work about the proper casing for acronyms in method names, but upon searching through PSR-1, 2 and 12, I couldn't find anything specific on the topic. What's the group's take on this?

I see it vary from project to project. Some will PascalCase the acronym, others will keep it all upper-case. I think that's a preference that individual projects should likely spell out for themselves, as it's deeply subjective.

--
he/him
Reply all
Reply to author
Forward
0 new messages