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

ID: 18975
Updated by: gsherwood@squiz.net
Reported By: brian dot kendig at disney dot com
Summary: "Closing parenthesis must be on a line by itself"
also causes indentation error
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Mac OS X 10.6.8
Package Version: 1.3.1
PHP Version: 5.3.8
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: squiz
Fix committed.


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

[2011-11-09 16:58:03] bkendig

Description:
------------
When the closing parenthesis of a multi-line function call (or
object definition) isn't on a line by itself, it also causes phpcs to
report a "not indented correctly" error. That latter error doesn't
make sense in this context.

Test script:
---------------
$ cat foo.php
<?php
$foo = new stdClass(
1,
2,
3);


Expected result:
----------------
A "missing file doc comment" error and a "closing parenthesis of
a multi-line function call must be on a line by itself" error.


Actual result:
--------------
$ phpcs foo.php

FILE: /Users/brkendig/foo.php
------------------------------------------------------------------------
--------
FOUND 3 ERROR(S) AFFECTING 2 LINE(S)
------------------------------------------------------------------------
--------
2 | ERROR | Missing file doc comment
5 | ERROR | Multi-line function call not indented correctly;
expected 0 spaces
but found 4
5 | ERROR | Closing parenthesis of a multi-line function call
must be on a
line by itself
------------------------------------------------------------------------
--------

Time: 0 seconds, Memory: 3.00Mb

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedNov 10, '11 at 11:15p
activeNov 10, '11 at 11:15p
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2021 Grokbase