• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about Single Dot Concatenation

#1
Hello,
I have read the PHP Coding Style Guide page. I have a question:

Why single dot concatenation must not be separated from their subjects?
As I understand, the single dot concatenation, like other 2-ary operation, should be separated from their subjects by one space per side (excluding alignment). I think it is more pretty, more clean. Please tell my why is this convention applied?

Thanks for explanation.
If you change, everything will change for you.
Reply

#2
Like any other coding standard, it was a preference of the person who wrote the style guide. All methods have pros and cons, and the style guide only applies to the framework itself, not your code, so if you prefer to put spaces around it - go for it!
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply

#3
(07-17-2018, 07:11 AM)kilishan Wrote: Like any other coding standard, it was a preference of the person who wrote the style guide. All methods have pros and cons, and the style guide only applies to the framework itself, not your code, so if you prefer to put spaces around it - go for it!

We actually went with spaces around dots in the CodeIgniter4-Standard for PHP Codesniffer. The style guides a little out of date/(TBC)
Reply

#4
On most occasions, I am my own style guide (unless you're the one paying me and say to do it your way).
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.