File tree 3 files changed +32
-0
lines changed
src/collector/backend/parser
3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -482,6 +482,16 @@ private function resolveExpressionValue(Expr $expr) {
482
482
);
483
483
}
484
484
485
+ if ($ expr instanceof BinaryOp) {
486
+ $ code = (new \PhpParser \PrettyPrinter \Standard )->prettyPrint ([$ expr ]);
487
+
488
+ return array (
489
+ 'type ' => 'expression ' ,
490
+ 'value ' => substr ($ code ,0 ,-1 )
491
+ );
492
+
493
+ }
494
+
485
495
$ type = get_class ($ expr );
486
496
$ line = $ expr ->getLine ();
487
497
$ file = $ this ->result ->getFileName ();
Original file line number Diff line number Diff line change
1
+ <?php declare (strict_types=1 );
2
+
3
+ class bug {
4
+ const FOO = 'a ' . 'b ' . 'c ' . 'd ' ;
5
+ const BAZ = ((5 - 1 ) / 2 ) . 'em ' ;
6
+ const BAR = 1 + 2 + 3 ;
7
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <phpdox xmlns =" http://xml.phpdox.net/config" silent =" false" >
3
+
4
+ <project name =" phpDox-issue300" source =" ${basedir}/src" workdir =" ${basedir}/xml" >
5
+
6
+ <collector publiconly =" false" backend =" parser" />
7
+
8
+ <generator output =" ${basedir}/docs" >
9
+ <build engine =" html" enabled =" true" output =" html" />
10
+ <build engine =" xml" enabled =" true" output =" xml" />
11
+ </generator >
12
+
13
+ </project >
14
+
15
+ </phpdox >
You can’t perform that action at this time.
0 commit comments