From 5d4056fe87d0a7f91c55b937cc4dd082879d8bec Mon Sep 17 00:00:00 2001 From: Mahmut Bayri Date: Thu, 13 Aug 2015 13:42:10 +0300 Subject: [PATCH] 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. --- src/Console/ModelsCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 11b8c73..2f2c2c2 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -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); }