joomla / coding-standards

Joomla Coding Standards Definition
https://developer.joomla.org/coding-standards/basic-guidelines.html
GNU General Public License v2.0
128 stars 129 forks source link

[RFC] Multiline Signature Formatting #234

Closed mbabker closed 5 years ago

mbabker commented 6 years ago

Long and short, our existing rules for multiline signature formatting sucks, see https://github.com/joomla/joomla-cms/pull/19594/commits/34555afdea871284622441a563fa8e9ecb238693 as an example of something I had to "downgrade" to pass PHPCS.

This is not highly readable code. We can do better.

rdeutz commented 6 years ago

I agree.

Septdir commented 6 years ago

I use PhpStorm and in my (slightly modified stator Joomla) Code Style MultiLine looks like https://github.com/joomla/joomla-cms/pull/20229/commits/cb41a470d51b4e6527b0a523fed7a9bf911d1cbf

However it was necessary so https://github.com/joomla/joomla-cms/pull/20229/commits/a3406a2a910facd10765436e9afc6c3e60695f66

And if you really use Multiline, the version that was the first to read much more conveniently

photodude commented 6 years ago

Since that's on the CMS I'm assuming that's a failure in the 1.5.x version of the code style checks, and not the newer 2.0 or 3.0 versions.

mbabker commented 5 years ago

Works fine, even with PHPCS 1.5 definition if you remember to put the closing parenthesis on the same line as the last argument