AKSW / OntoWiki

Semantic data wiki as well as Linked Data publishing engine
https://ontowiki.net
205 stars 51 forks source link

FileCommentSniff error: Parse error: syntax error, unexpected '.', expecting ')' #360

Open shinobu opened 8 years ago

shinobu commented 8 years ago

Parse error: syntax error, unexpected '.', expecting ')' in var/www/html/OntoWiki/applications/tests/CodeSniffer/Standards/Ontowiki/Sniffs/Commenting/FileCommentSniff.php on line 34

The line returning the error was added in 4d94718

it seems the '.' concatenation isn't allowed in phpcs

white-gecko commented 8 years ago

Which PHP version are you using?

Maybe you could test the following MWE:

<?php
    $copyright = array(
                            1  => "/**\n",
                            2  => " * This file is part of the {@link http://ontowiki.net OntoWiki} project.\n",
                            3  => " *\n",
                            4  => "",
                            5  => " * @license   http://opensource.org/licenses/gpl-license.php "
                                . "GNU General Public License (GPL)\n",
                            6  => " */",
                           );

var_dump($copyright);

It works for me with PHP 5.6.22-0+deb8u1.

shinobu commented 8 years ago

i'm using php 5.5.9-1ubuntu4.17 *edit The MWE works without a problem

white-gecko commented 8 years ago

when do you get the error? make codesniffer?

shinobu commented 8 years ago

yeah through make codesniffer (excluding the filecommentsniff obviously solves the problem) *edit Only executing vendor/bin/phpcs --sniffs=Ontowiki/Commenting/Filecomment / throws the same error

shinobu commented 8 years ago

the issue as been fixed between now and 4d94718