[PEAR-BUG] Bug #18661 [Opn->Bgs]: Function call with a multiline array is not allowed by Zend standard

[email protected]
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=18661&edit=1

 ID:               18661
 Updated by:       [email protected]
 Reported By:      miau dot jp at gmail dot com
 Summary:          Function call with a multiline array is not allowed
                    by Zend standard
-Status:           Open
+Status:           Bogus
 Type:             Bug
 Package:          PHP_CodeSniffer
 Package Version:  1.3.0
 PHP Version:      5.3.6
-Assigned To:      
+Assigned To:      squiz
 Roadmap Versions: 
 New Comment:

-Status:      Open
+Status:      Bogus
-Assigned To:
+Assigned To: squiz
The ZEND coding standard is not the Zend Framework coding standard. It's
just a 
collection of sniffs submitted by someone at Zend many years ago. The
description in 
the ruleset.xml file explains this. I know it's confusing, but I'd break
backwards compatibility if I removed it, so I have to do it with a major
release.


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

[2011-07-12 13:40:06] miau

Description:
------------
While a function call with a multiline array is shown in the Zend
Framework Coding Standard, it is not allowed by "phpcs --
standard=Zend".


Test script:
---------------
***** Begin of function_call_multiline.php
<?php
// quoted from:
//  
http://framework.zend.com/manual/en/coding-standard.coding-style.html
threeArguments(array(1, 2, 3, 'Zend', 'Studio',
                     $a, $b, $c,
                     56.44, $d, 500), 2, 3);

threeArguments(array(
    1, 2, 3, 'Zend', 'Studio',
    $a, $b, $c,
    56.44, $d, 500
), 2, 3);
***** End of function_call_multiline.php

>phpcs --standard=Zend function_call_multiline.php


Expected result:
----------------
(no warnings)


Actual result:
--------------
FOUND 4 ERROR(S) AFFECTING 4 LINE(S)
------------------------------------------------------------------------
--------
  4 | ERROR | Opening parenthesis of a multi-line function call 
must be the
    |       | last content on the line
  6 | ERROR | Closing parenthesis of a multi-line function call 
must be on a
    |       | line by itself
  8 | ERROR | Opening parenthesis of a multi-line function call 
must be the
    |       | last content on the line
 12 | ERROR | Closing parenthesis of a multi-line function call 
must be on a
    |       | line by itself

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


-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18661&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.