Bug #21029 [Com]: Curly braces in namespace declarations

From: Date: Mon, 15 Feb 2016 17:32:37 +0000
Subject: Bug #21029 [Com]: Curly braces in namespace declarations
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-11312@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=21029&edit=1 ID: 21029 Comment by: john@kleijnweb.nl Reported By: john at kleijnweb dot nl Summary: Curly braces in namespace declarations Status: Open Type: Bug Package: PHP_CodeSniffer Operating System: Ubuntu Package Version: 2.5.1 PHP Version: Irrelevant Roadmap Versions: New Comment: I guess strictly this is correct ("there mus be one use statement per declaration"), but that wasn't written with PHP7 in mind. I've asked the question on FIG GitHub: https://github.com/php-fig/fig-standards/issues/743 Previous Comments: ------------------------------------------------------------------------ [2016-02-15 12:10:16] kleijnweb Description: ------------ Misinterprets new PHP7 namespace syntax. Test script: --------------- echo -e '<?php\nnamespace Foo\{Bar, Boo};' | phpcs --standard=PSR2 Expected result: ---------------- No output Actual result: -------------- FILE: STDIN ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 2 | ERROR | [x] Closing brace must be on a line by itself ---------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- Time: 18ms; Memory: 4Mb ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=21029&edit=1

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