Forráskód Böngészése

ZF-10848 removing trailing whitespace from docblocks generated by Zend_CodeGenerator; fixes broken tests

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23559 44c647ce-9c0f-0410-b52a-842ac1e357ba
mjh_ca 15 éve
szülő
commit
c0475d3d1f

+ 5 - 1
library/Zend/CodeGenerator/Php/Docblock.php

@@ -211,7 +211,11 @@ class Zend_CodeGenerator_Php_Docblock extends Zend_CodeGenerator_Php_Abstract
         $content = wordwrap($content, 80, self::LINE_FEED);
         $lines = explode(self::LINE_FEED, $content);
         foreach ($lines as $line) {
-            $output .= $indent . ' * ' . $line . self::LINE_FEED;
+            $output .= $indent . ' *';
+            if ($line) {
+                $output .= " $line";
+            }
+            $output .= self::LINE_FEED;
         }
         $output .= $indent . ' */' . self::LINE_FEED;
         return $output;

+ 6 - 2
library/Zend/CodeGenerator/Php/Docblock/Tag.php

@@ -178,7 +178,11 @@ class Zend_CodeGenerator_Php_Docblock_Tag extends Zend_CodeGenerator_Php_Abstrac
      */
     public function generate()
     {
-        return '@' . $this->_name . ' ' . $this->_description;
+        $tag = '@' . $this->_name;
+        if ($this->_description) {
+            $tag .= ' ' . $this->_description;
+        }
+        return $tag;
     }
 
-}
+}

BIN
tests/Zend/Paginator/_files/test.sqlite