grom358 / pharborist

A PHP library to query and transform source code via tree operations.
GNU General Public License v3.0
44 stars 10 forks source link

DocCommentNode::create() should not call trim() on every line #197

Open phenaproxima opened 9 years ago

phenaproxima commented 9 years ago

@EclipseGc discovered that DocCommentNode is trimming leading and trailing whitespace from every line in the doc comment, which can sometimes have undesirable results:

/**
     * @var string species
     * The species to which the animal belongs.
     */

     vs

     /**
     * @var string species
     *   The species to which the animal belongs.
     */

Can the call to trim() be removed without breaking anything? Or can this be handled by the formatter? I know that doc comments are a bit iffy...

grom358 commented 9 years ago

This still an issue?. Need to add a test.