Skip to content

Fix coding standards #2644

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contributing/code/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ example containing most features described below:

/**
* @param string $dummy Some argument description
* @param array $options
* @param array $options
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this change. In the Symfony coding standards (http://symfony.com/doc/current/contributing/code/standards.html), the example shown does not include lining up the parameters. I'm also not sure if this is addressed specifically in PSR1 or PSR2. Is there a standard somewhere for this?

Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, we are talking about the example in contributing/code/standards, so of course does the current example not show that :)

And to answer you question: It's done in all comments in the source code. It's also part of the, never finished, Symfony2 PHPdoc standards: symfony/symfony#4183

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, of course - that's really funny :). Thanks @wouterj!

*
* @return string|null Transformed input
*/
private function transformText($dummy, $options = array())
private function transformText($dummy, array $options = array())
{
$mergedOptions = array_merge(
$options,
Expand Down