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

Make space between closing method parentheses and colon configurable #63

Closed
merlindiavova opened this issue Jun 7, 2020 · 2 comments
Closed

Comments

@merlindiavova
Copy link

Our coding standards enforces a space after the closing method parentheses and the proceeding colon.
It would super advantageous if this space could be configurable and honored in the printReturnType method.

Currently we have to manually go to all generated files and apply the spacing. As you can imagine this is very monotonous. I'm sure many others could also benefit from this.

I would super happy to contribute a PR if this is taken into consideration.

@dg dg closed this as completed in c96e247 Jun 8, 2020
@dg
Copy link
Member

dg commented Jun 8, 2020

Fixed, now you can create your custom printer:

class MyPrinter extends Nette\PhpGenerator\Printer
{
	public function __construct()
	{
		$this->returnTypeColon = ' : ';
	}
}

@merlindiavova
Copy link
Author

Amazing! Thank you for your prompt action and response!

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

No branches or pull requests

2 participants