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

ID: 18661
Updated by: gsherwood@squiz.net
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
------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJul 12, '11 at 10:16p
activeJul 12, '11 at 10:16p
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase