Trim tag text. If tag doesn't have comment or the comment has any space at the end of line, phpcs (with --standard=PSR2) dedects an error.

This commit is contained in:
Mahmut Bayri
2015-08-13 13:42:10 +03:00
parent 3fbe330998
commit 5d4056fe87
+2 -1
View File
@@ -474,7 +474,8 @@ class ModelsCommand extends Command
} else {
$attr = 'property-read';
}
$tag = Tag::createInstance("@{$attr} {$property['type']} {$name} {$property['comment']}", $phpdoc);
$tagLine = trim("@{$attr} {$property['type']} {$name} {$property['comment']}");
$tag = Tag::createInstance($tagLine, $phpdoc);
$phpdoc->appendTag($tag);
}