Author: Raymond Bosman
Date: 2006-12-20 12:02:14 +0100 (Wed, 20 Dec 2006)
New Revision: 4416

Log:
- skip @param if it does not have a description. 

Modified:
   scripts/clone-empty.php

Modified: scripts/clone-empty.php
===================================================================
--- scripts/clone-empty.php     2006-12-20 10:37:16 UTC (rev 4415)
+++ scripts/clone-empty.php     2006-12-20 11:02:14 UTC (rev 4416)
@@ -128,7 +128,6 @@
     }
 
     // Replace <note:> with <@note >
-
     $comment = str_ireplace( "note:", "@note ", $comment );
 
 
@@ -163,25 +162,31 @@
         {
             if( $tokens[$i][1] == "@param" || $tokens[$i][1] == "@return")
             {
-                $pos = strpos( $tokens[$i + 1][1], " ", 1 );
-                if( $pos )
+                $tokens[$i + 1][1] = ltrim( $tokens[$i + 1][1] );
+                $a = explode( " ", $tokens[$i + 1][1] );
+
+
+                if( sizeof( $a ) <= 2)
                 {
-                    // Remove the dollar sign.
-                    if( $tokens[$i][1] == "@param" && $tokens[$i + 1][1][$pos 
+ 1] == '$')
-                    {
-                        $tokens[$i + 1][1] = " " . substr( $tokens[$i + 1][1], 
$pos + 2 );
-                    }
-                    else
-                    {
-                        $tokens[$i + 1][1] = substr( $tokens[$i + 1][1], $pos 
);
-                    }
+                    $i += 3;
+                    continue;
                 }
                 else
                 {
-                    // XXX: check Skip the crap + tab.
-                    $i += 3;
+                    if( $a[1][0] == '$' )
+                    {
+                        $a[1] = substr( $a[1], 1 );
+                    }
+                    
+                    unset ($a[0] );
+                    $tokens[$i + 1][1] = " " . implode( " ", $a );
+ 
+                    $new .= $tokens[$i++][1];
+                    $new .= $tokens[$i][1];
                     continue;
                 }
+
+
             }
             elseif( $tokens[$i][1] == "@var" || $tokens[$i][1] == "@access" )
             {

-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to