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

Support configuring spaces between methods #30

Closed
wants to merge 3 commits into from

Conversation

@deviantintegral
Copy link

deviantintegral commented Jun 15, 2018

I see that nette places two spaces between methods which is fine, but doesn't match most other PHP projects. This PR makes the spacing configurable while leaving the default at 2 spaces.

  • new feature
  • BC break? no
  • doc PR: I can write after I know this PR will be merged.
@deviantintegral deviantintegral force-pushed the deviantintegral:method-spacing branch from 7daf620 to 8759484 Jun 15, 2018
@dg dg closed this in 1a7b1a4 Aug 6, 2018
@dg

This comment has been minimized.

Copy link
Member

dg commented Aug 6, 2018

I added the PsrPrinter that solves this issue:

$printer = new Nette\PhpGenerator\PsrPrinter;

$class = new Nette\PhpGenerator\ClassType('Demo');
// ...

echo $printer->printClass($class); // 4 spaces indentation
dg added a commit that referenced this pull request Aug 6, 2018
dg added a commit that referenced this pull request Aug 9, 2018
dg added a commit that referenced this pull request Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.