jeremykendall / php-domain-parser

Public Suffix List based domain parsing implemented in PHP
MIT License
1.16k stars 128 forks source link

Proposal: Rename subDomain to subdomain #327

Closed robbinjanssen closed 2 years ago

robbinjanssen commented 2 years ago

Issue summary

First of all, thanks for your work, awesome library!

Can you explain why you've chosen subDomain over subdomain? Afaik the correct spelling is subdomain. When using subDomain you indicate that there are two words (sub domain or sub-domain). The docs also mention subdomain instead of subDomain. Just wondering/nitpicking.

If you would like to change this to the "correct" spelling I can wrap up a PR. Doing this will resolve in a breaking change, so I understand if you don't want to.

nyamsprod commented 2 years ago

@robbinjanssen thanks for the kind words.

The only reason in the naming of the method was consistency. There's

In all cases the d is uppercased except when the full domain is returned. Hope this makes sense, at least it did to me

robbinjanssen commented 2 years ago

That makes sense, I don't mind the subDomain() method but I noticed it's semantically incorrect.

We all know the saying "If it ain't broke don't fix it" 👍 You can close the issue if you want to leave it like this. Thanks!