Annotations are formatted in a wrong way
aazon opened this issue · 3 comments
aazon commented
Input source code:
<?php
class Foo extends Bar
{
/**
* Execution callback
* @param string $world
* @return string
*/
public function hello($world)
{
return $world;
}
}
Applying formatter:
./phpcf apply ~/Projects/Foo.php
Result:
<?php
class Foo extends Bar
{
/**
* Execution callback
* @param string $world
* @return string
*/
public function hello($world)
{
return $world;
}
}
Expected result:
<?php
class Foo extends Bar
{
/**
* Execution callback
* @param string $world
* @return string
*/
public function hello($world)
{
return $world;
}
}
YuriyNasretdinov commented
In other words, you suggest phpcf to format contents of PHPDoc (not "regular") comments, am I right? It was actually a consious decision to ignore comments and string contents upon formatting so that we do not break any code that could potentially depend on their contents. Probably, we can safely format comment contents as we are formatting the rest of the code without too many problems.
YuriyNasretdinov commented
Did you resolve the issue though :)?