Skip to content

fixed cs of php parts #1497

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 6 commits into from
Closed

fixed cs of php parts #1497

wants to merge 6 commits into from

Conversation

brikou
Copy link
Contributor

@brikou brikou commented Jun 25, 2012

No description provided.

@@ -137,7 +137,7 @@ Next, we create the data transformer, which does the actual conversion::
/**
* Transforms a string (number) to an object (issue).
*
* @param string $number
* @param string $number
Copy link
Member

Choose a reason for hiding this comment

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

This is not a standard, you need to align all variable names and there description, but not the variable name and a description of another item without a variable name (e.g. @throws)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

php cs fixer was used

Copy link
Member

Choose a reason for hiding this comment

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

Yea, this seems odd - what if $number has a description? Then it wouldn't line up with the description of the @throws or the Issue (if it had one).

I can't really argue with the phpcs, but this one almost feels wrong :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@weaverryan reverted ;)

@wouterj
Copy link
Member

wouterj commented Jun 25, 2012

Most of the fixes are because you want to add a new line between the first comment (with file info) and the code. I disagree on that.

It is used over the complete documentation and isn't part of the actual script, it is just a reminder of what file is edited/added, and I hope nobody copy that in it's project.

And if you put an empty line in de PHP code, you need to put it also in the Twig code examples and all the other codings (like Yaml and XML), a lot of work on something that isn't necessary.

namespace Acme\WebserviceUserBundle\Security\User;

use Symfony\Component\Security\Core\User\UserInterface;

class WebserviceUser implements UserInterface
Copy link
Member

Choose a reason for hiding this comment

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

This is not a phpcs issue - and this class is referenced in a few other places in this doc. I actually kind of like the verbose name (though maybe for phpcs it should be WebServiceUser) because it's easier to follow along with.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@weaverryan I changed the class name to make it fit with the filename... (oops I should have done the invert change the filename to fit the class name (according to PSR-0)) now it is fixed

@weaverryan
Copy link
Member

Hey Brikou!

I really like this PR :). But, I agree with @wouterj that I don't like the added extra line between the filename comment and the namespace. I'm happily willing to be out-voted if enough people care. For me, in the docs, it's an issue of space - I want to help people know what file we're talking about but without creating too much space before what's really important.

Thanks!

@brikou
Copy link
Contributor Author

brikou commented Jul 3, 2012

@weaverryan now I think everything is fine, should be mergable I guess, cheer ;)

@@ -209,8 +209,6 @@ inside your ``AcmeHelloBundle``::
// src/Acme/HelloBundle/Controller/HelloController.php
namespace Acme\HelloBundle\Controller;

use Symfony\Component\HttpFoundation\Response;
Copy link
Member

Choose a reason for hiding this comment

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

This must be reverted, because it is used in the next code block (and this code is included there because of the ...).

Or, maybe better, place this line in the next code block. I think that's the best option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wouterj done thank you ;)

@weaverryan
Copy link
Member

Hey @brikou

This looks really great now :). But can you re-open a new PR that's against the 2.0 branch - this won't patch cleanly to 2.0 and it should apply backwards.

Thanks!

@brikou
Copy link
Contributor Author

brikou commented Jul 6, 2012

Hi @weaverryan... it was a pain but here it is #1534

@brikou
Copy link
Contributor Author

brikou commented Jul 10, 2012

@weaverryan ping ;)

@weaverryan weaverryan closed this Jul 14, 2012
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.

3 participants