phpDocumentor / fig-standards

Standards either proposed or approved by the Framework Interop Group
http://www.php-fig.org/
Other
361 stars 85 forks source link

bitwise or (pipe symbol) in property declaration breaks file documentation #145

Closed c-holtermann closed 7 years ago

c-holtermann commented 7 years ago

When running this file through phpdoc 2.8.5

<?php
/**
 * description file
 */

/**
 * description class c
 */

class c {
 /**
 * description property a
 */
 public $a = 1 | 2;
}

?>

the result is this error: Parse Error: Syntax error, unexpected '|', expecting ',' or ';' on line 14 No summary was found for this file

Removing the pipe symbol the documentation process works without a problem:

<?php
/**
 * description file
 */

/**
 * description class c
 */

class c {
 /**
 * description property a
 */
 public $a = 1;
}

?>

This seems to be a bug.

  1. The error message "No summary was found for this file" is wrong
  2. a bitwise or at this property declaration works fine in php.
Fleshgrinder commented 7 years ago

Your issue should go to https://github.com/phpDocumentor/phpDocumentor2

c-holtermann commented 7 years ago

Ok, thanks for the pointers. So this issue can be closed here.