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

Remove requirement of no spaces before object operator -> #87

Closed
wants to merge 1 commit into from
Closed

Remove requirement of no spaces before object operator -> #87

wants to merge 1 commit into from

Conversation

qheaden
Copy link

@qheaden qheaden commented Apr 12, 2019

This commit removes the line from the ruleset requiring a space to
come before the arrow object operator ->. PSR2 does not enforce this
rule, and removing this rule will allow cleaner code when dealing
with fluent interfaces and method chaining. For example:

$obj->method1()
->method2()
->method3();

or

$obj
->method1()
->method2()
->method3();

This is especially useful when setting up PHPUnit mocks and their
constraints.

What does this PR do?

Checklist

  • Pull request contains a clear definition of changes
  • Tests (either unit, integration, or acceptance) written and passing
  • Relevant documentation produced and/or updated

This commit removes the line from the ruleset requiring a space to
come before the arrow object operator ->. PSR2 does not enforce this
rule, and removing this rule will allow cleaner code when dealing
with fluent interfaces and method chaining. For example:

$obj->method1()
  ->method2()
  ->method3();

or

$obj
  ->method1()
  ->method2()
  ->method3();

This is especially useful when setting up PHPUnit mocks and their
constraints.
@qheaden qheaden requested a review from a team as a code owner April 12, 2019 16:20
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 4769bc9 on qheaden:feature/remove-operator-space-requirement into c1e8da9 on traderinteractive:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 4769bc9 on qheaden:feature/remove-operator-space-requirement into c1e8da9 on traderinteractive:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 4769bc9 on qheaden:feature/remove-operator-space-requirement into c1e8da9 on traderinteractive:master.

@chrisryan chrisryan closed this Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants