<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>118914</bug_id>
          
          <creation_ts>2005-12-23 19:06:01 +0000</creation_ts>
          <short_desc>Doesn&apos;t parse PHP class methods which returns references (those with ampersand)</short_desc>
          <delta_ts>2006-01-17 14:12:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>quanta</product>
          <component>general</component>
          <version>3.5</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Marte Soliza">myrtactle</reporter>
          <assigned_to name="András Manţia">amantia</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>401124</commentid>
    <comment_count>0</comment_count>
    <who name="Marte Soliza">myrtactle</who>
    <bug_when>2005-12-23 19:06:01 +0000</bug_when>
    <thetext>Version:           3.5 (using KDE 3.5.0, Kubuntu Package 4:3.5.0-0ubuntu0breezy1 breezy)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.12-10-386

I have a class defined like this:
class A {

  var $obj;

  function A (&amp;$obj)  {
    $this-&gt;obj =&amp; $obj;
  }

  function &amp;get () {
    return $this-&gt;obj;
  }

  function set (&amp;$obj) {
    $this-&gt;obj =&amp; $obj;
  }

}

When I create an instance:
$a = new A();
$a-&gt;(have a tooltip for method A::set(), but not A::get())

When I remove the ampersand in A::get(), it shows the methods correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>406830</commentid>
    <comment_count>1</comment_count>
    <who name="András Manţia">amantia</who>
    <bug_when>2006-01-17 14:12:07 +0000</bug_when>
    <thetext>SVN commit 499280 by amantia:

Recognize PHP functions which returns references.

BUG: 118914

 M  +1 -0      ChangeLog  
 M  +1 -1      data/dtep/php/description.rc  
 M  +7 -7      src/document.cpp  


--- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #499279:499280
@@ -12,6 +12,7 @@
         - don&apos;t have two Close actions [#118448]
         - don&apos;t show CSS pseudo-classes in autocompletion for the class attribute [#119373]
         - avoid deadlock when loading the DTEPs
+        - recognize PHP functions which returns references [#118914]
 
  - improvements:
         - add XHTML 1.1 and XHTML 1.0 Basic to the quickstart dialog [#118813]
--- branches/KDE/3.5/kdewebdev/quanta/data/dtep/php/description.rc #499279:499280
@@ -54,7 +54,7 @@
 Name = Functions
 No_Name = No Functions
 Icon = mini-modules
-DefinitionRx = \bfunction[\\s]+([0-9a-zA-Z_\x7f-\xff]*[\\s]*(?:\(.*\)){0,1})
+DefinitionRx = \bfunction[\\s]+&amp;?([0-9a-zA-Z_\x7f-\xff]*[\\s]*(?:\(.*\)){0,1})
 AppendToTags = true
 ParentGroup = Classes
 
--- branches/KDE/3.5/kdewebdev/quanta/src/document.cpp #499279:499280
@@ -1098,8 +1098,8 @@
       {
         if (elementList[i]-&gt;parentNode == 0L || elementList[i]-&gt;global)
         {
-          completion.text = it.key().section(&apos;|&apos;, -1);
-          completions-&gt;append( completion );
+          completion.text = it.key().section(&apos;|&apos;, -1).stripWhiteSpace();
+          completions-&gt;append(completion);
           break;
         } else
         {
@@ -1110,8 +1110,8 @@
           }
           if (n == elementList[i]-&gt;parentNode)
           {
-            completion.text = it.key().section(&apos;|&apos;, -1);
-            completions-&gt;append( completion );
+            completion.text = it.key().section(&apos;|&apos;, -1).stripWhiteSpace();
+            completions-&gt;append(completion);
             break;
           }
         }
@@ -1128,8 +1128,8 @@
     {
       if (list[i].startsWith(word) &amp;&amp; list[i] != word)
       {
-        completion.text = list[i];
-        completions-&gt;append( completion );
+        completion.text = list[i].stripWhiteSpace();
+        completions-&gt;append(completion);
       }
     }
   }
@@ -1300,7 +1300,7 @@
       completion.text = QuantaCommon::tagCase(tagNameList[i]);
     else
       completion.text = tagNameList[i];
-    completion.text = completion.text.left(completion.text.length() - 10);
+    completion.text = completion.text.left(completion.text.length() - 10).stripWhiteSpace();
     completion.comment = comments[tagNameList[i]];
     completions-&gt;append( completion );
   }
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>