FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18196&edit=1

ID: 18196
Updated by: gsherwood@squiz.net
Reported By: spam at endstadium dot com
Summary: PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
- dont get it..
-Status: Open
+Status: Feedback
Type: Documentation Problem
Package: PHP_CodeSniffer
Package Version: 1.3.0RC2
PHP Version: 5.3.1
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
I cannot replicate that error message with your sample code. Maybe try
attaching a file to this report that I can use to produce the error.


Previous Comments:
------------------------------------------------------------------------

[2011-01-16 12:31:31] seikilos

Description:
------------
Here is a sample code which generates an error I am not able to
understand (even by looking at the sniff code)

Saple Code: http://pastebin.com/vGm7Wyf2

Message: There must be a single space between the closing parenthesis
and the opening brace of a multi-line IF statement; found 2 spaces.
It points here to the very last closing bracket in line 3.

What does the message tell me? I see no 2 spaces somewhere near this.

------------------------------------------------------------------------

Search Discussions

  • Spam at Jan 19, 2011 at 7:26 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18196&edit=1

    ID: 18196
    Updated by: spam@endstadium.com
    Reported By: spam at endstadium dot com
    Summary: PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
    - dont get it..
    Status: Feedback
    Type: Documentation Problem
    Package: PHP_CodeSniffer
    -Package Version: 1.3.0RC2
    +Package Version: 1.3.0RC1
    PHP Version: 5.3.1
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Package Version: 1.3.0RC2
    +Package Version: 1.3.0RC1
    I've been trying to reproduce it but am not able.
    The server performs an svn checkout and then analyzes a small file
    resulting in two of those weird errors.
    If I manually replace this file with it self by uploading via scp the
    test does not detect any errors.
    After an svn clean checkout they are back in action.
    I suspected some whitespace issues but I compared my local file with the
    file on server on hex level and they are identical.
    I ran sha256 checksum on both file, same hashes.
    I've got 77 errors of those and have no idea how the heck to proceed.
    Can phpcs be turned in some more verbose state to output the issue
    location as string


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-01-16 23:16:07] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    I cannot replicate that error message with your sample code. Maybe try
    attaching a file to this report that I can use to produce the error.

    ------------------------------------------------------------------------

    [2011-01-16 12:31:31] seikilos

    Description:
    ------------
    Here is a sample code which generates an error I am not able to
    understand (even by looking at the sniff code)

    Saple Code: http://pastebin.com/vGm7Wyf2

    Message: There must be a single space between the closing parenthesis
    and the opening brace of a multi-line IF statement; found 2 spaces.
    It points here to the very last closing bracket in line 3.

    What does the message tell me? I see no 2 spaces somewhere near this.

    ------------------------------------------------------------------------
  • Spam at Jan 19, 2011 at 7:37 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18196&edit=1

    ID: 18196
    Comment by: spam@endstadium.com
    Reported By: spam at endstadium dot com
    Summary: PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
    - dont get it..
    Status: Feedback
    Type: Documentation Problem
    Package: PHP_CodeSniffer
    Package Version: 1.3.0RC1
    PHP Version: 5.3.1
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    I could reproduce it. Codesniffer seems to have issues with dos line
    encoding. I did a manual dos2unix on a file and it worked.

    Is there a patch possible to convert all files prior to scanning to unix
    newlines?
    I develop on a windows maschine and other users on windows may have
    issues with unix line endings on some editors


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-01-19 20:28:17] seikilos

    -Package Version: 1.3.0RC2
    +Package Version: 1.3.0RC1
    I've been trying to reproduce it but am not able.
    The server performs an svn checkout and then analyzes a small file
    resulting in two of those weird errors.
    If I manually replace this file with it self by uploading via scp the
    test does not detect any errors.
    After an svn clean checkout they are back in action.
    I suspected some whitespace issues but I compared my local file with the
    file on server on hex level and they are identical.
    I ran sha256 checksum on both file, same hashes.
    I've got 77 errors of those and have no idea how the heck to proceed.
    Can phpcs be turned in some more verbose state to output the issue
    location as string

    ------------------------------------------------------------------------

    [2011-01-16 23:16:07] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    I cannot replicate that error message with your sample code. Maybe try
    attaching a file to this report that I can use to produce the error.

    ------------------------------------------------------------------------

    [2011-01-16 12:31:31] seikilos

    Description:
    ------------
    Here is a sample code which generates an error I am not able to
    understand (even by looking at the sniff code)

    Saple Code: http://pastebin.com/vGm7Wyf2

    Message: There must be a single space between the closing parenthesis
    and the opening brace of a multi-line IF statement; found 2 spaces.
    It points here to the very last closing bracket in line 3.

    What does the message tell me? I see no 2 spaces somewhere near this.

    ------------------------------------------------------------------------
  • Gsherwood at Jan 19, 2011 at 10:24 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18196&edit=1

    ID: 18196
    Updated by: gsherwood@squiz.net
    Reported By: spam at endstadium dot com
    Summary: PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
    - dont get it..
    Status: Feedback
    Type: Documentation Problem
    Package: PHP_CodeSniffer
    Package Version: 1.3.0RC1
    PHP Version: 5.3.1
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    PHP_CodeSniffer handles DOS newlines just fine. The sniff itself didn't
    have newline detection in it for this particular message, so the error
    message only appeared (in this case) when the newline was two chars long
    (like /n).

    I've changed the sniff to detect that there is a newline after the brace
    and present an error message that says this. This works for all newline
    chars phpcs detects (/n, /r, /n).


    Previous Comments:
    ------------------------------------------------------------------------

    [2011-01-19 20:39:30] seikilos

    I could reproduce it. Codesniffer seems to have issues with dos line
    encoding. I did a manual dos2unix on a file and it worked.

    Is there a patch possible to convert all files prior to scanning to unix
    newlines?
    I develop on a windows maschine and other users on windows may have
    issues with unix line endings on some editors

    ------------------------------------------------------------------------

    [2011-01-19 20:28:17] seikilos

    -Package Version: 1.3.0RC2
    +Package Version: 1.3.0RC1
    I've been trying to reproduce it but am not able.
    The server performs an svn checkout and then analyzes a small file
    resulting in two of those weird errors.
    If I manually replace this file with it self by uploading via scp the
    test does not detect any errors.
    After an svn clean checkout they are back in action.
    I suspected some whitespace issues but I compared my local file with the
    file on server on hex level and they are identical.
    I ran sha256 checksum on both file, same hashes.
    I've got 77 errors of those and have no idea how the heck to proceed.
    Can phpcs be turned in some more verbose state to output the issue
    location as string

    ------------------------------------------------------------------------

    [2011-01-16 23:16:07] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    I cannot replicate that error message with your sample code. Maybe try
    attaching a file to this report that I can use to produce the error.

    ------------------------------------------------------------------------

    [2011-01-16 12:31:31] seikilos

    Description:
    ------------
    Here is a sample code which generates an error I am not able to
    understand (even by looking at the sniff code)

    Saple Code: http://pastebin.com/vGm7Wyf2

    Message: There must be a single space between the closing parenthesis
    and the opening brace of a multi-line IF statement; found 2 spaces.
    It points here to the very last closing bracket in line 3.

    What does the message tell me? I see no 2 spaces somewhere near this.

    ------------------------------------------------------------------------
  • Gsherwood at Jan 19, 2011 at 10:25 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18196&edit=1

    ID: 18196
    Updated by: gsherwood@squiz.net
    Reported By: spam at endstadium dot com
    -Summary: PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
    - dont get it..
    +Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars
    Status: Feedback
    Type: Documentation Problem
    Package: PHP_CodeSniffer
    Package Version: 1.3.0RC1
    PHP Version: 5.3.1
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Summary:
    PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
    - dont get it..
    +Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars



    Previous Comments:
    ------------------------------------------------------------------------

    [2011-01-19 23:26:40] squiz

    PHP_CodeSniffer handles DOS newlines just fine. The sniff itself didn't
    have newline detection in it for this particular message, so the error
    message only appeared (in this case) when the newline was two chars long
    (like /n).

    I've changed the sniff to detect that there is a newline after the brace
    and present an error message that says this. This works for all newline
    chars phpcs detects (/n, /r, /n).

    ------------------------------------------------------------------------

    [2011-01-19 20:39:30] seikilos

    I could reproduce it. Codesniffer seems to have issues with dos line
    encoding. I did a manual dos2unix on a file and it worked.

    Is there a patch possible to convert all files prior to scanning to unix
    newlines?
    I develop on a windows maschine and other users on windows may have
    issues with unix line endings on some editors

    ------------------------------------------------------------------------

    [2011-01-19 20:28:17] seikilos

    -Package Version: 1.3.0RC2
    +Package Version: 1.3.0RC1
    I've been trying to reproduce it but am not able.
    The server performs an svn checkout and then analyzes a small file
    resulting in two of those weird errors.
    If I manually replace this file with it self by uploading via scp the
    test does not detect any errors.
    After an svn clean checkout they are back in action.
    I suspected some whitespace issues but I compared my local file with the
    file on server on hex level and they are identical.
    I ran sha256 checksum on both file, same hashes.
    I've got 77 errors of those and have no idea how the heck to proceed.
    Can phpcs be turned in some more verbose state to output the issue
    location as string

    ------------------------------------------------------------------------

    [2011-01-16 23:16:07] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    I cannot replicate that error message with your sample code. Maybe try
    attaching a file to this report that I can use to produce the error.

    ------------------------------------------------------------------------

    [2011-01-16 12:31:31] seikilos

    Description:
    ------------
    Here is a sample code which generates an error I am not able to
    understand (even by looking at the sniff code)

    Saple Code: http://pastebin.com/vGm7Wyf2

    Message: There must be a single space between the closing parenthesis
    and the opening brace of a multi-line IF statement; found 2 spaces.
    It points here to the very last closing bracket in line 3.

    What does the message tell me? I see no 2 spaces somewhere near this.

    ------------------------------------------------------------------------
  • Gsherwood at Jan 19, 2011 at 10:26 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18196&edit=1

    ID: 18196
    Updated by: gsherwood@squiz.net
    Reported By: spam at endstadium dot com
    -Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars
    +Summary: PEAR MultiLineCondition.SpaceBeforeOpenBrace not
    consistent with newline chars
    Status: Feedback
    Type: Documentation Problem
    Package: PHP_CodeSniffer
    Package Version: 1.3.0RC1
    PHP Version: 5.3.1
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars
    +Summary: PEAR MultiLineCondition.SpaceBeforeOpenBrace not
    consistent with newline chars



    Previous Comments:
    ------------------------------------------------------------------------

    [2011-01-19 23:27:18] squiz

    -Summary:
    PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
    - dont get it..
    +Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars


    ------------------------------------------------------------------------

    [2011-01-19 23:26:40] squiz

    PHP_CodeSniffer handles DOS newlines just fine. The sniff itself didn't
    have newline detection in it for this particular message, so the error
    message only appeared (in this case) when the newline was two chars long
    (like /n).

    I've changed the sniff to detect that there is a newline after the brace
    and present an error message that says this. This works for all newline
    chars phpcs detects (/n, /r, /n).

    ------------------------------------------------------------------------

    [2011-01-19 20:39:30] seikilos

    I could reproduce it. Codesniffer seems to have issues with dos line
    encoding. I did a manual dos2unix on a file and it worked.

    Is there a patch possible to convert all files prior to scanning to unix
    newlines?
    I develop on a windows maschine and other users on windows may have
    issues with unix line endings on some editors

    ------------------------------------------------------------------------

    [2011-01-19 20:28:17] seikilos

    -Package Version: 1.3.0RC2
    +Package Version: 1.3.0RC1
    I've been trying to reproduce it but am not able.
    The server performs an svn checkout and then analyzes a small file
    resulting in two of those weird errors.
    If I manually replace this file with it self by uploading via scp the
    test does not detect any errors.
    After an svn clean checkout they are back in action.
    I suspected some whitespace issues but I compared my local file with the
    file on server on hex level and they are identical.
    I ran sha256 checksum on both file, same hashes.
    I've got 77 errors of those and have no idea how the heck to proceed.
    Can phpcs be turned in some more verbose state to output the issue
    location as string

    ------------------------------------------------------------------------

    [2011-01-16 23:16:07] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    I cannot replicate that error message with your sample code. Maybe try
    attaching a file to this report that I can use to produce the error.

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18196
  • Gsherwood at Jan 19, 2011 at 10:28 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=18196&edit=1

    ID: 18196
    Updated by: gsherwood@squiz.net
    Reported By: spam at endstadium dot com
    Summary: PEAR MultiLineCondition.SpaceBeforeOpenBrace not
    consistent with newline chars
    -Status: Feedback
    +Status: Closed
    Type: Documentation Problem
    Package: PHP_CodeSniffer
    Package Version: 1.3.0RC1
    PHP Version: 5.3.1
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Feedback
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.




    Previous Comments:
    ------------------------------------------------------------------------

    [2011-01-19 23:28:16] squiz

    -Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars
    +Summary: PEAR MultiLineCondition.SpaceBeforeOpenBrace not
    consistent with newline chars


    ------------------------------------------------------------------------

    [2011-01-19 23:27:18] squiz

    -Summary:
    PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
    - dont get it..
    +Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars


    ------------------------------------------------------------------------

    [2011-01-19 23:26:40] squiz

    PHP_CodeSniffer handles DOS newlines just fine. The sniff itself didn't
    have newline detection in it for this particular message, so the error
    message only appeared (in this case) when the newline was two chars long
    (like /n).

    I've changed the sniff to detect that there is a newline after the brace
    and present an error message that says this. This works for all newline
    chars phpcs detects (/n, /r, /n).

    ------------------------------------------------------------------------

    [2011-01-19 20:39:30] seikilos

    I could reproduce it. Codesniffer seems to have issues with dos line
    encoding. I did a manual dos2unix on a file and it worked.

    Is there a patch possible to convert all files prior to scanning to unix
    newlines?
    I develop on a windows maschine and other users on windows may have
    issues with unix line endings on some editors

    ------------------------------------------------------------------------

    [2011-01-19 20:28:17] seikilos

    -Package Version: 1.3.0RC2
    +Package Version: 1.3.0RC1
    I've been trying to reproduce it but am not able.
    The server performs an svn checkout and then analyzes a small file
    resulting in two of those weird errors.
    If I manually replace this file with it self by uploading via scp the
    test does not detect any errors.
    After an svn clean checkout they are back in action.
    I suspected some whitespace issues but I compared my local file with the
    file on server on hex level and they are identical.
    I ran sha256 checksum on both file, same hashes.
    I've got 77 errors of those and have no idea how the heck to proceed.
    Can phpcs be turned in some more verbose state to output the issue
    location as string

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18196

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 16, '11 at 10:14p
activeJan 19, '11 at 10:28p
posts7
users3
websitepear.php.net

3 users in discussion

Gsherwood: 5 posts Spam: 1 post Spam: 1 post

People

Translate

site design / logo © 2022 Grokbase