Bug #19651 [Fbk]: PHP 5.4 square bracket arrays indentation error

From: Date: Mon, 12 Nov 2012 10:22:38 +0000
Subject: Bug #19651 [Fbk]: PHP 5.4 square bracket arrays indentation error
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9330@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19651&edit=1 ID: 19651 Updated by: andrejs.verza@gmail.com Reported By: andrejs dot verza at gmail dot com Summary: PHP 5.4 square bracket arrays indentation error Status: Feedback Type: Bug Package: PHP_CodeSniffer Operating System: Windows 7 x64 Package Version: 1.4.0 PHP Version: 5.4.7 Assigned To: squiz Roadmap Versions: New Comment: Will check later. Previous Comments: ------------------------------------------------------------------------ [2012-11-12 03:54:36] squiz -Status: Open +Status: Feedback -Assigned To: +Assigned To: squiz I can only replicate this issue on PHPCS versions < 1.4.0 (I tried 1.3.6, for example). 1.4.0+ do not report any errors about indentation for the code in your test case. Are you able to try with the latest version (1.4.2) and see if the problem still occurs. If so, can you please show me the output of the following command on your test script: phpcs --standard=[whatever standard you use] -s /path/to/example.php ------------------------------------------------------------------------ [2012-10-16 23:43:57] squiz -Summary: PHP 5.4 square bracket arrays indentitation error. +Summary: PHP 5.4 square bracket arrays indentation error ------------------------------------------------------------------------ [2012-10-13 12:42:42] drumsibumsi Description: ------------ CodeSniffer wrongly reports errors on array indentitation when using PHP 5.4 short notation for arrays in function calls. See test script. Test script: --------------- call_some_function( 'argument_1', 'argument_2', [ 'array_item_1', 'array_item_2', 'array_item_3', ] ); Expected result: ---------------- No errors. Actual result: -------------- Error on indentitation level: "Multi-line function call not indented correctly". CodeSniffer expects array items to be aligned inline with square brackets. ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19651&edit=1

« previous php.pear.bugs (#9330) next »