Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

give php-cs-fixer a try #5688

Open
wants to merge 4 commits into
base: release-2.1
from

Conversation

Projects
None yet
3 participants
@MissAllSunday
Copy link
Contributor

commented May 28, 2019

Ran php-cs-fixer for some of the most common things, heres the ruleset I used:

https://gist.github.com/MissAllSunday/b171ca6af5f2c3e1a7488318585aec15

Fixes some inconsistencies such as:

function ()
using short array syntax
spaces on blank lines
braces on new class declarations
proper space after =

Might be a good idea to add php-cs-fixer to our travis stuff so every commit gets scanned against the same ruleset

give php-cs-fixer a try
Signed-off-by: Jessica González <suki@missallsunday.com>
@jdarwood007

This comment has been minimized.

Copy link
Member

commented May 30, 2019

The usage of list was consistent though it seems in our code base, even if php-cs-fixer wants to make it different. Not sure if we should fix it or leave it.

It also seems to want to change list(,, $var) to list (, , $var), which is not what we want either.

Some of the areas had lots of tabs after => to indent these to be consistent and easier to read.

@sbulen sbulen added the Housekeeping label May 31, 2019

MissAllSunday added some commits Jun 4, 2019

Merge branch 'release-2.1' of github.com:SimpleMachines/SMF2.1 into g…
…eneric_fixes

# Conflicts:
#	Themes/default/Profile.template.php

Signed-off-by: Jessica González <suki@missallsunday.com>
revert back to list(,, $var)
Signed-off-by: Jessica González <suki@missallsunday.com>
@MissAllSunday

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2019

The list () to list() is just for consistency with other functions and/or constructors.

I reverted back the list(,, $var) although that rule was set for function arguments, I don't know if theres a way to add list() to some kind of whitelist.

Merge branch 'release-2.1' of github.com:SimpleMachines/SMF2.1 into g…
…eneric_fixes

# Conflicts:
#	Sources/Profile-View.php
#	other/upgrade_2-1_mysql.sql

Signed-off-by: Jessica González <suki@missallsunday.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.