Skip to content

Reducing some code sample line lengths to stop horizontal scrolling #1969

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

Merged
merged 2 commits into from
Nov 26, 2012

Conversation

richardmiller-zz
Copy link
Contributor

No description provided.

$_COOKIE,
$_FILES,
$_SERVER)
;
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be:

$request = new Request(
    ...,
    $_SERVER
);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would lose the meaning though - this is showing that this is equivalent to the Request::createFromGlobals() method. I'm not that happy with it being formatted like this either, it now takes up too much vertical space even if it does avoid the horizontal scrolling. Something like:

$request = new Request(
    $_GET, $_POST, array(),
    $_COOKIE, $_FILES, $_SERVER
);

would avoid both of these but not be ok CS wise.

Copy link
Member

Choose a reason for hiding this comment

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

@richardmiller I think I reduced my example a bit to much. I mean this:

$request = new Request(
    $_GET,
    $_POST,
    array(),
    $_COOKIE,
    $_FILES,
    $_SERVER
);

The last parenthese is on the wrong line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So it is, sorry, I misunderstood what you were saying, I've fixed it now

weaverryan added a commit that referenced this pull request Nov 26, 2012
Reducing some code sample line lengths to stop horizontal scrolling
@weaverryan weaverryan merged commit a38810a into symfony:2.0 Nov 26, 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